Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

arm64 SME2 (Apple M4): SGEMM/DGEMM well below the hardware, level-3 routines on NEON, M4 Pro not detected

Aperta
#6,073 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Start with the SME [s/d]GEMM kernels, the level-3 driver, and getarch, using the references to issues #5971 and #5011 for existing context. Reproduce the reported M4 Pro benchmarks and detection behavior; done means M4 Pro is recognized and the affected level-3 routines use appropriate SME paths with performance approaching the stated hardware and Accelerate comparisons.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On Apple M4 (SME2, 512-bit streaming vector length), develop (63d7f22) leaves most of the SME unit unused:

  • SGEMM/DGEMM: sme_[sd]gemm_kernel (#5971) runs at about 0.6x of Accelerate on one thread, and on one
    thread whatever the thread count, while the M4 Pro has two SME units (one per performance cluster).
    fp32 geometric means over the 24 workloads of Deng et al. (arXiv:2512.21473), row-major / column-major, GFLOPS:

    Accelerate develop
    SGEMM, 1 thread 1127 / 1185 707 / 766
    SGEMM, default threads 2364 / 2445 702 / 766
    DGEMM, 1 thread 321 / 344 275 / 283
  • SYMM, SYRK, SYR2K, TRMM, TRSM run through the level-3 driver on NEON kernels: about 100-115 GFLOPS in fp32
    and 53-58 in fp64 at n = 1024 on one thread, against 791-1758 and 265-433 for Accelerate. The SME kernel cannot
    simply be plugged into the driver, because SYMM/TRMM share the GEMM unroll sizes (where #5011 stopped).

  • Detection: the M4 Pro (hw.cpufamily 0x17d5b93a) is not recognised by getarch, so a build without
    TARGET falls back to ARMV8 without any SME code.

Measured on an M4 Pro, macOS 27, Apple clang 21; harness and raw data in https://github.com/tesch1/mtgemm-a.

Prepared with AI coding assistance.

Lingua principale
C
Stelle
7.6k
Fork
1.7k
Merge medio
1g 7h
PR unite (30g)
54

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenMathLib/OpenBLAS

Tutte le issue di OpenMathLib/OpenBLAS

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.