Repository navigation
[Triton/Gluon] [Config] Add gfx1250 A16W16 GEMM configs for Wan2.2 shapes - #6032
Conversation
Tuned GEMM-A16W16 tile configs for the Wan2.2-T2V-A14B DiT projections (dim 5120, FFN 13824, text dim 4096). Without them these shapes fall back to DEFAULT.json (32x64 tiles, NUM_BUFFERS=5). All configs use NUM_BUFFERS=2 and were only accepted if bit-exact against torch and identical across repeated launches. | M, N, K | DEFAULT | tuned | TFLOP/s | | 32400, 5120, 5120 | 7.72 ms | 2.63 ms | 645 | | 32400, 13824, 5120 | 19.98ms | 6.43 ms | 714 | | 32400, 5120, 13824 | 20.40ms | 6.62 ms | 693 | | 512, 5120, 5120 | 126 us | 86 us | 312 | | 512, 5120, 4096 | 96 us | 86 us | 248 | | 32400, 64, 5120 | 153 us | 102 us | 207 |
Dispatch table for the 8 (M, N, K) shapes Wan2.2-T2V-A14B feeds to tgemm at 720x1280, 33 frames, plus M=512 N=5120 K=4096 for the text projection, each timed on both backends. Triton takes the large DiT GEMMs; the M=1 time-embedding shapes (N=5120 with K=256 and K=5120) stay on torch, where Triton is 1.5x to 7.5x slower. Rows are keyed on cu_num=192 (the gfx1250 part this was measured on).
🏷️ 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.
Copilot review overview
🔵 Needs a closer look
Hardware-specific correctness and performance claims require final review against gfx1250 validation results.
Review effort: Balanced
Findings: None
What changed in this PR
Adds gfx1250 tuning and dispatch data for Wan2.2 A16W16 GEMM workloads.
Changes:
- Adds five Gluon shape-specific configurations with deterministic two-buffer pipelines.
- Adds model-specific backend dispatch for Wan2.2 GEMM shapes.
| File | Description |
|---|---|
GEMM-A16W16-N=64-K=5120.json |
Tunes the narrow-output GEMM. |
GEMM-A16W16-N=5120-K=5120.json |
Tunes small and large M buckets. |
GEMM-A16W16-N=5120-K=4096.json |
Tunes projection GEMMs by M bucket. |
GEMM-A16W16-N=5120-K=13824.json |
Tunes the large-K projection. |
GEMM-A16W16-N=13824-K=5120.json |
Tunes the large-N projection. |
wan22_bf16_tuned_gemm.csv |
Selects torch or Triton/Gluon per measured shape. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Config-only; no kernel or Python changes. Two commits:
GEMM-A16W16tile configs for the Wan2.2-T2V-A14B DiT shapes on gfx1250. Without them, these shapes fall back toDEFAULT.json(32x64 tiles,NUM_BUFFERS=5).wan22_bf16_tuned_gemm.csvdispatch table fortgemm. Triton handles the DiT GEMMs; the two M=1 time-embedding shapes stay ontorch, where Triton is 1.5x–7.5x slower.All tile configs use
NUM_BUFFERS=2(see [Triton/Gluon] [Config] Add gfx1250 A16W16 GEMM configs for FLUX.2 shapes #4851 for the determinism concern).Validation
Each config is bit-exact against
torchand gives identical results across repeated launches.End-to-end Wan2.2-T2V-A14B (720x1280, 33 frames, 8 steps, 1x gfx1250), using the companion SGLang: denoising goes from 228.7 s to 64.4 s (3.55x), with bit-identical output video.
Note: the CSV rows are keyed on
cu_num=192.Submission Checklist