Native fused LayerNorm / GELU / softmax / conv1d kernels for the JNI and FFM tiers
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
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- machine-learning, performance
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Kotlin
- Stelle
- 52
- Fork
- 15
- Merge medio
- 1g 8h
- PR unite (30g)
- 37
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SKaiNET-developers/SKaiNET
-
coding good first issue platform size:xs skill:js sub-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SKaiNET-developers/SKaiNET#1232 ·
I maintainer di solito rispondono entro 1 giorno
-
compute-backend dsl/api enhancement size:m skill:kotlin-core skill:numerics
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
SKaiNET-developers/SKaiNET#1343 ·
I maintainer di solito rispondono entro 1 giorno
-
compute-backend dsl/api enhancement size:m skill:kotlin-core skill:numerics
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
SKaiNET-developers/SKaiNET#1342 ·
I maintainer di solito rispondono entro 1 giorno
-
skeep tracking
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
SKaiNET-developers/SKaiNET#1331 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
assessment size:s skill:review sub-issue
Difficoltà 4/5 1-2 giorni Idoneità per principianti 18/100
SKaiNET-developers/SKaiNET#1330 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SKaiNET-developers/SKaiNET
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
callstack/react-native-brownfield#492 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
fix: retain the best partial noise-correction solutionForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
world-federation-of-advertisers/cross-media-measurement#4653 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kabirvashisht4-glitch/Vet#22 ·
-
documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
djazairdev/wilayas#23 ·
I maintainer di solito rispondono entro 1 giorno