[arch-commits] Commit in python-pytorch/trunk (2 files)

Konstantin Gizdov kgizdov at archlinux.org
Thu Jun 24 02:17:19 UTC 2021


    Date: Thursday, June 24, 2021 @ 02:17:19
  Author: kgizdov
Revision: 967152

upgpkg: python-pytorch 1.9.0-1: upgpkg: python-pytorch 1.9.0-1 and CUDA 11.3.1 update

Modified:
  python-pytorch/trunk/PKGBUILD
  python-pytorch/trunk/fix-building-for-torchvision.patch

------------------------------------+
 PKGBUILD                           |   24 ++++++++++++++++--------
 fix-building-for-torchvision.patch |   12 ++++++------
 2 files changed, 22 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-24 01:59:22 UTC (rev 967151)
+++ PKGBUILD	2021-06-24 02:17:19 UTC (rev 967152)
@@ -4,9 +4,9 @@
 pkgbase=python-pytorch
 pkgname=("python-pytorch" "python-pytorch-opt" "python-pytorch-cuda" "python-pytorch-opt-cuda")
 _pkgname="pytorch"
-pkgver=1.8.1
-_pkgver=1.8.1
-pkgrel=7
+pkgver=1.9.0
+_pkgver=1.9.0
+pkgrel=1
 pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
 arch=('x86_64')
 url="https://pytorch.org"
@@ -95,7 +95,7 @@
             'SKIP'
             '557761502bbd994d9795bef46779e4b8c60ba0b45e7d60841f477d3b7f28a00a'
             'cd9ac4aaa9f946ac5eafc57cf66c5c16b3ea7ac8af32c2558fad0705411bb669'
-            'f4959cde995382c55ba28c8496321b0bb0a5c0f3f46abcce2e88521004993846'
+            '689c76e89bcf403df1b4cf7ca784381967b6a6527ed6eb6d0ad6681cf789b738'
             '278fecdb45df065343f51688cc7a1665153b5189f3341a741d546b0b518eac40'
             '64833e96e47a22f88336381f25fcd73127208dc79e2074398295d88c4596c06a'
             'd3ef8491718ed7e814fe63e81df2f49862fffbea891d2babbcb464796a1bd680')
@@ -158,6 +158,8 @@
 
   # remove local nccl
   rm -rf third_party/nccl/nccl
+  # also remove path from nccl module, so it's not checked
+  sed -e '/path = third_party\/nccl\/nccl/d' -i ./.gitmodules
 
   # fix build with google-glog 0.5 https://github.com/pytorch/pytorch/issues/58054
   sed -e '/namespace glog_internal_namespace_/d' -e 's|::glog_internal_namespace_||' -i c10/util/Logging.cpp
@@ -173,6 +175,7 @@
   export PYTORCH_BUILD_NUMBER=1
 
   # Check tools/setup_helpers/cmake.py, setup.py and CMakeLists.txt for a list of flags that can be set via env vars.
+  export ATEN_NO_TEST=ON  # do not build ATen tests
   export USE_MKLDNN=ON
   export BUILD_CUSTOM_PROTOBUF=OFF
   # export BUILD_SHARED_LIBS=OFF
@@ -181,16 +184,21 @@
   export USE_GLOG=ON
   export BUILD_BINARY=ON
   export USE_OPENCV=ON
+  # export USE_SYSTEM_LIBS=ON  # experimental, not all libs present in repos
   export USE_SYSTEM_NCCL=ON
-  # export USE_SYSTEM_LIBS=ON
   export NCCL_VERSION=$(pkg-config nccl --modversion)
   export NCCL_VER_CODE=$(sed -n 's/^#define NCCL_VERSION_CODE\s*\(.*\).*/\1/p' /usr/include/nccl.h)
-  export CUDAHOSTCXX=g++
+  # export BUILD_SPLIT_CUDA=ON  # modern preferred build, but splits libs and symbols, ABI break
+  # export USE_FAST_NVCC=ON  # parallel build with nvcc, spawns too many processes
+  export USE_CUPTI_SO=ON  # make sure cupti.so is used as shared lib
+  export CUDAHOSTCXX=/usr/bin/g++-10
+  export CUDA_HOST_COMPILER="${CUDAHOSTCXX}"
   export CUDA_HOME=/opt/cuda
   export CUDNN_LIB_DIR=/usr/lib
   export CUDNN_INCLUDE_DIR=/usr/include
-  # export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
-  export TORCH_CUDA_ARCH_LIST="5.2;5.3;6.0;6.1;6.2;7.0;7.0+PTX;7.2;7.2+PTX;7.5;7.5+PTX;8.0;8.0+PTX;8.6;8.6+PTX"
+  export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
+  export TORCH_CUDA_ARCH_LIST="5.2;5.3;6.0;6.1;6.2;7.0;7.2;7.5;8.0;8.6"
+  export OVERRIDE_TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}"
 }
 
 build() {

Modified: fix-building-for-torchvision.patch
===================================================================
--- fix-building-for-torchvision.patch	2021-06-24 01:59:22 UTC (rev 967151)
+++ fix-building-for-torchvision.patch	2021-06-24 02:17:19 UTC (rev 967152)
@@ -4,17 +4,17 @@
 Subject: [PATCH] fix building torchvision
 
 ---
- aten/src/ATen/core/op_registration/op_whitelist.h | 2 +-
+ aten/src/ATen/core/op_registration/op_allowlist.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/aten/src/ATen/core/op_registration/op_whitelist.h b/aten/src/ATen/core/op_registration/op_whitelist.h
+diff --git a/aten/src/ATen/core/op_registration/op_allowlist.h b/aten/src/ATen/core/op_registration/op_allowlist.h
 index f93462bb2cf..12903d1cc09 100644
---- a/aten/src/ATen/core/op_registration/op_whitelist.h
-+++ b/aten/src/ATen/core/op_registration/op_whitelist.h
-@@ -59,7 +59,7 @@ constexpr bool op_whitelist_contains(string_view allowlist, string_view item) {
+--- a/aten/src/ATen/core/op_registration/op_allowlist.h
++++ b/aten/src/ATen/core/op_registration/op_allowlist.h
+@@ -59,7 +59,7 @@ constexpr bool op_allowlist_contains(string_view allowlist, string_view item) {
  // Returns true iff the given op name is on the allowlist
  // and should be registered
- constexpr bool op_whitelist_check(string_view op_name) {
+ constexpr bool op_allowlist_check(string_view op_name) {
 -  assert(op_name.find("::") != string_view::npos);
 +//  assert(op_name.find("::") != string_view::npos);
  #if !defined(TORCH_OPERATOR_WHITELIST)




More information about the arch-commits mailing list