Repository navigation
[Bug] Guard FlashInfer CUTLASS MoE against 0-token inputs - #38780
Conversation
|
@BBuf @Fridge003 could you take a look? Small 0-token guard for FlashInfer CUTLASS mxfp4 (fixes #38773). Could you also /tag-and-rerun-ci? |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
TBO + DP attention can produce empty child batches. CUTLASS fused MoE asserts a non-null input_activations pointer, and PyTorch 0-row tensors have data_ptr()==0, which crashes flashinfer_mxfp4. Co-authored-by: Cursor <[email protected]>
71ed0e2 to
11b7cb9
Compare
| @@ -0,0 +1,70 @@ | |||
| """CPU tests for FlashInfer MXFP4 CUTLASS 0-token early return.""" | |||
|
|
|||
There was a problem hiding this comment.
Let's remove this test, because it's a very safe and simpile fix.
There was a problem hiding this comment.
Let's remove this test, because it's a very safe and simpile fix.
removed, thanks for the review!
The guard is a tiny identity early-return; BBuf asked to drop the extra CPU test. Co-authored-by: Cursor <[email protected]>
|
@BBuf CI reds look unrelated to this change. Could you merge or |
TBO + DP attention can produce empty child batches. CUTLASS fused MoE asserts a non-null input_activations pointer, and PyTorch 0-row tensors have data_ptr()==0, which crashes flashinfer_mxfp4.
Motivation
Fixes #38773.
FlashInfer CUTLASS flashinfer_mxfp4 asserts on 0-token MoE batches because empty PyTorch tensors have data_ptr() == 0. DP attention + TBO hits this on idle ranks / bs=1 decode (child_a or idle hidden states are [0, H]). TBO is especially important on communication-bound GPUs such as L20N; this crash currently blocks enabling it together with flashinfer_mxfp4.
Modifications
In
_fused_experts_flashinfer_mxfp4_cutlass, returnStandardCombineInput(hidden_states=x)whenx.shape[0] == 0, before pad / CUTLASS. Same identity early-return asmoe_runner/aiter.pyandmoe_runner/humming.py.Accuracy Tests
N/A. 0-token path is identity; no change to non-empty batches.
Speed Tests and Profiling
Checklist
CI States
Latest PR Test (Base): ❌ Run #35075254113
Latest PR Test (Extra): ❌ Run #35075253797
Latest PR Test (AMD ROCm 10): ❌ Run #35075254187