Repository navigation
[Refactor] custom-ar-v2: Single-word push epoch and consume-style pull semaphores - #48217
DarkSharpness wants to merge 6 commits into
Conversation
|
/rerun-test test/registered/kernels/ops/communication/test_custom_all_reduce.py test/registered/kernels/ops/communication/test_all_reduce_residual_norm.py test/registered/kernels/ops/communication/test_collectives.py test/registered/kernels/ops/communication/test_beam_all_reduce.py test/registered/kernels/ops/communication/test_tp_qknorm.py test/registered/kernels/ops/communication/test_muse_spark_moe_finalize_all_reduce.py test/registered/kernels/ops/communication/test_ar_fusion.py test/registered/unit/distributed/test_custom_all_reduce_v2_capability.py |
|
@BBuf for review |
|
🚀 🚀 🚀 🚀 |
BBuf
left a comment
There was a problem hiding this comment.
[BBuf Review Agent] One thing to fix before this can go in.
|
/rerun-test test/registered/kernels/ops/communication/test_all_reduce_residual_norm.py test/registered/kernels/ops/communication/test_muse_spark_moe_finalize_all_reduce.py test/registered/kernels/ops/communication/test_ar_fusion.py test/registered/kernels/ops/communication/test_beam_all_reduce.py |
|
🚀 🚀 |
|
/rerun-test test/registered/kernels/ops/communication/test_ar_fusion.py |
|
🚀 |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
3 similar comments
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
0fc8ce9 to
0926ab3
Compare
…l semaphores Replace the per-block push phase counters with one u64 EpochCounter committed by every grid participant, and make the pull semaphores consume arrivals (one counter per ordering class), so neither resource is tied to a launch width. Removes the bumper/cleanup blocks and the barrier window state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cluster leader commits for its whole cluster, so the other CTAs (and the leader's own warps) must have read the phase first. Restore the cluster barrier on the no-norm all_reduce_fusion path, add one before the K3 push_norm commit, and restore the CTA barrier before the CuTe DSL commit. Document the rule on EpochCounter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clusters that own a normed row already pass a cluster.sync in the row loop; only the others need ordering, so they arrive right after the phase load and the leader waits before committing, instead of a full cluster.sync on every cluster. Co-Authored-By: Claude Opus 5.5 <[email protected]>
0926ab3 to
3fbd0e6
Compare
|
/rerun-test test/registered/kernels/ops/communication/test_collectives.py test/registered/kernels/ops/communication/test_moe_front_ag.py |
|
🚀 🚀 |
…ombine The communicator header is compiled on ROCm too, so give red_add_relaxed_gpu (u32/u64), atomic_add_relaxed_sys and atomic_add_acquire_sys their __hip_atomic_fetch_add forms. Port the two push/pull users that landed on main since the rebase base: gemma4's ar_fusion to the stateless McBarrier, and dcp_push_combine to the single phase word. Co-Authored-By: Claude Opus 5.5 <[email protected]>
BBuf
left a comment
There was a problem hiding this comment.
[BBuf Review Agent] One thing to fix before this can go in.
|
/rerun-test test/registered/kernels/ops/communication/test_collectives.py test/registered/kernels/ops/communication/test_moe_front_ag.py test/registered/kernels/ops/attention/test_dcp_push_combine.py test/registered/kernels/ops/communication/test_gemma4_ar_fusion.py |
|
🚀 🚀 🚀 |
gemm_ag_supported no longer requires two push blocks: every push kernel shares the plane's single phase word, so the grid is not bound to a counter array. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
/rerun-test test/registered/kernels/ops/communication/test_gemma4_ar_fusion.py |
|
🚀 |
@BBuf FYI on the |
What
Simplifies the synchronization state shared by the CustomAllReduceV2 push/pull planes and every kernel that borrows them, so that resource sizes no longer depend on launch widths.
EpochCounter. Each grid participant does one fire-and-forgetred.addat exit (participant 0 adds2^32 - (N - 1), the others add 1), so any grid size advances the phase exactly once. All "bumper" / cleanup blocks that flipped unused counters are removed, and push kernels may launch any grid size.Semaphorekeeps one arrival counter per ordering class (relaxed / release). The owner takesworld_sizearrivals with oneatom.add(-W)and spins only while the balance is negative.Barrier/McBarrierare stateless (num_arrives, the window reservation andMcBarrier::arrive_atare gone), and the semaphore index defaults toblockIdx.x. Separate counters make the release/acquire barrier well-defined under the PTX memory model even when a peer's next-round arrival lands first.PushPlanetakes adefault_blockslaunch width;PullPlanehascapacity(allocated asmax(num_sm, num_pull_blocks)) anddefault_blocks.Validation
REDG.E.ADD.64.STRONG.GPU, the pull barrier isATOMG+ optional poll with no constructor-time atomic.🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ✅ Run #42362024893
Latest PR Test (Extra): ❌ Run #42362025135
Latest PR Test (AMD ROCm 10): ✅ Run #42362024923
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: