[Engine] strata-ink2: wrong logits in about 1 of 10 runs with the decode graph and the expert offload together (HIP, Windows)
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 11.6k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Niko1221/Strata
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Niko1221/Strata#7365 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chipĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#7276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Niko1221/Strata#7230 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của Niko1221/Strata
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Quantinuum/tket#2282 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Server crashes when a mob dies to poisonCó thể đã có người làm @joelstiller đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DarkCastleMUD/DarkCastle#305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Issue]: RAS status report lists the wrong pids for an outlier nodeCó thể đã có người làm @bhargavchintam đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày