You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Triton/Gluon] Add gfx1250 Gluon all-reduce for 4 ranks - #6923
ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm
vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all
All standard extended tests (excludes ci:atom_full)
Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6923 --add-label <label>
One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.
PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.
[Medium] If a peer mapping fails, this function raises without freeing the hipMalloc allocation or closing earlier peer mappings. Add exception cleanup for opened mappings and coordinate release of the owned allocation with peers.
Rollback allocated inboxes and peer mappings on failure
aiter/ops/triton/comms/all_reduce.py:51
If a HIP call or handle exchange fails after hipMalloc, initialization exits without freeing the local inbox or closing peer mappings already opened. Add rollback cleanup for these resources before re-raising the error.
Synchronize ranks before resetting manual counters
The counter reset makes steps 0 and 1 both use bank 1, so a fast rank can overwrite data that a peer still reads for step 0. Synchronize each GPU and then all ranks before each manual counter reset in this loop.
Cover additional hidden sizes and both Gemma modes
The fused tests use only hidden=2048 and gemma=True, so the other accepted warp layouts and the standard RMSNorm branch have no checks. Add cases for hidden sizes such as 256, 1024 and 4096 and both Gemma modes, with a reference for each mode.
This test is outside the wrapper-matched category required by the test layout rule. Move it to op_tests/triton_tests/comms/test_all_reduce.py, add the package initializer, and update the multi-GPU runner so it still runs on four GPUs.
The graph test uses unchanged inputs and checks only the last replay, so stale results from an earlier replay can pass. Change the inputs and references before each replay, then check each replay's results.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The benchmark underallocates inbox storage for single-token inputs, and stale hidden-size metadata can cause valid newly allocated states to fail assertions.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Stale _HIDDEN entries can incorrectly reject new states after tensor-address reuse, and the single-token benchmark allocates insufficient inbox capacity, causing the wrapper’s capacity check to fail.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The stale _HIDDEN cache can reject valid tensor states after address reuse, while the fused benchmark can fail on one-token inputs or report unfused execution as fused.
all_reduce_rmsnorm becomes all_reduce_rmsnorm_per_token_quant, and its test
test_all_reduce_rmsnorm_per_token_quant.py. The old name is also that of the
HIP aiter.all_reduce_rmsnorm, and unlike all_reduce_rmsnorm_quant (ROCm#6923) the
op gives one scale a row, takes any hidden that is a multiple of 8 and uses the
inboxes of the plain all-reduce.
_use_gluon_ar_norm reads comm.gluon_ar_norm, which the communicator always
sets, and the communicator passes quant, the group and the inboxes by keyword.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…launch
The all_reduce_rmsnorm epilogue of #7396, on main and without #7082. The
plain Gluon all-reduce (_all_reduce_kernel, set up on TP4 with
AITER_GLUON_FUSED_AR=1) gains an optional epilogue: residual add, RMSNorm
and optionally the per-token FP8 quant, so the call is one launch. Any
hidden that is a multiple of 8 up to 24576 works (norm_waves). At hidden
6144 the outputs are bit for bit those of the same all-reduce followed by
add_rmsnorm (and the per-token quant of its bf16 out); other sizes are
within 1 bf16 ulp or 1 FP8 code of an fp32 reference. Without the
epilogue the kernel is unchanged.
CudaCommunicator, TP4, bf16 in: all_reduce_rmsnorm takes calls up to the
4 MiB of the plain all-reduce, but only up to _GLUON_AR_NORM_MAX_TOKENS
(128) rows where the Lamport one-shot could take them, as Lamport is
faster past that. The #6923 Gluon AR + RMSNorm keeps its bf16 sizes
(power-of-2 hidden), and emit_bf16 stays on Lamport.
AITER_GLUON_AR_NORM=0 turns the new path off.
TP4 MI455X, HIP graph replay, slowest rank, hidden 6144, per call
(M1 / M16 / M64 / M128), against the Lamport kernels:
FP8 7.58 / 8.70 / 10.01 / 13.29 -> 5.74 / 6.68 / 8.09 / 11.42 us,
bf16 6.74 / 7.54 / 8.85 / 11.94 -> 5.54 / 6.24 / 7.72 / 11.10 us.
Part of wuhuikx/LLM-Booster#393.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e0fe5ee)
Conflict: aiter/dist/device_communicators/communicator_cuda.py, the same
qr_comm line as in the previous commit; kept.
all_reduce_rmsnorm becomes all_reduce_rmsnorm_per_token_quant, and its test
test_all_reduce_rmsnorm_per_token_quant.py. The old name is also that of the
HIP aiter.all_reduce_rmsnorm, and unlike all_reduce_rmsnorm_quant (#6923) the
op gives one scale a row, takes any hidden that is a multiple of 8 and uses the
inboxes of the plain all-reduce.
_use_gluon_ar_norm reads comm.gluon_ar_norm, which the communicator always
sets, and the communicator passes quant, the group and the inboxes by keyword.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit ef3f765)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
RCCL takes 7.3 us and the aiter custom all-reduce (CAR) takes 6.9 us. This PR adds a Gluon all-reduce for 4 ranks. It takes 4.8 us at 8 toks.
Benchmark: