Repository navigation
feat(rccl): TDM async-to-LDS path for LL128 user buffers on gfx1250 #12375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mustafabar
wants to merge
24
commits into
develop
Choose a base branch
from
users/mustafabar/tdm_ll128_combined
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+576
−7
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7815462
feat(rccl): TDM async-to-LDS path for LL128 user buffers on gfx1250
mustafabar 2766411
Adjust the comment text for accuracy
mustafabar 69f87c0
feat(rccl): gate LL128 TDM behind build and runtime opt-in
mustafabar 6cf3339
refactor(rccl): drop the TDM_LL128 build flag
mustafabar 5a639d1
feat(rccl): gate LL128 TDM at build time via --enable-tdm-prim-ll128
mustafabar beec560
docs(rccl): document --enable-tdm-prim-ll128
mustafabar 6f95073
test(rccl): add gfx1250 TDM LL128 test-runner config
mustafabar 1d560ab
fix(rccl): drain the staging window before tdmLoadBegin returns
mustafabar 2d67e17
fix(rccl): address review on the LL128 TDM path
mustafabar 76f8f89
test(rccl): replace unreachable Scatter with Reduce filter
Copilot 4ed89d0
feat(rccl): add a runtime opt-in for the LL128 TDM path
mustafabar 56c6e42
docs(rccl): record what the LL128 TDM runtime gate actually costs
mustafabar dd6a47b
feat(rccl): move the LL128 TDM path onto the tensor data mover
mustafabar b5dba58
docs(rccl): update the LL128 TDM entry for the tensor-mover path
mustafabar abee66b
test(rccl): turn the TDM path on in its own validation config
mustafabar a15bbb1
fix(rccl): fence lane LDS traffic against the mover's window access
mustafabar 1f1ba9b
fix(rccl): drop the LL128 TDM source-load leg, keep the destination s…
mustafabar 2f15b7c
Clean up comments in ll128Tdm.h
mustafabar 13878e6
refactor(rccl): factor the LL128 slot-index formula into ll128Layout.h
mustafabar a6c9a8b
test(rccl): add LL128 TDM store-leg differential tests
mustafabar 65e90ad
test(rccl): wire the LL128 TDM differential tests into the validation…
mustafabar 34396de
fix(rccl): drain the TDM store before loadRegsBegin reuses the scratch
mustafabar 993dcec
docs(rccl): document RCCL_TDM_LL128_ENABLE
mustafabar 8a847dd
Merge branch 'develop' into users/mustafabar/tdm_ll128_combined
mustafabar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /************************************************************************* | ||
| * Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. | ||
| * | ||
| * See LICENSE.txt for license information | ||
| ************************************************************************/ | ||
|
|
||
| #ifndef LL128_LAYOUT_H_ | ||
| #define LL128_LAYOUT_H_ | ||
|
|
||
| #include <hip/hip_runtime.h> | ||
|
|
||
| // Dense 16-byte-chunk index for register pair `g` of lane `wid`. The LL128 wire | ||
| // format interleaves a flag word into every line, so the payload slots are not | ||
| // contiguous in register order; this compensates for those holes to keep the | ||
| // packed user buffer gap-free and coalesced. | ||
| // | ||
| // Templated on the line geometry rather than reading NCCL_LL128_LINEELEMS / | ||
| // WARP_SIZE directly so it stays usable from host code: the unit tests compute | ||
| // the expected layout on the CPU, and the TDM store leg's correctness is | ||
| // precisely the claim that these indices densely pack [0, DataBytes). | ||
| template <int LineElems, int WarpSz> | ||
| __host__ __device__ __forceinline__ constexpr int ll128SlotIx(int g, int wid) { | ||
| constexpr int LineSkip = 2 * WarpSz / LineElems; | ||
| return g * WarpSz - LineSkip * (g / 2) + wid - (g % 2) * (wid / (LineElems / 2)); | ||
| } | ||
|
|
||
| #endif // LL128_LAYOUT_H_ |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low
The 8
#if TDM_LL128_ONregions in this file (247, 253, 315, 333, 493, 508, 513, 530) wrap 8 one-line payloads in 16 preprocessor lines, in a file you want to keep close to upstream. Moving one#if/#elseinto ll128Tdm.h, withtdmLoadBegin/tdmStoreRegsreturning false, an emptytdmDrain()and atdmSetLoadAllowed(bool), turns all 8 call sites into plain calls the compiler folds away and drops about 14 of the 33 lines added here. The include at line 9 is already unconditional, soASYNC_COPY_SUPPORTEDstays defined either way.