Native fused LayerNorm / GELU / softmax / conv1d kernels for the JNI and FFM tiers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
Start with the existing matmul kernels in skainet-backend-native-cpu/native/src/, then trace the scalar Kotlin implementations and the JNI and FFM registration patterns. Add on-device parity tests for the four operations, checking the stated precision requirements. Done means the kernels are registered for both tiers and simpleperf measurements compare a whisper-tiny encoder step before and after.
索引モデルが issue の本文から書いたものです。
説明
Context
Companion to the dense FP32 JNI matmul issue. #949 measured that ~83% of Android eager decode time was non-matmul overhead and fixed the boxed per-element paths by hoisting the primitive FloatArray loops into shared code. That closed the boxing problem; the ops are still scalar Kotlin loops on ART, where there is no Vector API.
For a Whisper-class encoder that matters: per layer there are two LayerNorms over [1500,1280], a GELU over [1500,5120], 20 softmaxes over [1500,1500], and the stem is two conv1d layers (k=3, stride 1 and 2) over [128,3000]. skainet-backend-native-cpu/native/src/ contains matmul kernels only.
Scope
- Native C kernels (NEON bodies gated on
__ARM_NEON, scalar fallback) for:layerNorm(fused mean/var/normalize/affine, FP32 accumulation),gelu(tanh approximation and erf variants, matchingFp32reference to 1 ULP where the DSL promises exactness), rowsoftmax(max-subtract, exp, normalize), andconv1d(direct or im2col + the FP32 matmul kernel). - JNI entries +
JniKernelProviderregistrations; FFM bindings on the JVM tier for parity with the existing pattern. - Parity tests against the scalar Kotlin implementations on device.
-
simpleperfbefore/after on a whisper-tiny encoder step, the way #949 did for decode, so the remaining overhead is named.
Acceptance
- Results match the scalar path within 1 ULP (GELU/softmax) or bit-identically (LayerNorm with FP32 accumulation, conv1d).
- Combined with the dense FP32 matmul issue: whisper-tiny encoder ≥ 5× faster than 0.54.0 on a Pixel-class phone.
Related
- #949 — boxed element access on Android (closed; this is the SIMD follow-up)
- #910 — vectorized eager kernels for Kotlin/Native targets (same kernels, different binding)
- 主要言語
- Kotlin
- スター
- 52
- フォーク
- 15
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SKaiNET-developers/SKaiNET のほかの issue
-
coding good first issue size:xs skill:kotlin-core sub-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
SKaiNET-developers/SKaiNET#1323 ·
メンテナーはふだん 1 日以内に返信
-
coding good first issue platform size:xs skill:js sub-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SKaiNET-developers/SKaiNET#1232 ·
メンテナーはふだん 1 日以内に返信
-
skeep tracking
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
SKaiNET-developers/SKaiNET#1331 ·
メンテナーはふだん 1 日以内に返信
-
assessment size:s skill:review sub-issue
難易度 4/5 1〜2日 初心者へのやさしさ 18/100
SKaiNET-developers/SKaiNET#1330 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue size:s skill:docs sub-issue
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
SKaiNET-developers/SKaiNET#1329 ·
メンテナーはふだん 1 日以内に返信
SKaiNET-developers/SKaiNET の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Kotlin/kotlin-lsp#288 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
chrisbanes/haze#1536 ·
メンテナーはふだん 1 日以内に返信
-
Cassiopeia drops the `präsentiert von` credit printed in the event body対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンafk-ok area:data-quality importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
enorm-labs/event-junkie#3166 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rajpreetcodes/Skills_MCP_Server#25 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
com-lihaoyi/mill#7776 ·
メンテナーはふだん 1 日以内に返信