Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

springer13
Copy link

@springer13 springer13 commented Nov 17, 2022

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?

 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'
@xrq-phys
Copy link
Collaborator

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.

@springer13 springer13 changed the title fix compilation issue for haswell + gcc 7.3.0 (impossible constraints) fix compilation issue for haswell + gcc 7.3.1 (impossible constraints) Nov 17, 2022
@fgvanzee
Copy link
Member

@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?

@devinamatthews devinamatthews self-assigned this Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants