[med-svn] [Git][med-team/kalign][master] 3 commits: add simde flags

Michael R. Crusoe gitlab at salsa.debian.org
Mon Mar 30 14:03:33 BST 2020



Michael R. Crusoe pushed to branch master at Debian Med / kalign


Commits:
239226d6 by Michael R. Crusoe at 2020-03-30T13:42:50+02:00
add simde flags

- - - - -
63c805a3 by Michael R. Crusoe at 2020-03-30T14:19:39+02:00
Don't break the Debian architecture baseline

- - - - -
33ae524a by Michael R. Crusoe at 2020-03-30T14:52:52+02:00
fix the _mm_malloc fallback

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/no-native-build
- debian/patches/series
- debian/patches/simde
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,7 +1,7 @@
 kalign (1:3.2.3-2) UNRELEASED; urgency=medium
 
   * Team upload.
-  * Add non-x86 compatability using the SIMD Everywhere library
+  * Add non-AVX2 compatability using the SIMD Everywhere library
 
  -- Michael R. Crusoe <michael.crusoe at gmail.com>  Mon, 30 Mar 2020 12:13:37 +0200
 


=====================================
debian/control
=====================================
@@ -13,6 +13,7 @@ Rules-Requires-Root: no
 
 Package: kalign
 Architecture: any
+#Architecture: any-amd64 any-i386
 Depends: ${shlibs:Depends},
          ${misc:Depends}
 Enhances: t-coffee,


=====================================
debian/patches/no-native-build
=====================================
@@ -0,0 +1,20 @@
+Author: Michael R. Crusoe <michael.crusoe at gmail.com>
+Description: Don't build with all the SIMD compiler flags
+
+This breaks the Debian baseline
+--- kalign.orig/configure.ac
++++ kalign/configure.ac
+@@ -16,13 +16,10 @@
+ 
+ AC_CONFIG_MACRO_DIR([m4])
+ 
+-m4_include([m4/ax_ext.m4])
+ m4_include([m4/ax_valgrind_check.m4])
+ m4_include([m4/ax_check_compile_flag.m4])
+ m4_include([m4/ax_set_compile_flags.m4])
+ 
+-AX_EXT
+-
+ AX_ENABLE_DEBUG
+ 
+ AC_ARG_ENABLE(openmp, [AC_HELP_STRING([--enable-openmp],[use OpenMP directives for parallelism])], enable_openmp=$enableval, enable_openmp=no)


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 simde
+no-native-build


=====================================
debian/patches/simde
=====================================
@@ -13,23 +13,29 @@ Description: leverage the SIMD Everywhere library
  #include "pick_anchor.h"
 --- kalign.orig/src/bisectingKmeans.c
 +++ kalign/src/bisectingKmeans.c
-@@ -20,7 +20,7 @@
+@@ -20,7 +20,12 @@
  
  */
  
 -#include <xmmintrin.h>
 +#include "../debian/include/simde/x86/sse.h"
++#if !defined(SIMDE_SSE_NATIVE)
++  #include <stdlib.h>
++  #define _mm_malloc(size, align) aligned_alloc(align, size)
++  #define _mm_free free
++#endif
  
  #include "msa.h"
  
 --- kalign.orig/src/bpm.c
 +++ kalign/src/bpm.c
-@@ -28,15 +28,15 @@
+@@ -27,16 +27,16 @@
+ 
  
  
++#include "../debian/include/simde/x86/avx2.h"
  #ifdef HAVE_AVX2
 -#include <immintrin.h>
-+#include "../debian/include/simde/x86/avx2.h"
  
 -__m256i BROADCAST_MASK[16];
 +simde__m256i BROADCAST_MASK[16];
@@ -310,7 +316,7 @@ Description: leverage the SIMD Everywhere library
  #endif
 --- kalign.orig/src/euclidean_dist.c
 +++ kalign/src/euclidean_dist.c
-@@ -22,15 +22,15 @@
+@@ -22,15 +22,20 @@
  
  #include "euclidean_dist.h"
  #include "rng.h"
@@ -318,6 +324,11 @@ Description: leverage the SIMD Everywhere library
 -#include <immintrin.h>
 +#include "../debian/include/simde/x86/sse.h"
 +#include "../debian/include/simde/x86/avx.h"
++#if !defined(SIMDE_SSE_NATIVE)
++  #include <stdlib.h>
++  #define _mm_malloc(size, align) aligned_alloc(align, size)
++  #define _mm_free free
++#endif
  #include "float.h"
  
  #include "esl_stopwatch.h"
@@ -330,7 +341,7 @@ Description: leverage the SIMD Everywhere library
  
  
  #ifdef ITEST_EDIST
-@@ -163,18 +163,18 @@
+@@ -163,18 +168,18 @@
  
          float d = 0.0f;
          register int i;
@@ -357,7 +368,7 @@ Description: leverage the SIMD Everywhere library
                  a+=8;
                  b+=8;
          }
-@@ -187,22 +187,22 @@
+@@ -187,22 +192,22 @@
  
  
  
@@ -403,12 +414,17 @@ Description: leverage the SIMD Everywhere library
  #include  <stdalign.h>
 --- kalign.orig/src/sequence_distance.c
 +++ kalign/src/sequence_distance.c
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,12 @@
  
  */
  
 -#include <xmmintrin.h>
 +#include "../debian/include/simde/x86/sse.h"
++#if !defined(SIMDE_SSE_NATIVE)
++  #include <stdlib.h>
++  #define _mm_malloc(size, align) aligned_alloc(align, size)
++  #define _mm_free free
++#endif
  #include "sequence_distance.h"
  
  #include "alphabet.h"


=====================================
debian/rules
=====================================
@@ -2,6 +2,8 @@
 # -*- makefile -*-
 # Build rules for the Debian package kalign
 
+export DEB_CFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
+export DEB_CXXFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:



View it on GitLab: https://salsa.debian.org/med-team/kalign/-/compare/809731ac34775a5318425402bdaa23bd61743213...33ae524ad1ec634fb8ee7b76db53c83c6f518c26

-- 
View it on GitLab: https://salsa.debian.org/med-team/kalign/-/compare/809731ac34775a5318425402bdaa23bd61743213...33ae524ad1ec634fb8ee7b76db53c83c6f518c26
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200330/300a56f5/attachment-0001.html>


More information about the debian-med-commit mailing list