perf(custom-ar): add graph-safe Kimi-K3 dual-input all-reduce - #4
Closed
JohnQinAMD wants to merge 1 commit into
Closed
JohnQinAMD wants to merge 1 commit into
JohnQinAMD wants to merge 1 commit into
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Owner
Author
|
Superseded by DCO-clean, patch-equivalent replacement #26. The replacement adds the required Signed-off-by trailers without force-pushing this reviewed branch; performance, correctness, and accuracy evidence is preserved. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add a one-stage custom-all-reduce path that reduces two contiguous tensors
without first materializing their concatenation. The first input is copied
into AITER's existing registered staging allocation; the second input is
registered once for graph replay. A single kernel reduces the logical
concatenation and writes two independent output tensors.
The public contract passes the staging pointer and capacity explicitly. The
C++ object does not retain implicit "last registered input" state.
Scope and fallback
The fast path requires:
Unsupported inputs return
Nonefrom the high-level capability path so theframework can use its existing collective fallback. Output tensors must be
contiguous, match the corresponding input size and dtype, and must not alias
either input or one another.
gfx1250 explicitly leaves this optional operation unavailable. Existing
single-input all-reduce, all-gather, reduce-scatter, and fused operations are
unchanged.
Performance
MI355X/gfx950, TP8, BF16, routed
[1, 3584]plus shared[1, 7168], CUDAgraph, rotating measurement order:
This is a 1.3263x boundary speedup and projects 0.4081 ms/token across 92
Kimi-K3 MoE layers.
The isolated endpoint checkpoint moved from 47.6439 to 48.0416 decode tok/s,
or +0.835% and 0.1737 ms/token. It did not clear the campaign's independently
declared 48.3 tok/s major-uplift floor, so this PR does not attribute the
subsequent stacked KDA gain to the collective.
Those performance results were collected before the final API-only hardening
that made the staging pointer explicit. The device kernel is unchanged, and
the cleaned branch passed the exact TP8 correctness harness, but its endpoint
performance rebaseline is still pending.
Correctness and validation
staging contract;
8 passed;changed-input replay, input immutability, independent outputs, and all eight
ranks passed;
and remains inside the declared BF16 envelope versus RCCL;
git diff --checkpassed.
Branch
4a1cc773f3perf/kimi-k3-dual-input-allreduce861bc77230ac989e4c74d4aa8acf3a32d5cccbc0Companion integration
The endpoint integration requires the companion vLLM change that exposes a
typed two-tensor collective with concatenate/all-reduce fallback and uses it
from the AMD Kimi-K3 latent-MoE tail. The AITER PR itself contains no
model-specific dispatch.
Disclosure
AI assistance was used for implementation and review. All GPU tests and
measurements reported above were run on the stated MI355X system.