Add ARM64 SIMD support for sparse CPU math

Abierto
#7,740 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
9.4k
Forks
2k
Merge medio
2 d 18 h
PR fusionados (30 d)
64

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/machinelearning

Todos los issues de dotnet/machinelearning

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.