OpenBLAS icon indicating copy to clipboard operation
OpenBLAS copied to clipboard

cblas_sgemm test fails on Apple M2

Open RossComputerGuy opened this issue 5 months ago • 5 comments

Trying to build OpenBLAS with nix on an Apple M2 and consistently getting the test to fail.

openblas>  ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
openblas>            EXPECTED RESULT   COMPUTED RESULT
openblas>        1       0.00000          0.266733
openblas>  ******* cblas_sgemm  FAILED ON CALL NUMBER:
openblas>    4540: cblas_sgemm ( CblasRowMajor,  CblasNoTrans,  CblasNoTrans,
openblas>                       1,  1,  0, 1.0, A,  2, B,  1, 0.0, C,  2).
openblas> 
openblas>  ******* FATAL ERROR - TESTS ABANDONED *******
openblas> ERROR STOP
openblas> 
openblas> Error termination. Backtrace:
openblas> #0  0x102fc880f
openblas> #1  0x102fc93b7
openblas> #2  0x102fca597
openblas> #3  0x1020dc8e3
openblas> #4  0x102cd155f
openblas> make[1]: *** [Makefile:197: all3] Error 1
openblas> make[1]: *** Waiting for unfinished jobs....

RossComputerGuy avatar Sep 24 '25 16:09 RossComputerGuy

Which version of OpenBLAS, and which compiler please ?

martin-frbg avatar Sep 24 '25 18:09 martin-frbg

v0.3.30 & clang

RossComputerGuy avatar Sep 24 '25 18:09 RossComputerGuy

I only have M1 and M4 available for testing, but I expect the M1 should be a good stand-in for the M2. So far I cannot reproduce this with clang-19.1.7 on Debian (any newer LLVM I will probably have to build from source, as this is a shared machine in the GCC Compile Farm)

martin-frbg avatar Sep 24 '25 19:09 martin-frbg

I see this same issue on an M4 with spack.

paulgessinger avatar Nov 24 '25 15:11 paulgessinger

I don't know if this is related, but I am seeing similar-looking errors with LLVM 19 on arm64 with spack, with the difference that my arm64 is an AWS graviton3 (c7g.16xlarge instance, ubuntu 24.04).

Sbozzolo avatar Dec 04 '25 22:12 Sbozzolo