Date: Sunday, June 20, 2021 @ 23:16:17 Author: foutrelis Revision: 966163
upgpkg: python-pytorch 1.8.1-7: protobuf 3.17.3 rebuild Added: python-pytorch/trunk/benchmark-gcc11.patch python-pytorch/trunk/xnnpack-gcc11.patch Modified: python-pytorch/trunk/PKGBUILD -----------------------+ PKGBUILD | 10 +++++++++- benchmark-gcc11.patch | 30 ++++++++++++++++++++++++++++++ xnnpack-gcc11.patch | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-06-20 23:15:43 UTC (rev 966162) +++ PKGBUILD 2021-06-20 23:16:17 UTC (rev 966163) @@ -6,7 +6,7 @@ _pkgname="pytorch" pkgver=1.8.1 _pkgver=1.8.1 -pkgrel=6 +pkgrel=7 pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration" arch=('x86_64') url="https://pytorch.org" @@ -55,6 +55,8 @@ fix_include_system.patch use-system-libuv.patch fix-building-for-torchvision.patch + benchmark-gcc11.patch + xnnpack-gcc11.patch disable_non_x86_64.patch) sha256sums=('SKIP' 'SKIP' @@ -94,6 +96,8 @@ '557761502bbd994d9795bef46779e4b8c60ba0b45e7d60841f477d3b7f28a00a' 'cd9ac4aaa9f946ac5eafc57cf66c5c16b3ea7ac8af32c2558fad0705411bb669' 'f4959cde995382c55ba28c8496321b0bb0a5c0f3f46abcce2e88521004993846' + '278fecdb45df065343f51688cc7a1665153b5189f3341a741d546b0b518eac40' + '64833e96e47a22f88336381f25fcd73127208dc79e2074398295d88c4596c06a' 'd3ef8491718ed7e814fe63e81df2f49862fffbea891d2babbcb464796a1bd680') prepare() { @@ -148,6 +152,10 @@ # fix https://github.com/pytorch/vision/issues/3695 patch -Np1 -i "${srcdir}/fix-building-for-torchvision.patch" + # GCC 11 fixes + patch -Np1 -d third_party/benchmark <../benchmark-gcc11.patch + patch -Np1 -d third_party/XNNPACK <../xnnpack-gcc11.patch + # remove local nccl rm -rf third_party/nccl/nccl Added: benchmark-gcc11.patch =================================================================== --- benchmark-gcc11.patch (rev 0) +++ benchmark-gcc11.patch 2021-06-20 23:16:17 UTC (rev 966163) @@ -0,0 +1,30 @@ +From 3d1c2677686718d906f28c1d4da001c42666e6d2 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <sly...@inbox.ru> +Date: Thu, 15 Oct 2020 09:12:40 +0100 +Subject: [PATCH] src/benchmark_register.h: add missing <limits> inclusion + (#1060) + +Noticed missing header when was building llvm with gcc-11: + +``` +llvm-project/llvm/utils/benchmark/src/benchmark_register.h:17:30: + error: 'numeric_limits' is not a member of 'std' + 17 | static const T kmax = std::numeric_limits<T>::max(); + | ^~~~~~~~~~~~~~ +``` +--- + src/benchmark_register.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/benchmark_register.h b/src/benchmark_register.h +index 61377d742..204bf1d9f 100644 +--- a/src/benchmark_register.h ++++ b/src/benchmark_register.h +@@ -1,6 +1,7 @@ + #ifndef BENCHMARK_REGISTER_H + #define BENCHMARK_REGISTER_H + ++#include <limits> + #include <vector> + + #include "check.h" Added: xnnpack-gcc11.patch =================================================================== --- xnnpack-gcc11.patch (rev 0) +++ xnnpack-gcc11.patch 2021-06-20 23:16:17 UTC (rev 966163) @@ -0,0 +1,33 @@ +From 042cdaf1c24c675fca5e79eb4d2665839d7df2c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nenad=20Miks=CC=8Ca?= <nenad.mi...@microblink.com> +Date: Mon, 3 May 2021 13:28:59 +0200 +Subject: [PATCH] GCC 11 no longer needs this polyfill + +--- + src/xnnpack/intrinsics-polyfill.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/xnnpack/intrinsics-polyfill.h b/src/xnnpack/intrinsics-polyfill.h +index 3f198d88..32d7d4f3 100644 +--- a/src/xnnpack/intrinsics-polyfill.h ++++ b/src/xnnpack/intrinsics-polyfill.h +@@ -11,8 +11,8 @@ + #if defined(__SSE2__) + #include <emmintrin.h> + +-// GCC any, Clang pre-8, Android NDK Clang pre-8.0.7, Apple Clang pre-11, and ICC pre-16 +-#if (defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)) || \ ++// GCC pre-11, Clang pre-8, Android NDK Clang pre-8.0.7, Apple Clang pre-11, and ICC pre-16 ++#if (defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ < 11) || \ + (defined(__clang__) && !defined(__apple_build_version__) && (__clang_major__ < 8)) || \ + (defined(__clang__) && defined(__ANDROID__) && (__clang_major__ == 8) && (__clang_minor__ == 0) && (__clang_patchlevel__ < 7)) || \ + (defined(__clang__) && defined(__apple_build_version__) && (__apple_build_version__ < 11000000)) || \ +@@ -27,7 +27,7 @@ static XNN_INTRINSIC + void _mm_storeu_si32(const void* address, __m128i v) { + *((int*) address) = _mm_cvtsi128_si32(v); + } +-#endif // GCC any, Clang pre-8, Android NDK Clang pre-8.0.7, Apple Clang pre-11, and ICC pre-16 ++#endif // GCC pre-11, Clang pre-8, Android NDK Clang pre-8.0.7, Apple Clang pre-11, and ICC pre-16 + #endif // SSE2 + + #ifdef __AVX512F__