Skip to content

[mxfp8 moe training] fallback cuda kernel for when input doesn't meet 2d TMA constraints#3708

Merged
danielvegamyhre merged 1 commit intomainfrom
danielvegamyhre/stack/119
Jan 23, 2026
Merged

[mxfp8 moe training] fallback cuda kernel for when input doesn't meet 2d TMA constraints#3708
danielvegamyhre merged 1 commit intomainfrom
danielvegamyhre/stack/119

Conversation

@danielvegamyhre
Copy link
Copy Markdown
Contributor

@danielvegamyhre danielvegamyhre commented Jan 23, 2026

[mxfp8 moe training] fallback cuda kernel for when input doesn't meet 2d TMA constraints

Context

Tests

  • pytest test/prototype/moe_training/test_kernels.py -v -s -k cuda_mx_block

Benchmarks

input_shape      chunks_per_tb    torch_time_us    triton_time_us    cuda_time_us  triton_speedup    cuda_speedup
-------------  ---------------  ---------------  ----------------  --------------  ----------------  --------------
(131072, 44)                 1          1105.65            123.94           19.46  8.92x             56.83x
(131072, 44)                 4          1101.41            109.57           19.46  10.05x            56.61x
(131072, 44)                 8          1042.5             207.97           19.46  5.01x             53.58x

E2E in Torchtitan on DSV3 16b I see an extra ~3% TPS speedup with single node dp2ep and the mxfp8_wgrad_with_hp + mxfp8 all2all/expert parallel enabled.

danielvegamyhre added a commit that referenced this pull request Jan 23, 2026
… 2d TMA constraints

stack-info: PR: #3708, branch: danielvegamyhre/stack/119
@danielvegamyhre danielvegamyhre force-pushed the danielvegamyhre/stack/119 branch from 41f65d2 to 46532e0 Compare January 23, 2026 05:46
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 23, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3708

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 7 Pending

As of commit 11d5e00 with merge base 28306f0 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 23, 2026
@danielvegamyhre danielvegamyhre added mx moe topic: new feature Use this tag if this PR adds a new feature labels Jan 23, 2026
@danielvegamyhre danielvegamyhre marked this pull request as draft January 23, 2026 05:53
danielvegamyhre added a commit that referenced this pull request Jan 23, 2026
… 2d TMA constraints

stack-info: PR: #3708, branch: danielvegamyhre/stack/119
@danielvegamyhre danielvegamyhre force-pushed the danielvegamyhre/stack/119 branch from 46532e0 to 43cebb1 Compare January 23, 2026 05:53
@danielvegamyhre danielvegamyhre marked this pull request as ready for review January 23, 2026 05:53
@danielvegamyhre danielvegamyhre marked this pull request as draft January 23, 2026 06:08
danielvegamyhre added a commit that referenced this pull request Jan 23, 2026
… 2d TMA constraints

stack-info: PR: #3708, branch: danielvegamyhre/stack/119
@danielvegamyhre danielvegamyhre force-pushed the danielvegamyhre/stack/119 branch from 43cebb1 to 7a25231 Compare January 23, 2026 06:08
@danielvegamyhre danielvegamyhre marked this pull request as ready for review January 23, 2026 06:08
@danielvegamyhre danielvegamyhre marked this pull request as draft January 23, 2026 06:08
@danielvegamyhre danielvegamyhre force-pushed the danielvegamyhre/stack/119 branch from 7a25231 to 6cad436 Compare January 23, 2026 06:08
danielvegamyhre added a commit that referenced this pull request Jan 23, 2026
… 2d TMA constraints

stack-info: PR: #3708, branch: danielvegamyhre/stack/119
@danielvegamyhre danielvegamyhre marked this pull request as ready for review January 23, 2026 06:08
Copy link
Copy Markdown

@slayton58 slayton58 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some merge/rebase cleanup to sort, then LGTM

int chunks_per_tb,
cudaStream_t stream);

<<<<<<< Updated upstream
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove merge detritus :)

… 2d TMA constraints

stack-info: PR: #3708, branch: danielvegamyhre/stack/119
@danielvegamyhre danielvegamyhre marked this pull request as draft January 23, 2026 16:45
@danielvegamyhre danielvegamyhre force-pushed the danielvegamyhre/stack/119 branch from 6cad436 to 11d5e00 Compare January 23, 2026 16:45
@danielvegamyhre danielvegamyhre marked this pull request as ready for review January 23, 2026 16:45
@danielvegamyhre danielvegamyhre merged commit 0cbe590 into main Jan 23, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. moe mx topic: new feature Use this tag if this PR adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants