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

Sven-Hendrik Haase svenstaro at archlinux.org
Fri Apr 30 18:52:29 UTC 2021


    Date: Friday, April 30, 2021 @ 18:52:29
  Author: svenstaro
Revision: 925389

upgpkg: python-pytorch 1.8.1-4: Fix for building torchvision

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

------------------------------------+
 PKGBUILD                           |    7 ++++++-
 fix-building-for-torchvision.patch |   25 +++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-30 18:23:25 UTC (rev 925388)
+++ PKGBUILD	2021-04-30 18:52:29 UTC (rev 925389)
@@ -6,7 +6,7 @@
 _pkgname="pytorch"
 pkgver=1.8.1
 _pkgver=1.8.1
-pkgrel=3
+pkgrel=4
 pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
 arch=('x86_64')
 url="https://pytorch.org"
@@ -54,6 +54,7 @@
         "${pkgname}-fmt::git+https://github.com/fmtlib/fmt.git"
         fix_include_system.patch
         use-system-libuv.patch
+        fix-building-for-torchvision.patch
         disable_non_x86_64.patch)
 sha256sums=('SKIP'
             'SKIP'
@@ -92,6 +93,7 @@
             'SKIP'
             '557761502bbd994d9795bef46779e4b8c60ba0b45e7d60841f477d3b7f28a00a'
             'cd9ac4aaa9f946ac5eafc57cf66c5c16b3ea7ac8af32c2558fad0705411bb669'
+            'f4959cde995382c55ba28c8496321b0bb0a5c0f3f46abcce2e88521004993846'
             'd3ef8491718ed7e814fe63e81df2f49862fffbea891d2babbcb464796a1bd680')
 
 prepare() {
@@ -143,6 +145,9 @@
   # Use system libuv
   patch -Np1 -i "${srcdir}"/use-system-libuv.patch
 
+  # fix https://github.com/pytorch/vision/issues/3695
+  patch -Np1 -i "${srcdir}/fix-building-for-torchvision.patch"
+
   # remove local nccl
   rm -rf third_party/nccl/nccl
 

Added: fix-building-for-torchvision.patch
===================================================================
--- fix-building-for-torchvision.patch	                        (rev 0)
+++ fix-building-for-torchvision.patch	2021-04-30 18:52:29 UTC (rev 925389)
@@ -0,0 +1,25 @@
+From 011495d8045c44527fbd7796ce860618120ae127 Mon Sep 17 00:00:00 2001
+From: Butui Hu <hot123tea123 at gmail.com>
+Date: Fri, 30 Apr 2021 11:36:30 +0800
+Subject: [PATCH] fix building torchvision
+
+---
+ aten/src/ATen/core/op_registration/op_whitelist.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
+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) {
+ // Returns true iff the given op name is on the allowlist
+ // and should be registered
+ constexpr bool op_whitelist_check(string_view op_name) {
+-  assert(op_name.find("::") != string_view::npos);
++//  assert(op_name.find("::") != string_view::npos);
+ #if !defined(TORCH_OPERATOR_WHITELIST)
+   // If the TORCH_OPERATOR_WHITELIST parameter is not defined,
+   // all ops are to be registered
+-- 
+2.31.1
+



More information about the arch-commits mailing list