Repository navigation
[Bugfix] Fix IPC publication ordering in custom all-reduce - #4294
Fangzhou-Ai wants to merge 1 commit into
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Use system-scoped release/acquire synchronization when publishing eager input copies and intermediate writes to peer ranks. Keep final read-completion barriers relaxed because they do not publish output data. Add a TP8 stress test that repeatedly reuses eager fixed buffers and graph-registered input storage under rotating rank skew. Co-authored-by: OpenAI Codex <[email protected]> Signed-off-by: Fangzhou Ai <[email protected]>
|
Hi @TennyWang1223 Thanks for your comments. I agree that we should not touch gfx1250 file as it's not tested. The IPC bug was exposed to me with this #4269 This is a hybrid-precision kernels fusing FP8 shared expert and mxfp4 routed experts for DSV4. I will further dig into this issue to check if it's indeed a correct fix. |
036f04f to
dc528ea
Compare
|
Closing this PR after the follow-up A/B investigation. The high-concurrency GPU fault that motivated this change reproduces on the baseline stack with official AITER v0.1.16.post3, the pre-FSE vLLM parent, FSE absent, and custom all-reduce disabled (PYNCCL). The first 64-request wave completes and the second wave faults. Therefore #4294 is neither required for nor demonstrated to fix that failure, and its regression test does not establish a main-branch defect. We will make #4269 self-contained and keep its FSE validation separate from this pre-existing baseline issue. |


Summary
Root cause
The eager path copies input into an IPC-registered fixed buffer immediately before launching the collective. The ready flag was system-scoped but relaxed, and peers polled it with device scope. That did not establish a system-scoped happens-before edge from the producer copy to peer buffer reads. The same gap existed for intermediate writes consumed after a non-final barrier.
Duplicate-work check
I reviewed #4082 and #4084. Those changes protect buffer lifetime after peer reads by adding terminal synchronization or retaining caller tensors. This PR instead publishes data before peer reads. It intentionally excludes their terminal-barrier changes, so the fixes are complementary rather than duplicate. Searches for custom all-reduce IPC publication/order fixes found no other open PR.
Validation
The original validation below ran on an 8x gfx950 host at
maincommitdedc19d32bb31ec134ad0388f878e4cd7a83af16. After rebasing, the TP8 ordering stress was rerun for 100 iterations on currentmaincommit632367677a6a7fc7a329262775f0a74e6eb8f78dand passed on all ranks. The other results below predate the rebase.Passed on all eight ranks, including graph capture/replay. This is a stress regression guard rather than a deterministic reproducer; an unpatched-main 20-iteration control also completed.
The fused all-reduce/RMS integration sweep passed 11,200/11,200 comparisons across M=1,4,8,16,32,64,4096 (100 iterations each), with maximum absolute error 0.125. A graph-free DeepSeek-V4-Pro GSM8K run completed 1,319 samples at 95.906% strict / 95.830% flexible accuracy; its server handled 1,351 successful HTTP responses with no GPU fault.
The stock TP8 graph benchmark was also run on main and this patch:
(2, 7168)(128, 8192)Static checks:
The gfx1250 helper is intentionally unchanged because no gfx1250 hardware validation was available and that path is being reworked.
AI assistance
OpenAI Codex was used to audit related PRs, prepare the patch and regression test, run validation, and draft this description. The human submitter is responsible for reviewing every changed line and defending the change end-to-end.