mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #536] [CLOSED] decode_cluster_parity: the graph replays wait for their uploads (the test failed now and then) #2679
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2679
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/536
Author: @sergqwer
Created: 10/2/2026
Status: ❌ Closed
Base:
main← Head:pr/cluster-parity-uploads📝 Commits (1)
2054197decode_cluster_parity: the graph replays wait for their uploads📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
src/kernels/decode_cluster_parity.cpp(+3 -0)📄 Description
decode_cluster_parityfails now and then on its own: a graph replay reports one differing token, from run to run, with no code change.Cause:
run_graph_caseuploads each replay's scores, steps and logits withDev::put, a pageablecudaMemcpyon the legacy stream. It then launches the graph oncs, acudaStreamNonBlockingstream.cudaMemcpycan return once the data is staged, before its DMA has landed.So the captured cluster kernels sometimes read the previous replay's buffers. The one-CTA reference runs later on the same stream, after the copy has landed, and the two disagree. This is the same race 0.1.36 fixed in
prefill_fused_moe_test("the fused test waits for its uploads"). The test's other cases are not affected: the plain cases run on the legacy stream, ordered after the copy, and the timing cases compare nothing.Fix:
cudaDeviceSynchronize()after the uploads, beforecudaGraphLaunch, as in the fused test. Test only; no engine code changes. The engine itself feeds these kernels from kernels on the same stream, not from host uploads, so the cluster kernels' bit-identity holds there.Measured (RTX 5090, Windows 11, CUDA 13.3, driver 617.14; the test built from v0.1.37):
Every failure was a graph replay with one differing token. The QSA top-k cases (434) and the argmax cases (216) passed in all runs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.