Skip to content

Fix FlashInfer A2A dispatcher during CUDA graph capture - #29461

Merged
merrymercy merged 2 commits into
mainfrom
lmzheng/fix-flashinfer-a2a
Jun 28, 2026
Merged

merrymercy merged 2 commits into
mainfrom
lmzheng/fix-flashinfer-a2a

Conversation

@merrymercy

@merrymercy merrymercy commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Skip the EP>1 runtime token count query branch during CUDA graph capture in the FlashInfer MoE A2A dispatcher.
  • The captured graph uses fixed geometry, so querying runtime token counts via NCCL all-gather during capture is incorrect.
  • Gate the branch on not is_graph_capture (combining get_is_capture_mode() and is_in_breakable_cuda_graph()).

Original commits

  • d3abe7396

CI States

Latest PR Test (Base): ✅ Run #28311737180
Latest PR Test (Extra): ❌ Run #28311737102

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@merrymercy

Copy link
Copy Markdown
Contributor Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Jun 26, 2026
…2A dispatcher

During CUDA graph capture, all EP ranks use the same capture batch size,
so x.shape[0] is uniform and safe to use as runtime_max_tokens_per_rank.
Gate the EP>1 branch on `not get_is_capture_mode()` so it only fires
during live inference where EP ranks may have different token counts.

Use get_is_capture_mode() rather than is_in_breakable_cuda_graph() to
avoid regressing breakable graph replay, where EP ranks could select
different graph sizes when require_mlp_tp_gather is False.
@merrymercy
merrymercy force-pushed the lmzheng/fix-flashinfer-a2a branch from 3a7559a to 5c84459 Compare June 28, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant