OpenBLAS: Failed to build OpenBLAS on skylake-x target.

I can’t build OpenBLAS with gcc-10.0.1 . This happened just recently (after thursday). and I don’t know if it is bug with gcc or openblas.

In file included from /OpenBLAS/kernel/x86_64/sgemm_kernel_16x4_skylakex_2.c:380,
                 from /OpenBLAS/build/kernel/CMakeFiles/sgemm_kernel.c:7:
/OpenBLAS/kernel/x86_64/sgemm_direct_skylakex.c: In function 'sgemm_kernel_direct':
/OpenBLAS/kernel/x86_64/sgemm_direct_skylakex.c:16:40: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
   16 | #define DECLARE_RESULT_512(N,M) __m512 result##N##M = _mm512_setzero_ps()
      |                                        ^~~~~~
/OpenBLAS/kernel/x86_64/sgemm_direct_skylakex.c:162:4: note: in expansion of macro 'DECLARE_RESULT_256'
  162 |    DECLARE_RESULT_256(0, 0);
      |    ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/lib/gcc/x86_64-linux-gnu/10.0.1/include/immintrin.h:55,
                 from /OpenBLAS/kernel/x86_64/sgemm_kernel_16x4_skylakex_2.c:379,
                 from /OpenBLAS/build/kernel/CMakeFiles/sgemm_kernel.c:7:
/usr/local/lib/gcc/x86_64-linux-gnu/10.0.1/include/avx512fintrin.h:310:1: error: inlining failed in call to 'always_inline' '_mm512_setzero_ps': target specific option mismatch
  310 | _mm512_setzero_ps (void)
      | ^~~~~~~~~~~~~~~~~
In file included from /OpenBLAS/kernel/x86_64/sgemm_kernel_16x4_skylakex_2.c:380,
                 from /OpenBLAS/build/kernel/CMakeFiles/sgemm_kernel.c:7:
/OpenBLAS/kernel/x86_64/sgemm_direct_skylakex.c:16:55: note: called from here
   16 | #define DECLARE_RESULT_512(N,M) __m512 result##N##M = _mm512_setzero_ps()
      |                                                       ^~~~~~~~~~~~~~~~~~~

this is just a part of the error messages that I got.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Ah sorry, this is a defect in the cmake setup and I was always testing with plain gmake. The file cmake/cc.cmake needs adding

if (${CORE} STREQUAL "SKYLAKEX")
  set (CCOMMON_OPT = "${CCOMMON_OPT} -march=skylake-avx512")
endif ()

I’ll push a PR for this in a minute