Closed
Description
I encountered this issue at build time while testing #16246 on a Haswell-based CPU supporting AVX2.
This is due to a confirmed bug in GCC that is fixed since GCC 8.4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782
One suggested workaround on Stack Overflow was to pass a number of -ffixed-<reg>
flags to prevent GCC from producing code using the unsupported registers:
-ffixed-xmm16 -ffixed-xmm17 -ffixed-xmm18 -ffixed-xmm19
-ffixed-xmm20 -ffixed-xmm21 -ffixed-xmm22 -ffixed-xmm23
-ffixed-xmm24 -ffixed-xmm25 -ffixed-xmm26 -ffixed-xmm27
-ffixed-xmm28 -ffixed-xmm29 -ffixed-xmm30 -ffixed-xmm31
I found that this workaround worked for me. So a possible workaround in Numpy would be to automatically add these flags to CFLAGS
, at least on Cygwin and GCC < 8.4 (does Numpy's build system have an existing routine to check the compiler version?)
Error message:
numpy/core/src/umath/loops.c.src:3058:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
}
^
numpy/core/src/umath/loops.c.src:3058:1: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
{standard input}: Assembler messages:
{standard input}:9023: Error: invalid register for .seh_savexmm
{standard input}:9025: Error: invalid register for .seh_savexmm
{standard input}:9027: Error: invalid register for .seh_savexmm
... several more similar lines ...
Numpy/Python version information:
1.20.0.dev0+7f7d19d 3.6.8 (default, Feb 14 2019, 22:09:48)
[GCC 7.4.0]
Metadata
Metadata
Assignees
Labels
No labels