Bug#1003165: Is march=native used for anything but probing the compiler?

Gard Spreemann gspr at nonempty.org
Thu Jul 28 09:32:10 BST 2022


Hi,

> I admit I'm not sure at what point / what tool might inject this
> string and I'm also not sure whether the option -march=native is
> really used in the amd64 case.

From my (very limited!) understanding, this is just setuptools(?) trying
out various compiler options. The actual C compiler invocations look
more à la:

 x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/sklearn/ensemble/_hist_gradient_boosting/_bitset.o -Lbuild/temp.linux-x86_64-3.10 -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/sklearn/ensemble/_hist_gradient_boosting/_bitset.cpython-310-x86_64-linux-gnu.so -fopenmp

Moreover, the build finishes with:

 ########### EXT COMPILER OPTIMIZATION ###########
 Platform      : 
   Architecture: x64
   Compiler    : gcc
 
 CPU baseline  : 
   Requested   : 'min'
   Enabled     : SSE SSE2 SSE3
   Flags       : -msse -msse2 -msse3
   Extra checks: none
 
 CPU dispatch  : 
   Requested   : 'max -xop -fma4'
   Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
   Generated   : none
 CCompilerOpt.cache_flush[809] : write cache to path -> /<<PKGBUILDDIR>>/build/temp.linux-x86_64-3.10/ccompiler_opt_cache_ext.py
 
 ########### CLIB COMPILER OPTIMIZATION ###########
 Platform      : 
   Architecture: x64
   Compiler    : gcc
 
 CPU baseline  : 
   Requested   : 'min'
   Enabled     : SSE SSE2 SSE3
   Flags       : -msse -msse2 -msse3
   Extra checks: none
 
 CPU dispatch  : 
   Requested   : 'max -xop -fma4'
   Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
   Generated   : none


... and similarly on armel. I don't know the internal magic of these
tools at all, but it seems superficially plausible that the march=native
invocations are just instances of the compiler being probed.


 -- Gard
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 857 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20220728/72d03673/attachment.sig>


More information about the debian-science-maintainers mailing list