Add ARM64 SIMD support for sparse CPU math

オープン
#7,740 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C#
スター
9.4k
フォーク
2k
平均マージ
2日 18時間
マージ済み PR(30日)
64

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/machinelearning のほかの issue

dotnet/machinelearning の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。