gatagat / lap

Linear Assignment Problem solver (LAPJV/LAPMOD).
BSD 2-Clause "Simplified" License
211 stars 66 forks source link

Disable AVX512 for people who don't have it #42

Closed kiufta closed 2 years ago

kiufta commented 2 years ago

Please disable AVX512 for people with AMD CPUs.

WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug -flto=auto -march=native -mtune=native -O3 -pipe -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-stringop-overflow -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c /usr/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_knl.c -o /tmp/tmpjq6oin6e/usr/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_knl.o -MMD -MF /tmp/tmpjq6oin6e/usr/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_knl.o.d -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512er -mavx512pf -Werror) failed with exit status 1 output -> 
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/immintrin.h:51,
                 from /usr/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_knl.c:14:
In function '_mm512_exp2a23_round_pd',
    inlined from 'main' at /usr/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_knl.c:21:17:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/avx512erintrin.h:55:20: error: '__W' is used uninitialized [-Werror=uninitialized]
   55 |   return (__m512d) __builtin_ia32_exp2pd_mask ((__v8df) __A,
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   56 |                                                (__v8df) __W,
      |                                                ~~~~~~~~~~~~~
   57 |                                                (__mmask8) -1, __R);
      |                                                ~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/avx512erintrin.h: In function 'main':
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/avx512erintrin.h:54:11: note: '__W' was declared here
   54 |   __m512d __W;
      |           ^~~
cc1: all warnings being treated as errors

WARN: CCompilerOpt.feature_test[1563] : testing failed
gatagat commented 2 years ago

I am not aware of enforcing AVX-512.

gatagat commented 2 years ago

I can run pip install lap on an AMD CPU without any issues. If applicable, please re-open with more information.

kiufta commented 2 years ago

I can run pip install lap on an AMD CPU without any issues. If applicable, please re-open with more information.

I would never use pip.