Repository navigation
[Triton/Gluon] [fix] moe_gemm_mxfp8: zero-init output, graph-safe routing, skip redundant copy #5831
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
Closed
Closed
[Triton/Gluon] [fix] moe_gemm_mxfp8: zero-init output, graph-safe routing, skip redundant copy #5831
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3aa7ca8
[fix] moe_gemm_mxfp8: zero-init output, graph-safe routing, skip redu…
akii96 609bc4b
[fix] moe_gemm_mxfp8: tests for the three wrapper fixes, plus Hy4 ben…
akii96 8606ff8
[fix] moe_gemm_mxfp8: move the NK->KN conversion into utils/shuffle.py
akii96 ac877cf
[fix] moe_gemm_mxfp8: trim the new tests to keep CI short
akii96 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,16 @@ | |
| from aiter.ops.triton.moe.moe_gemm_mxfp8 import moe_gemm_mxfp8 | ||
| from op_tests.op_benchmarks.triton.utils.benchmark_utils import get_caller_name_no_ext | ||
|
|
||
| # DSv4-style MoE shapes: (E, N, K, tokens_per_expert) | ||
| # MoE shapes: (E, N, K, tokens_per_expert) | ||
| _SHAPES = [ | ||
| (8, 7168, 2048, 64, "DSv4-decode"), | ||
| (8, 7168, 2048, 256, "DSv4-prefill-small"), | ||
| (8, 7168, 2048, 1024, "DSv4-prefill-large"), | ||
| (64, 2048, 7168, 64, "DSv4-E64-decode"), | ||
| # Hy4-preview-FP8 gemm1 as sharded at TP=8: 256 experts / 8 ranks, | ||
| # hidden 6144, moe_intermediate 2048. | ||
| (32, 2048, 6144, 1, "Hy4-TP8-decode"), | ||
| (32, 2048, 6144, 16, "Hy4-TP8-prefill"), | ||
|
Comment on lines
+24
to
+27
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above! |
||
| ] | ||
| _QBS = 32 | ||
|
|
||
|
|
||
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.
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.
Correct that the write is unmodelled, but it is bounded and small. The governing ratio is output bytes over weight bytes,
2T/(E*K); I swept it past any real model, on gfx942:2T/(E*K)It cannot run away: as the output grows relative to the weights, the GEMM writes those same bytes anyway. Skipping it conditionally needs
sum(group_sizes)on the host, which is the.item()sync this PR removes for CUDA-graph capture. Happy to double the output term inmemor relabel as logical bandwidth if we prefer the strict accounting.