error: ‘asm’ operand has impossible constraints
chengguosun opened this issue · comments
hi,
i compiled the latest blis with gcc7.2, but there was an error as shown below:
kernels/haswell/3/bli_gemm_haswell_asm_d6x8.c: In function ‘bli_sgemm_haswell_asm_6x16’:
./frame/include/bli_x86_asm_macros.h:102:21: error: ‘asm’ operand has impossible
#define BEGIN_ASM() asm volatile (
i found this error caused by "attribute((aligned(BLIS_STACK_BUF_ALIGN_SIZE)))" in bli_edge_case_macro_defs.h, if i delete this line, compilation passed.
if i compile blis with gcc8.5, it passes with no errors. so, I think this may be related to compiler optimization.
another problem:
there is "GEMM_UKR_SETUP_CT( s, 16, 6, true );" in bli_gemm_haswell_asm_d8x6.c, Shouldn't it be "GEMM_UKR_SETUP_CT( s, 16, 6, false );"?
another problem:
there is "GEMM_UKR_SETUP_CT( s, 16, 6, true );" in bli_gemm_haswell_asm_d8x6.c, Shouldn't it be "GEMM_UKR_SETUP_CT( s, 16, 6, false );"?
Yes, good catch. This kernel isn't actually used ATM so that slipped through.
Hmmm... the alignment restriction isn't technically necessary for Haswell. I could add another macro for an unaligned buffer although it's a bit hackish.
@chengguosun please test if the linked PR fixes the problem.
@devinamatthews yes, the test passed without any problems, thanks.
@devinamatthews this issue still exists on some skx
CPUs.
Unfortunately, I could not reproduce the issue on my skx
machine and all I have is this log.
Looks like the macros are using alignment for *gemm edge cases in the BLIS version I am using.
Any idea what is wrong?
Does that fork incorporate 7a8e580? If not then you could try just editing GEMM_UKR_SETUP_CT_PRE
to remove the alignment attribute.
Yes, the fork incorporates 7a8e580