[atlas] 01/01: Add ppc64el support.

Sébastien Villemot sebastien at debian.org
Sat Nov 15 12:05:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository atlas.

commit fa9508ae483a20ac68cf00dc0ac021e562269a51
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Sat Nov 15 13:04:11 2014 +0100

    Add ppc64el support.
    
    - New patches (thanks, Michael Normand et al).
      + ppc64el-abiv2.patch
      + ppc64el-ifdef-files-with-lvx.patch
      + ppc64el-new-archdef-name.patch
    - debian/archdefs/ppc64el/GENERIC64LE.tar.bz2: add archdefs/timings.
    - debian/archdefs/README: updated accordingly.
    
    Thanks to Mauricio Faria de Oliveira for putting this together.
    
    Closes: #766695
    
    Git-Dch: Full
---
 debian/archdefs/README                            |   1 +
 debian/archdefs/ppc64el/GENERIC64LE.tar.bz2       | Bin 0 -> 7860 bytes
 debian/patches/ppc64el-abiv2.patch                | 105 ++++++++++++++++++++
 debian/patches/ppc64el-ifdef-files-with-lvx.patch | 114 ++++++++++++++++++++++
 debian/patches/ppc64el-new-archdef-name.patch     |  21 ++++
 debian/patches/series                             |   3 +
 debian/source/include-binaries                    |   1 +
 7 files changed, 245 insertions(+)

diff --git a/debian/archdefs/README b/debian/archdefs/README
index cf5dd13..8cf520e 100644
--- a/debian/archdefs/README
+++ b/debian/archdefs/README
@@ -17,5 +17,6 @@ generated (other details are in README.source):
 - mips: ATLAS 3.10.1 / gabrielli.debian.org / sid / 2013-07-27
 - mipsel: ATLAS 3.10.1 / eder.debian.org / sid / 2013-06-07
 - powerpc: ATLAS 3.10.1 / partch.debian.org / sid / 2013-06-06
+- ppc64el: ATLAS 3.10.2 / pastel.debian.net / sid / 2014-10-24
 - s390x: ATLAS 3.10.1 / zelenka.debian.org / sid / 2013-06-06
 - sparc: ATLAS 3.10.1 / smetana.debian.org / wheezy / 2013-06-06
diff --git a/debian/archdefs/ppc64el/GENERIC64LE.tar.bz2 b/debian/archdefs/ppc64el/GENERIC64LE.tar.bz2
new file mode 100644
index 0000000..3dca66d
Binary files /dev/null and b/debian/archdefs/ppc64el/GENERIC64LE.tar.bz2 differ
diff --git a/debian/patches/ppc64el-abiv2.patch b/debian/patches/ppc64el-abiv2.patch
new file mode 100644
index 0000000..481feb7
--- /dev/null
+++ b/debian/patches/ppc64el-abiv2.patch
@@ -0,0 +1,105 @@
+Origin: http://sourceforge.net/p/math-atlas/patches/65/#3cb1
+Forwarded: http://sourceforge.net/p/math-atlas/patches/65/
+Description: ELFv2 ABI changes for ppc64el
+ For more details, see:
+ https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40
+Last-Update: 2014-10-24
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766695
+Reviewed-By: Sébastien Villemot <sebastien at debian.org>
+--- a/tune/blas/gemm/CASES/ATL_dmm4x4x32_ppc.c
++++ b/tune/blas/gemm/CASES/ATL_dmm4x4x32_ppc.c
+@@ -268,7 +268,7 @@ Mjoin(.,ATL_USERMM):
+ 	.globl  Mjoin(_,ATL_USERMM)
+ Mjoin(_,ATL_USERMM):
+    #else
+-      #if defined(ATL_USE64BITS)
++      #if defined(ATL_USE64BITS) && _CALL_ELF != 2
+ /*
+  *      Official Program Descripter section, seg fault w/o it on Linux/PPC64
+  */
+@@ -324,8 +324,15 @@ ATL_USERMM:
+ #endif
+ 
+ #ifdef ATL_USE64BITS
++#if _CALL_ELF == 2
++/* ABIv2 */
++        ld      pC0, 104(r1)
++        ld      incCn, 112(r1)
++#else
++/* ABIv1 */
+         ld      pC0, 120(r1)
+         ld      incCn, 128(r1)
++#endif
+ #elif defined(ATL_AS_OSX_PPC) || defined(ATL_AS_AIX_PPC)
+         lwz     pC0, 68(r1)
+         lwz     incCn,  72(r1)
+--- a/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
++++ b/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
+@@ -170,13 +170,21 @@ void ATL_USERMM(const int M, const int N
+                 const TYPE beta, TYPE *C, const int ldc)
+                                   (r10)    8(r1)
+ *******************************************************************************
+-64 bit ABIs:
++64 bit ABIv1s:
+                          r3           r4           r5             r6/f1
+ void ATL_USERMM(const int M, const int N, const int K, const TYPE alpha,
+                            r7             r8             r9            r10
+                 const TYPE *A, const int lda, const TYPE *B, const int ldb,
+                              f2   120(r1)        128(r1)
+                 const TYPE beta, TYPE *C, const int ldc)
++
++64 bit ABIv2s:
++                         r3           r4           r5             r6/f1
++void ATL_USERMM(const int M, const int N, const int K, const TYPE alpha,
++                           r7             r8             r9            r10
++                const TYPE *A, const int lda, const TYPE *B, const int ldb,
++                             f2   104(r1)        112(r1)
++                const TYPE beta, TYPE *C, const int ldc)
+ #endif
+ #ifdef ATL_AS_AIX_PPC
+         .csect .text[PR]
+@@ -202,7 +210,7 @@ Mjoin(.,ATL_USERMM):
+ 	.globl  Mjoin(_,ATL_USERMM)
+ Mjoin(_,ATL_USERMM):
+    #else
+-      #if defined(ATL_USE64BITS)
++      #if defined(ATL_USE64BITS) && _CALL_ELF != 2
+ /*
+  *      Official Program Descripter section, seg fault w/o it on Linux/PPC64
+  */
+@@ -257,9 +265,17 @@ ATL_USERMM:
+    #endif
+ #endif
+ 
++
+ #if defined (ATL_USE64BITS)
++#if _CALL_ELF == 2
++/* ABIv2 */
++        ld      pC0, 104(r1)
++        ld      incCn, 112(r1)
++#else
++/* ABIv1 */
+         ld      pC0, 120(r1)
+         ld      incCn, 128(r1)
++#endif
+ #elif defined(ATL_AS_OSX_PPC) || defined(ATL_AS_AIX_PPC)
+         lwz     pC0, 68(r1)
+         lwz     incCn,  72(r1)
+--- a/tune/blas/gemm/CASES/ATL_dmm4x4x2pf_av.c
++++ b/tune/blas/gemm/CASES/ATL_dmm4x4x2pf_av.c
+@@ -405,8 +405,15 @@ Mjoin(_,ATL_USERMM):
+  */
+ #ifdef ATL_GAS_LINUX_PPC
+    #ifdef ATL_USE64BITS
++      #if _CALL_ELF == 2
++      /* ABIv2 */
++        ld      pC0, 104(r1)
++        ld      incCn, 112(r1)
++      #else
++      /* ABIv1 */
+ 	ld 	pC0, 120(r1)
+ 	ld 	incCn, 128(r1)
++      #endif
+    #else
+ 	lwz	incCn, FSIZE+8(r1)
+    #endif
diff --git a/debian/patches/ppc64el-ifdef-files-with-lvx.patch b/debian/patches/ppc64el-ifdef-files-with-lvx.patch
new file mode 100644
index 0000000..1f9e74e
--- /dev/null
+++ b/debian/patches/ppc64el-ifdef-files-with-lvx.patch
@@ -0,0 +1,114 @@
+Description: Skip optimizations for big-endian PowerPC.
+ Some of the existing optimized files/cases for PowerPC
+ contain assembly instructions with implicit big-endian
+ behavior - thus incorrect for the little-endian mode -
+ incurring tests failures during the build (i.e., FTBFS).
+ This is being worked on; this is the workaround for now.
+ .
+ Note: this is an alternative for Michael Normand's patch
+ 'atlas.3.10.2-ppc64le_do_not_use_files_with_lvx.patch',
+ in order not to touch file lists/indexes, but only C 
+ source code, so the C preprocessor can avoid code per-arch.
+ .
+ For more details, see:
+ https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40
+Author: Mauricio Faria de Oliveira <mauricfo at linux.vnet.ibm.com>
+Forwarded: http://sourceforge.net/p/math-atlas/patches/65/
+Last-Update: 2014-10-28
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766695
+Reviewed-By: Sébastien Villemot <sebastien at debian.org>
+--- a/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c
++++ b/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c
+@@ -7,6 +7,11 @@
+  * meaning that this kernel will do an extra store of vector C to memory
+  * for load by the scalar FPU.
+  */
++
++#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++/* FIXME: port to little-endian powerpc64. */
++#else
++
+ #include "atlas_asm.h"
+ 
+ #if !defined(ATL_AS_OSX_PPC) && !defined(ATL_GAS_LINUX_PPC)
+@@ -4257,3 +4262,5 @@ MPEELEDU:
+         ld      r3, FST(r1)
+         addi    r1, r1, FSIZE
+         blr
++
++#endif	/* little-endian powerpc64 */
+--- a/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
++++ b/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
+@@ -28,6 +28,10 @@
+  *
+  */
+ 
++#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++/* FIXME: port to little-endian powerpc64. */
++#else
++
+ #include "atlas_asm.h"
+ /*
+  * NOTE: this kernel written by R. Clint Whaley, but it uses two key ideas
+@@ -7502,3 +7506,5 @@ DONE:
+         addi    r1, r1, FSIZE
+ #endif
+         blr
++
++#endif  /* little-endian powerpc64 */
+--- a/tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c
++++ b/tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c
+@@ -27,6 +27,10 @@
+  *
+  */
+ 
++#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++/* FIXME: port to little-endian powerpc64. */
++#else
++
+ #include <altivec.h>
+ #include "atlas_misc.h"
+ #include "atlas_prefetch.h"               /* ATL_pfl1R, ATL_pfl1W */
+@@ -651,3 +655,5 @@ void ATL_USERMM
+         }
+     }
+ }
++
++#endif  /* little-endian powerpc64 */
+--- a/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
++++ b/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
+@@ -28,6 +28,9 @@
+  *
+  */
+ 
++#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++/* FIXME: port to little-endian powerpc64. */
++#else
+ 
+ #include "atlas_asm.h"
+ 
+@@ -8340,3 +8343,5 @@ MPEELEDU:
+         ld      r3, FST(r1)
+         addi    r1, r1, FSIZE
+         blr
++
++#endif  /* little-endian powerpc64 */
+--- a/tune/blas/gemm/CASES/ATL_smm8x2x4_av.c
++++ b/tune/blas/gemm/CASES/ATL_smm8x2x4_av.c
+@@ -27,6 +27,10 @@
+  *
+  */
+ 
++#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++/* FIXME: port to little-endian powerpc64. */
++#else
++
+ #include <altivec.h>
+ #include "atlas_misc.h"
+ #include "atlas_prefetch.h"               /* ATL_pfl1R, ATL_pfl1W */
+@@ -326,3 +330,5 @@ void ATL_USERMM
+         }
+     }
+ }
++
++#endif  /* little-endian powerpc64 */
diff --git a/debian/patches/ppc64el-new-archdef-name.patch b/debian/patches/ppc64el-new-archdef-name.patch
new file mode 100644
index 0000000..8c21fbe
--- /dev/null
+++ b/debian/patches/ppc64el-new-archdef-name.patch
@@ -0,0 +1,21 @@
+Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c43
+Forwarded: http://sourceforge.net/p/math-atlas/patches/66/
+Description: Append 'LE' to archdef on little-endian PowerPC64
+ For more details, see:
+ https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40
+Last-Update: 2014-10-24
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766695
+Reviewed-By: Sébastien Villemot <sebastien at debian.org>
+--- a/CONFIG/src/SpewMakeInc.c
++++ b/CONFIG/src/SpewMakeInc.c
+@@ -550,6 +550,10 @@ int main(int nargs, char **args)
+    fprintf(fpout, "#  -------------------------------------------------\n");
+    fprintf(fpout, "   ARCH = %s", machnam[mach]);
+    fprintf(fpout, "%d", ptrbits);
++   /* for ppc64le archi add 'LE' characters */
++   #if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++      fprintf(fpout, "%s", "LE");
++   #endif
+    if (ISAX)
+       fprintf(fpout, "%s", ISAXNAM[ISAX]);
+    if (!USEIEEE)
diff --git a/debian/patches/series b/debian/patches/series
index abe946d..7ebfb60 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,6 @@ armel-is-v4t.diff
 armhf.diff
 cpu-throttling-check.diff
 generic.diff
+ppc64el-new-archdef-name.patch
+ppc64el-abiv2.patch
+ppc64el-ifdef-files-with-lvx.patch
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
index cc35070..b3bd336 100644
--- a/debian/source/include-binaries
+++ b/debian/source/include-binaries
@@ -7,5 +7,6 @@ debian/archdefs/i386/x86x8732.tar.bz2
 debian/archdefs/mips/GENERIC32.tar.bz2
 debian/archdefs/mipsel/GENERIC32.tar.bz2
 debian/archdefs/powerpc/GENERIC32.tar.bz2
+debian/archdefs/ppc64el/GENERIC64LE.tar.bz2
 debian/archdefs/s390x/IBMz964.tar.bz2
 debian/archdefs/sparc/USI32.tar.bz2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/atlas.git



More information about the debian-science-commits mailing list