[arch-commits] Commit in python-pytorch/trunk (PKGBUILD disable_non_x86_64.patch)
Sven-Hendrik Haase
svenstaro at archlinux.org
Mon Sep 7 03:18:10 UTC 2020
Date: Monday, September 7, 2020 @ 03:18:05
Author: svenstaro
Revision: 699388
upgpkg: python-pytorch 1.6.0-3: Try to make sure that non-opt packages don't use non-x86_64 instructions
Added:
python-pytorch/trunk/disable_non_x86_64.patch
Modified:
python-pytorch/trunk/PKGBUILD
--------------------------+
PKGBUILD | 12 +++++++++---
disable_non_x86_64.patch | 15 +++++++++++++++
2 files changed, 24 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-09-07 00:09:46 UTC (rev 699387)
+++ PKGBUILD 2020-09-07 03:18:05 UTC (rev 699388)
@@ -6,7 +6,7 @@
_pkgname="pytorch"
pkgver=1.6.0
_pkgver=1.6.0
-pkgrel=2
+pkgrel=3
pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
arch=('x86_64')
url="https://pytorch.org"
@@ -19,12 +19,14 @@
fix_include_system.patch
use-system-libuv.patch
use-system-libuv2.patch
- nccl_version.patch)
+ nccl_version.patch
+ disable_non_x86_64.patch)
sha256sums=('SKIP'
'147bdaeac8ec46ea46382e6146878bd8f8d51e05d5bd6f930dfd8e2b520859b9'
'6f3b7a87172011de810bf1ab581245b4463ef86e5cd09bec63aeffa372e26646'
'7b65c3b209fc39f92ba58a58be6d3da40799f1922910b1171ccd9209eda1f9eb'
- '1a276bd827a0c76dab908cbc6605fa4c9fc2cc2b9431b6578a41133ae27dba2b')
+ '1a276bd827a0c76dab908cbc6605fa4c9fc2cc2b9431b6578a41133ae27dba2b'
+ 'd3ef8491718ed7e814fe63e81df2f49862fffbea891d2babbcb464796a1bd680')
prepare() {
cd "${_pkgname}-${pkgver}"
@@ -84,6 +86,8 @@
export USE_CUDA=0
export USE_CUDNN=0
cd "${srcdir}/${_pkgname}-${pkgver}"
+ echo "add_definitions(-march=x86-64)" >> cmake/MiscCheck.cmake
+ patch -Np1 -i "${srcdir}/disable_non_x86_64.patch"
python setup.py build
@@ -99,6 +103,8 @@
export USE_CUDA=1
export USE_CUDNN=1
cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
+ patch -Np1 -i "${srcdir}/disable_non_x86_64.patch"
+ echo "add_definitions(-march=x86-64)" >> cmake/MiscCheck.cmake
python setup.py build
Added: disable_non_x86_64.patch
===================================================================
--- disable_non_x86_64.patch (rev 0)
+++ disable_non_x86_64.patch 2020-09-07 03:18:05 UTC (rev 699388)
@@ -0,0 +1,15 @@
+diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py
+index d5db749d15..fd54cca6b8 100644
+--- a/tools/setup_helpers/cmake.py
++++ b/tools/setup_helpers/cmake.py
+@@ -295,6 +295,10 @@ class CMake:
+ build_options.update(cmake__options)
+
+ CMake.defines(args,
++ DISABLE_AVX2=1,
++ DISABLE_AVX512F=1,
++ DISABLE_FMA4=1,
++ DISABLE_SSE4=1,
+ PYTHON_EXECUTABLE=sys.executable,
+ PYTHON_LIBRARY=cmake_python_library,
+ PYTHON_INCLUDE_DIR=distutils.sysconfig.get_python_inc(),
More information about the arch-commits
mailing list