[Engine] strata-ink2: wrong logits in about 1 of 10 runs with the decode graph and the expert offload together (HIP, Windows)
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- backend, performance
Direzione di ricerca
Start with scripts/tokpath_repeat.sh and the logs token_path_hunt.txt and token_path_probe.txt to reproduce and inspect the failing decode runs. Compare decode graph plus expert offload against each mode disabled, then investigate the issue’s suspected table or pool data visibility across kernels and the named HIP graph switches. Done when repeated runs no longer produce incorrect logits with both features enabled.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On an RX 7900 XTX (Windows 11, ROCm 10.2.0), strata-ink2 from feat/inkling2 (bb137fd8, plus the Windows build fix in baptisterajaut/Strata#17) sometimes gives wrong logits on the decode path. When it happens, the run is wrong from the first token on: KL 0.03 against a normal run at token 0, and top-1 agreement 8% over 100 tokens. The values stay finite, and the engine log looks exactly like a good run's.
How I see it
--kv i8r --tc 1 --vram-reserve-mib 1500 --chunk 0, 100 tokens, --dump-logits, compared byte for byte with a normal run (99% of the experts on the card):
| decode graph | expert offload | runs | wrong |
|---|---|---|---|
| on | on | 29 | 3 |
off (--graph 0) |
on | 40 | 0 |
| on | off (no --vram-reserve-mib) |
40 | 0 |
Both "off" modes give logits byte-identical to a normal run. The prompt path (--chunk 512) matched in 11 of 11 runs. So it seems to need the decode graph and the offload together. I haven't found the mechanism.
Ruled out: upload_embed copies the embedding with cudaMemcpyAsync from a vector that is freed right after, and HIP can read it late. That is a real race (fixed in baptisterajaut/Strata#23), but a build with that fix also gave a wrong run.
A guess, not checked: with the offload, k_cache_plan rewrites the expert tables (tabA / tabB) and k_fetch fills pool slots during the token, and the GEMVs read them in the next kernels. If HIP's optimized graph path launched those kernels without invalidating the per-CU caches, a GEMV could read a stale table entry or stale slot data. The runtime has switches I didn't try: DEBUG_HIP_GRAPH_CLASSIC_PATH, DEBUG_CLR_AQL_BARRIER_OPT.
Workaround: --graph 0. In this 100-token test it cost nothing measurable (1,158 ms median per 100 tokens, about 1,160 with the graph). I didn't measure it at long contexts.
Logs: token_path_hunt.txt and token_path_probe.txt; script: scripts/tokpath_repeat.sh. Not tested: Linux, CUDA, other cards.
- Lingua principale
- C++
- Stelle
- 11.6k
- Fork
- 1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 Niko1221/Strata
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Niko1221/Strata#7365 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chipAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 4 giorni
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Niko1221/Strata#7276 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Niko1221/Strata#7230 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di Niko1221/Strata
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Quantinuum/tket#2282 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
I maintainer di solito rispondono entro 10 giorni
-
Server crashes when a mob dies to poisonForse già presa @joelstiller l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DarkCastleMUD/DarkCastle#305 ·
I maintainer di solito rispondono entro 1 giorno
-
[Issue]: RAS status report lists the wrong pids for an outlier nodeForse già presa @bhargavchintam l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni