From 4520f542ce0fb5e14b9747cccbc4d5055b6c7366 Mon Sep 17 00:00:00 2001 From: Zhipeng Xie Date: Thu, 4 Feb 2021 07:45:19 -0500 Subject: [PATCH] disable SVE to fix build error Signed-off-by: Zhipeng Xie --- ...-for-v1.6.0-due-to-sleef-build-error.patch | 29 +++++++++++++++++++ pytorch.spec | 8 +++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0002-disable-SVE-for-v1.6.0-due-to-sleef-build-error.patch diff --git a/0002-disable-SVE-for-v1.6.0-due-to-sleef-build-error.patch b/0002-disable-SVE-for-v1.6.0-due-to-sleef-build-error.patch new file mode 100644 index 0000000..c035b2a --- /dev/null +++ b/0002-disable-SVE-for-v1.6.0-due-to-sleef-build-error.patch @@ -0,0 +1,29 @@ +From 9fa24f75ca24761183ea2fe664744f2284007e3f Mon Sep 17 00:00:00 2001 +From: Zhipeng Xie +Date: Wed, 3 Feb 2021 10:22:31 -0500 +Subject: [PATCH] disable SVE for v1.6.0 due to sleef build error. + +sleef build error due to SVE not fully supported, so +disable it temporarily. + +Signed-off-by: Zhipeng Xie +--- + third_party/sleef/Configure.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/third_party/sleef/Configure.cmake b/third_party/sleef/Configure.cmake +index 25fc675e..02c364d2 100644 +--- a/third_party/sleef/Configure.cmake ++++ b/third_party/sleef/Configure.cmake +@@ -545,7 +545,7 @@ endif() + + # SVE + +-option(DISABLE_SVE "Disable SVE" OFF) ++option(DISABLE_SVE "Disable SVE" ON) + option(ENFORCE_SVE "Build fails if SVE is not supported by the compiler" OFF) + + if(SLEEF_ARCH_AARCH64 AND NOT DISABLE_SVE) +-- +2.27.0 + diff --git a/pytorch.spec b/pytorch.spec index 1d7185b..066e2ad 100644 --- a/pytorch.spec +++ b/pytorch.spec @@ -1,14 +1,15 @@ %global _empty_manifest_terminate_build 0 Name: pytorch Version: 1.6.0 -Release: 1 +Release: 2 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration License: BSD-3 URL: https://pytorch.org/ #sh -x updateSource.sh -Source0: pytorch-1.6.0-include-submodules.tar.bz2 +Source0: pytorch-%{version}-include-submodules.tar.bz2 Patch0001: 0001-Fix-illegal-opcode-bug-in-caffe2-40584.patch +Patch0002: 0002-disable-SVE-for-v1.6.0-due-to-sleef-build-error.patch Requires: python3-future Requires: python3-numpy @@ -84,5 +85,8 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Thu Feb 4 2021 Zhipeng Xie - 1.6.0-2 +- disable SVE to fix compile error in gcc 9 + * Sun Sep 27 2020 Zhipeng Xie - 1.6.0-1 - Package init -- Gitee