Skip to content

feat(kernel): add SM120 FlashInfer MXFP4 MoE#645

Open
lucifer1004 wants to merge 4 commits into
lightseekorg:mainfrom
lucifer1004:feat/sm120-mxfp4-moe
Open

feat(kernel): add SM120 FlashInfer MXFP4 MoE#645
lucifer1004 wants to merge 4 commits into
lightseekorg:mainfrom
lucifer1004:feat/sm120-mxfp4-moe

Conversation

@lucifer1004

Copy link
Copy Markdown
Contributor

Summary

  • register a FlashInfer CUTLASS MXFP8-activation/MXFP4-weight MoE path for NVIDIA SM120 and SM121
  • convert TokenSpeed checkpoint weights, scales, biases, and SwiGLU parameters to the layout expected by FlashInfer
  • preserve TokenSpeed precomputed routing and expert/tensor parallel metadata
  • cover SM120 selection and checkpoint-layout conversion without changing non-NVIDIA registration

Motivation

DeepGEMM mega_moe serves the existing SM100 path, but it is not available on SM120. FlashInfer 0.6.13, already pinned by TokenSpeed, provides the corresponding CUTLASS MXFP8 x MXFP4 fused MoE kernel on SM120/SM121.

Impact

flashinfer_cutlass can now satisfy MXFP4, SwiGLU, precomputed-top-k MoE plans on SM120/SM121, including expert-parallel plans. Existing architectures and dependency pins are unchanged.

Validation

  • inferlab run --environment tokenspeed -- pytest tokenspeed/tokenspeed-kernel/test/test_kernel_api_selection.py -q -k mxfp4_cutlass (2 passed)
  • inferlab run --environment tokenspeed -- pytest tokenspeed/tokenspeed-kernel/test/test_runtime_callsite_selection.py -q (7 passed, 14 skipped)
  • SM120 kernel probe with BF16 and FP16 inputs completed with finite outputs
  • prek run --all-files

Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
@lucifer1004 lucifer1004 marked this pull request as ready for review July 11, 2026 11:04
@lucifer1004 lucifer1004 requested review from a team as code owners July 11, 2026 11:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b63f409a4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread tokenspeed-kernel/python/tokenspeed_kernel/ops/moe/flashinfer/cutlass_mxfp4.py Outdated
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2b90b110f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread tokenspeed-kernel/python/tokenspeed_kernel/ops/moe/flashinfer/cutlass_mxfp4.py Outdated
lightseek-bot and others added 2 commits July 11, 2026 12:43
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d34fb6e23d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants