Skip to content

[DSv4][P5-4] MXFP8×MXFP4 Routed Expert grouped GEMM: wgmma CUDA kernel - #422

Open
Bignonia7 wants to merge 1 commit into
RL-Align:dsv4-p5-devfrom
Bignonia7:dev5
Open

Bignonia7 wants to merge 1 commit into
RL-Align:dsv4-p5-devfrom
Bignonia7:dev5

Conversation

@Bignonia7

@Bignonia7 Bignonia7 commented Sep 17, 2026

Copy link
Copy Markdown

Scope

Adds only csrc/cuda/moe/mxfp8_mxfp4_grouped_gemm_wgmma.cu (forward and backward CuTe WGMMA compute, expert-offset pointer prep, validation, and launch wrappers). Packed E2M1 weights use separate shared-memory staging, then layout-aware writes to the GMMA B tile.

Review status

  • This one-file PR is for implementation review. The target dsv4-p5-dev branch does not yet wire this file into setup.py or csrc/ops.cpp, so this PR is not independently buildable or runnable.
  • The isolated 4a forward CUTLASS type probe was reported to compile; it does not compile or validate this compute file.
  • The compute file has not been compiled with nvcc or run on SM90. Numeric correctness, racecheck, and performance remain unverified.
  • The current compute path uses synchronous global-to-shared loads and static tile-prefix scheduling. It does not yet use the planned packed TMA pipeline or persistent grouped adapter.

Checks

  • Confirmed the PR diff contains exactly one .cu file.
  • git diff --check passes.

Follow-up validation: build with KERNEL_ALIGN_MOE_SM90=1, wire the bindings, run P5 forward/backward comparisons and SM90 racecheck, then benchmark against the strict path.

Summary by CodeRabbit

  • New Features
    • Added a high-performance grouped mixture-of-experts matrix multiplication path for H100 GPUs.
    • Supports MXFP8 activations and MXFP4 weights for forward computations.
    • Supports corresponding backward input-gradient calculations with FP32 accumulation.
    • Added validation for supported shapes, data types, memory layout, alignment, and expert ranges.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 926e8fc0-7701-4e8f-b1f5-25909c8cb880

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@Bignonia7 Bignonia7 changed the title feat(moe): add P5-4 SM90 WGMMA compute core [DSv4][P5-4] MXFP8×MXFP4 Routed Expert grouped GEMM: wgmma CUDA kernel Sep 18, 2026
@Bignonia7
Bignonia7 marked this pull request as ready for review September 18, 2026 01:03
@Bignonia7 Bignonia7 closed this Sep 18, 2026
@Bignonia7 Bignonia7 reopened this Sep 18, 2026
@Bignonia7
Bignonia7 changed the base branch from main to dsv4-p5-dev September 18, 2026 01:10
Signed-off-by: Bignonia7 <326766516+Bignonia7@users.noreply.github.com>
@Flink-ddd Flink-ddd added platform: cuda Specific optimizations or bugs in NVIDIA graphics cards (such as FlashInfer, TMA optimizations) DSv4 deepseek-P5 labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek-P5 DSv4 platform: cuda Specific optimizations or bugs in NVIDIA graphics cards (such as FlashInfer, TMA optimizations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants