Repository navigation
[Triton/Gluon] [Config] Add gfx950 FP4 GEMM configs for Kimi-K3 shared-expert shapes - #6409
Conversation
…apes - Add gemm_afp4wfp4 and gemm_a16wfp4 configs for N=1536 K=7168 and N=7168 K=768. - M buckets that were slower than DEFAULT.json are left out, so they keep the default config.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🟢 Approval recommended
All configurations are valid, complete, correctly named, and preserve default fallback behavior.
0 open findings
What changed in this PR
Adds gfx950 Triton tuning data for Kimi-K3 shared-expert FP4 GEMMs without changing runtime code.
Changes:
- Adds tuned AFP4×WFP4 and A16×WFP4 configurations for two
(N, K)shapes. - Preserves default configurations for untuned larger-M buckets.
| File | Description |
|---|---|
gemm_afp4wfp4/GEMM-AFP4WFP4-N=7168-K=768.json |
Adds AFP4×WFP4 tuning buckets. |
gemm_afp4wfp4/GEMM-AFP4WFP4-N=1536-K=7168.json |
Adds AFP4×WFP4 tuning buckets. |
gemm_a16wfp4/GEMM-A16WFP4-N=7168-K=768.json |
Adds A16×WFP4 tuning buckets. |
gemm_a16wfp4/GEMM-A16WFP4-N=1536-K=7168.json |
Adds A16×WFP4 tuning buckets. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…CPU test
- test_pa_prefill: restore the torch default device after each test; input_helper set it to CUDA and never reset it.
- test_fused_qk_norm_rope_gate_fp8_quant: build the CPU-input case under torch.device("cpu") so it ignores leaked defaults.
- Fixes the order-dependent failure of the rejects_cpu_inputs test in Triton Tests (MI35X) shard 7.

Motivation
Kimi-K3 runs its shared-expert FP4 GEMMs on gfx950 at N=1536 K=7168 and N=7168 K=768. Neither shape has a Triton config, so both use
DEFAULT.json. This PR adds tuned configs for them. It contains config data only and no code changes.Technical Details
gemm_afp4wfp4:GEMM-AFP4WFP4-N=1536-K=7168.jsonandGEMM-AFP4WFP4-N=7168-K=768.jsongemm_a16wfp4:GEMM-A16WFP4-N=1536-K=7168.jsonandGEMM-A16WFP4-N=7168-K=768.jsonDEFAULT.jsonare left out, so those M values keep the default config.Test Plan
mainon one MI355X for M=1..8192: the same script on both trees, run back to back, for 2-3 rounds.run_perftest.checkAllclose.Test Result
Setup: MI355X (gfx950), ROCm 7.2, torch 2.11.0+rocm7.2, Triton 3.7.0.
GPU kernel time, this PR vs
main, best of the rounds:gemm_a16wfp4gemm_a16wfp4gemm_afp4wfp4gemm_afp4wfp4main, so those gaps are run-to-run noise.Submission Checklist