[AMD] Add basics to allow bypass LDS for dot RHS#5350
Merged
antiagainst merged 16 commits intotriton-lang:mainfrom Jan 23, 2025
Merged
[AMD] Add basics to allow bypass LDS for dot RHS#5350antiagainst merged 16 commits intotriton-lang:mainfrom
antiagainst merged 16 commits intotriton-lang:mainfrom
Conversation
antiagainst
requested changes
Dec 5, 2024
antiagainst
reviewed
Dec 5, 2024
036fe75 to
e8369e6
Compare
e8369e6 to
e494441
Compare
bypass_lds_upstream_new
a6bece0 to
3d36fc9
Compare
antiagainst
approved these changes
Jan 22, 2025
pawelszczerbuk
added a commit
to pawelszczerbuk/triton
that referenced
this pull request
Jan 25, 2025
pawelszczerbuk
added a commit
to pawelszczerbuk/triton
that referenced
this pull request
Jan 26, 2025
pawelszczerbuk
added a commit
that referenced
this pull request
Jan 26, 2025
AlexAUT
pushed a commit
to AlexAUT/triton
that referenced
this pull request
Jan 29, 2025
…#5350)" (triton-lang#5708) Reverting, as I have to revert [cec1db5](triton-lang@cec1db5), (which this change relies on) due to regression in internal tests.
makslevental
pushed a commit
to makslevental/triton
that referenced
this pull request
Feb 19, 2025
…#5350)" (triton-lang#5708) Reverting, as I have to revert [cec1db5](triton-lang@cec1db5), (which this change relies on) due to regression in internal tests.
plognjen
pushed a commit
to plognjen/triton
that referenced
this pull request
Mar 21, 2025
…ton-lang#5350)" (triton-lang#5708)" This reverts commit 216385e.
plognjen
pushed a commit
to plognjen/triton
that referenced
this pull request
Mar 24, 2025
…ton-lang#5350)" (triton-lang#5708)" This reverts commit 216385e.
jtang10
pushed a commit
to ROCm/triton
that referenced
this pull request
Jun 27, 2025
…ton-lang#5350)" (triton-lang#5708)" This reverts commit 216385e.
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.
This pull request supersedes #4856.
The AMDBypassLDSForDotOperandPass implements a strategy to bypass using the
Local Data Share (LDS) for one of the operands in an MFMA dot operation.
Under certain conditions, the dot layout of one of the operands allows direct
loading from HBM to VGPRs in the MFMA dot layout, without losing of vectorization of global loads
or increasing the number of global loads due to shared data between threads.
The required conditions are:
K-Major Tensor Layout:
The operand we want to bypass LDS for must be K-major (i.e., row-major for
operand 0 or column-major for operand 1). This supports vectorized global
load instructions, as MFMA instructions require each thread to hold B
operand elements along the K dimension.
kWidth * sizeof(dataType) == 128:
Using the maximum kWidth for a specific data type ensures optimal global
load vectorization (e.g., using global_load_dwordx4 instructions).
Single Warp per CTA Dimension:
Either warpsPerCTA[ndim] == 1 for operand A bypass or warpsPerCTA[mDim] ==
1 for operand B bypass. This guarantees that each tensor element is
handled by exactly one thread, maintaining the same number of global loads
as in the blocked layout (i.e., each element is loaded only once).