Skip to content

[blackwell][draft] sm100: INT4 grouped GEMM Triton kernel (#230) - #238

Draft
Andrewxu313 wants to merge 2 commits into
mainfrom
tairan/blackwell-02-07-int4-grouped-gemm
Draft

[blackwell][draft] sm100: INT4 grouped GEMM Triton kernel (#230)#238
Andrewxu313 wants to merge 2 commits into
mainfrom
tairan/blackwell-02-07-int4-grouped-gemm

Conversation

@Andrewxu313

Copy link
Copy Markdown
Contributor

Closes #230. Part of #204 (Blackwell Phase 2).

Summary

New triton/int4_grouped_gemm.py: INT4xBF16 grouped GEMM with per-group dequant for Kimi K2.5 decode (M<=32 per expert, group_size=128).

Spec

blackwell-kernel-port-v1.md § Sub-task 7

v-tairan Copilot user and others added 2 commits May 30, 2026 09:24
Placeholder commit for draft PR. Implementation tracked in:
batchgen-agent-metadata/batchgen_design/blackwell/blackwell-kernel-port-v1.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pure-Triton port of the Hopper WGMMA INT4 grouped MoE GEMM building block.
Matches the SM90a .cu weight layout: w_packed [N, K//2] uint8 (low nibble =
even-K, high nibble = odd-K), scale [N, K//32] bf16, group_size=32, dequant
(nibble-8)*scale. GEMM via even/odd column split + two bf16 tl.dot with FP32
accumulation (avoids in-kernel nibble interleave).

- batchgen_kernels/triton/int4_grouped_gemm.py: int4_grouped_gemm (single
  expert) + int4_moe_grouped_gemm (per-expert sorted-token dispatch)
- triton/__init__.py: export both

Verified on B200: max_abs_err 0.07-0.18 (rel ~0.3%) vs dequant reference,
well under the 0.5 INT4-noise threshold; grouped path matches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the ci:run Trigger build + GPU regression on H20 label May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run Trigger build + GPU regression on H20

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[blackwell] sm100: INT4 grouped GEMM Triton kernel (K2.5 decode)

1 participant