blis icon indicating copy to clipboard operation
blis copied to clipboard

fix compilation issue for haswell + gcc 7.3.1 (impossible constraints)

Open springer13 opened this issue 2 years ago • 2 comments

I'm not sure why I'm running into this issue, but gcc 7.3.1 is failing with

gcc -O2 -O3 -fomit-frame-pointer -mavx2 -mfma -mfpmath=sse -march=haswell -Wall -Wno-unused-function -Wfatal-errors -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/haswell -I./frame/3/ -I./frame/1m/ -I./frame/1f/ -I./frame/1/ -I./frame/include -DBLIS_VERSION_STRING=\"0.9.0\" -DBLIS_IS_BUILDING_LIBRARY -fvisibility=hidden -c kernels/haswell/3/bli_gemm_haswell_asm_d8x6.c -o bli_gemm_haswell_asm_d8x6.o 
In file included from kernels/haswell/3/bli_gemm_haswell_asm_d8x6.c:38:0: kernels/haswell/3/bli_gemm_haswell_asm_d8x6.c: In function 'bli_sgemm_haswell_asm_16x6': ./frame/include/bli_x86_asm_macros.h:102:21: error: 'asm' operand has impossible constraints
 #define BEGIN_ASM() __asm__ volatile (
                     ^
./frame/include/bli_x86_asm_macros.h:153:21: note: in expansion of macro 'BEGIN_ASM'
 #define begin_asm() BEGIN_ASM()
                     ^~~~~~~~~
kernels/haswell/3/bli_gemm_haswell_asm_d8x6.c:105:2: note: in expansion of macro 'begin_asm'

Will tests be run automatically or should I run some?

springer13 avatar Nov 17 '22 09:11 springer13

I'm wondering if it would be possible to somehow adjust asm constraints according to the compiler used.

It looks a bit similar to #539 where LLVM seems to prefer registers as in/out instead of "m" constraints used by GCC.

xrq-phys avatar Nov 17 '22 12:11 xrq-phys

@springer13 @xrq-phys Sorry that I'm just now seeing this.

I'm not familiar enough with the non-memory constraints of extended inline assembly syntax to comment here without further research. What does the g constraint convey?

fgvanzee avatar Jan 11 '23 03:01 fgvanzee