Panama FP32 matmul: first call in a JVM differs by an ULP from later calls (JIT-dependent reduceLanes order)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- kotlin
- Ambito
- performance
Direzione di ricerca
Start with PanamaVectorMatmulKernel and inspect its FloatVector.reduceLanes(ADD) reduction, then read DirectCpuExecutionContextScheduleTest for the existing warm-up behavior. Reproduce the first-call versus later-call difference on the same context with identical inputs. Done when repeated calls produce consistent results regardless of whether the JVM has compiled the intrinsic.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
On a fresh DirectCpuExecutionContext() the first dense FP32 matmul in a JVM process produces results that differ by 1 ULP (in ~37k of 153k elements for m=300, k=64, n=512) from every later call on the same context with the same inputs. After that first call the results are stable and independent of threading or schedule.
Observed while writing SKEEP-005 parity tests (DirectCpuExecutionContextScheduleTest): probe output
same-ctx twice diff=37355 (first call vs second call)
seq twice diff=0
par-vs-seq diff=0
Likely cause
PanamaVectorMatmulKernel reduces with FloatVector.reduceLanes(ADD), whose lane-reduction order is unspecified and differs between the interpreter/C1 fallback and the C2 intrinsic. The first call runs before the intrinsic is compiled.
Why it matters
- Golden-token parity gates (
*GoldenTokenParityTestin SKaiNET-transformers) assert exact llama.cpp text equality; a warm-up-dependent ULP can flip a greedy argmax. - Any test comparing two contexts must warm up first (the SKEEP-005 tests now do).
Options
- Replace
reduceLaneswith an explicit fixed-order tree reduction (reduceLanesToLong-style) or accumulate into a vector and reduce with a deterministic scalar loop. - Document the property and add a warm-up helper for parity tests.
Not fixed in feature/skeep-005-schedules; the schedule tests warm up before comparing.
- 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 65/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rustyrazorblade/easy-db-lab#1017 ·
I maintainer di solito rispondono entro 1 giorno
-
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