Add ARM64 SIMD support for sparse CPU math

Aperta
#7,740 1 commento 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
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Start in src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs at DotProductSparse (lines 397-425) and indexed AddScale (lines 197-225), then inspect the existing x86 optimized paths and scalar fallback. Investigate ARM64 SIMD options and benchmark different entry counts and index layouts, including tails. Done means beneficial ARM64 paths preserve other paths and fallback behavior, with correctness, intrinsics-disabled, L-BFGS, save/load, and prediction validation.

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

Descrizione

area-Core enhancement tenet-performance

Is your feature request related to a problem? Please describe.
CpuMathUtils.DotProductSparse and indexed AddScale currently use scalar loops on ARM64. Their optimized paths depend on SSE/AVX. These operations are used in sparse L-BFGS training and linear-model prediction.

Describe the solution you'd like
Investigate ARM64 SIMD implementations for these two operations. Preserve the existing x86 paths and scalar fallback. Enable the new paths only where benchmarks show a benefit.

Validation should cover:

  • Different stored-entry counts and index layouts, including short inputs and scalar tails.
  • Correctness against scalar reference results, with hardware intrinsics enabled and disabled.
  • L-BFGS training, model save/load, and prediction.

Describe alternatives you've considered
Retain scalar loops where SIMD does not improve performance, especially for short inputs. Dense TensorPrimitives operations are not a direct replacement for indexed sparse math.

Additional context
Related: #6875 migrated dense operations to TensorPrimitives but left these sparse operations unchanged.

Relevant source: DotProductSparse and indexed AddScale.

Lingua principale
C#
Stelle
9.4k
Fork
2k
Merge medio
2g 18h
PR unite (30g)
64

Preparare l'ambiente

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 dotnet/machinelearning

Tutte le issue di dotnet/machinelearning

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.