You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_extensions/test_sgemmt.c fails with SME on Apple M4 #5414
Looks like the CBLAS SGEMM got broken recently for (some) row-major inputs( though not directly caused by #5407 ) - #5380 from two weeks ago would seem to be a likely candidate
Probably caused by my overly optimistic attempt to make the new ARMV9 kernel(s) available on the M4 with its unique combination of SME without (non-streaming) SVE, without also creating a dedicated "M4" target. The hack I committed is definitely too fragile and could lead to an (empty) non-SME stub getting called instead of the "direct" sgemm kernel.
I have separated ARMV9SME and a new VORTEXM4 target in a local fork now, but the main issue probably is/was fairly trivial - the inadvertent use of register x18 in sgemm_direct_sme1_2VLx2VL.S , which happens to be reserved on OSX.
I'll try to find time tomorrow to check what a sensible minimal patch should look like - having an SME-only target that is separate from the less restrictive SVE2+SME "ARMV9SME" might be valuable enough in itself, even if a future M5 cpu happened to come with regular SVE support
can of worms ... the actual problem with the sgemmt test appears to have been a few cpu registers that are documented to get trashed by switching in and out of streaming mode, but were neither saved nor marked as overwritten by the SME kernels
Activity
martin-frbg commentedon Aug 3, 2025
Looks like the CBLAS SGEMM got broken recently for (some) row-major inputs( though not directly caused by #5407 ) - #5380 from two weeks ago would seem to be a likely candidatemartin-frbg commentedon Aug 5, 2025
Probably caused by my overly optimistic attempt to make the new ARMV9 kernel(s) available on the M4 with its unique combination of SME without (non-streaming) SVE, without also creating a dedicated "M4" target. The hack I committed is definitely too fragile and could lead to an (empty) non-SME stub getting called instead of the "direct" sgemm kernel.
martin-frbg commentedon Aug 9, 2025
I have separated ARMV9SME and a new VORTEXM4 target in a local fork now, but the main issue probably is/was fairly trivial - the inadvertent use of register x18 in sgemm_direct_sme1_2VLx2VL.S , which happens to be reserved on OSX.
I'll try to find time tomorrow to check what a sensible minimal patch should look like - having an SME-only target that is separate from the less restrictive SVE2+SME "ARMV9SME" might be valuable enough in itself, even if a future M5 cpu happened to come with regular SVE support
martin-frbg commentedon Aug 23, 2025
can of worms ... the actual problem with the sgemmt test appears to have been a few cpu registers that are documented to get trashed by switching in and out of streaming mode, but were neither saved nor marked as overwritten by the SME kernels
openblas: add patch to disable buggy SME SGEMM kernel
mattip commentedon Oct 17, 2025
Is there a way to get access to an M4 machine to try to help out with this issue?mattip commentedon Oct 17, 2025
@martin-frbg I have access to an M4 machine. Is there anything I can do to help?
martin-frbg commentedon Oct 17, 2025
Thanks, I hope I only need a few hours to finalize #5423 (things I had planned to do last weekend...)
mattip commentedon Jan 15, 2026
Thanks!