[lua-torch-torch7] 03/03: patches: revert removal of patches
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Mon May 22 03:18:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository lua-torch-torch7.
commit a4c99fb85ee9980e831a4c5a64ea25d74c4a8845
Author: Zhou Mo <cdluminate at gmail.com>
Date: Mon May 22 03:17:04 2017 +0000
patches: revert removal of patches
---
debian/changelog | 9 ++++
.../cmake-disable-simd-for-compatibility.patch | 56 ++++++++++++++++++++++
debian/patches/cmake-disable-simd-on-arm.patch | 20 ++++++++
debian/patches/series | 2 +
4 files changed, 87 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 82cd75e..c94d855 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+lua-torch-torch7 (0~20170511-gae1a805-2) UNRELEASED; urgency=medium
+
+ * Revert the removal of cmake-disable-simd-* patches.
+ + patches/cmake-disable-simd-for-compatibility.patch
+ + patches/cmake-disable-simd-on-arm.patch
+ This package still FTBFS without the patches due to SIGILL.
+
+ -- Zhou Mo <cdluminate at gmail.com> Mon, 22 May 2017 03:15:00 +0000
+
lua-torch-torch7 (0~20170511-gae1a805-1) experimental; urgency=medium
* Import upstream snapshot.
diff --git a/debian/patches/cmake-disable-simd-for-compatibility.patch b/debian/patches/cmake-disable-simd-for-compatibility.patch
new file mode 100644
index 0000000..6cefdd6
--- /dev/null
+++ b/debian/patches/cmake-disable-simd-for-compatibility.patch
@@ -0,0 +1,56 @@
+Purpose: Disable new SIMD instruction sets on amd64 and i386, for sake of
+ better compatibility with old x86 machines.
+Note: Turn DEBIAN_AMD64 or DEBIAN_I386 flag on to disable those ISAs.
+ If none of them are specified, nothing will be changed.
+Author: Zhou Mo
+Forward: No. Debian specific patch.
+
+diff --git a/lib/TH/cmake/FindSSE.cmake b/lib/TH/cmake/FindSSE.cmake
+index f84ce89..75eafde 100644
+--- a/lib/TH/cmake/FindSSE.cmake
++++ b/lib/TH/cmake/FindSSE.cmake
+@@ -108,18 +108,29 @@ MACRO(CHECK_SSE lang type flags)
+
+ ENDMACRO()
+
+-CHECK_SSE(C "SSE1" " ;-msse;/arch:SSE")
+-CHECK_SSE(C "SSE2" " ;-msse2;/arch:SSE2")
+-CHECK_SSE(C "SSE3" " ;-msse3;/arch:SSE3")
+-CHECK_SSE(C "SSE4_1" " ;-msse4.1;-msse4;/arch:SSE4")
+-CHECK_SSE(C "SSE4_2" " ;-msse4.2;-msse4;/arch:SSE4")
+-CHECK_SSE(C "AVX" " ;-mavx;/arch:AVX")
+-CHECK_SSE(C "AVX2" " ;-mavx2 -mfma;/arch:AVX2")
+-
+-CHECK_SSE(CXX "SSE1" " ;-msse;/arch:SSE")
+-CHECK_SSE(CXX "SSE2" " ;-msse2;/arch:SSE2")
+-CHECK_SSE(CXX "SSE3" " ;-msse3;/arch:SSE3")
+-CHECK_SSE(CXX "SSE4_1" " ;-msse4.1;-msse4;/arch:SSE4")
+-CHECK_SSE(CXX "SSE4_2" " ;-msse4.2;-msse4;/arch:SSE4")
+-CHECK_SSE(CXX "AVX" " ;-mavx;/arch:AVX")
+-CHECK_SSE(CXX "AVX2" " ;-mavx2 -mfma;/arch:AVX2")
++IF(DEBIAN_I386)
++ # no SSE at all for i386
++ELSEIF(DEBIAN_AMD64)
++ # nothing higher than SSE2, no AVX. (Debian)
++ CHECK_SSE(C "SSE1" " ;-msse;/arch:SSE")
++ CHECK_SSE(C "SSE2" " ;-msse2;/arch:SSE2")
++ CHECK_SSE(CXX "SSE1" " ;-msse;/arch:SSE")
++ CHECK_SSE(CXX "SSE2" " ;-msse2;/arch:SSE2")
++ELSE()
++ # Upstream
++ CHECK_SSE(C "SSE1" " ;-msse;/arch:SSE")
++ CHECK_SSE(C "SSE2" " ;-msse2;/arch:SSE2")
++ CHECK_SSE(C "SSE3" " ;-msse3;/arch:SSE3")
++ CHECK_SSE(C "SSE4_1" " ;-msse4.1;-msse4;/arch:SSE4")
++ CHECK_SSE(C "SSE4_2" " ;-msse4.2;-msse4;/arch:SSE4")
++ CHECK_SSE(C "AVX" " ;-mavx;/arch:AVX")
++ CHECK_SSE(C "AVX2" " ;-mavx2 -mfma;/arch:AVX2")
++
++ CHECK_SSE(CXX "SSE1" " ;-msse;/arch:SSE")
++ CHECK_SSE(CXX "SSE2" " ;-msse2;/arch:SSE2")
++ CHECK_SSE(CXX "SSE3" " ;-msse3;/arch:SSE3")
++ CHECK_SSE(CXX "SSE4_1" " ;-msse4.1;-msse4;/arch:SSE4")
++ CHECK_SSE(CXX "SSE4_2" " ;-msse4.2;-msse4;/arch:SSE4")
++ CHECK_SSE(CXX "AVX" " ;-mavx;/arch:AVX")
++ CHECK_SSE(CXX "AVX2" " ;-mavx2 -mfma;/arch:AVX2")
++ENDIF()
diff --git a/debian/patches/cmake-disable-simd-on-arm.patch b/debian/patches/cmake-disable-simd-on-arm.patch
new file mode 100644
index 0000000..a3204bd
--- /dev/null
+++ b/debian/patches/cmake-disable-simd-on-arm.patch
@@ -0,0 +1,20 @@
+Purpose: disable OMAP*, and NEON instruction sets for sake of compatibility
+Forward: not yet, keep it here.
+diff --git a/lib/TH/cmake/FindARM.cmake b/lib/TH/cmake/FindARM.cmake
+index 59c78d8..697a399 100644
+--- a/lib/TH/cmake/FindARM.cmake
++++ b/lib/TH/cmake/FindARM.cmake
+@@ -64,6 +64,13 @@ ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(NEON_FOUND false CACHE BOOL "NEON not available on host")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
++IF(DEBIAN_ARM)
++ # build for the best compatibility even if the builder supports SIMD
++ set(CORTEXA8_FOUND false CACHE BOOL "OMAP3 disabled")
++ set(CORTEXA9_FOUND false CACHE BOOL "OMAP4 disabled")
++ set(NEON_FOUND false CACHE BOOL "NEON disabled")
++ENDIF(DEBIAN_ARM)
++
+ if(NOT NEON_FOUND)
+ MESSAGE(STATUS "Could not find hardware support for NEON on this machine.")
+ endif(NOT NEON_FOUND)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..373d0a9
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+cmake-disable-simd-for-compatibility.patch
+cmake-disable-simd-on-arm.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lua-torch-torch7.git
More information about the debian-science-commits
mailing list