Skip to content

[Triton/Gluon] Add Triton A8W8 Per-token Preshuffled GEMM - #6850

Merged
azaidy merged 6 commits into
mainfrom
farlukas/triton-preshuffled-a8w8
Oct 23, 2026
Merged

azaidy merged 6 commits into
mainfrom
farlukas/triton-preshuffled-a8w8

Conversation

@farlukas

@farlukas farlukas commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Add a triton a8w8 per-token preshuffled GEMM kernel.

Test Plan

pytest op_tests/triton_tests/gemm/basic/test_gemm_a8w8.py

Test Result

All tests passed.

Submission Checklist

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6850 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

@farlukas
farlukas marked this pull request as ready for review October 22, 2026 23:59
@farlukas
farlukas requested a review from a team October 22, 2026 23:59
@github-actions github-actions Bot changed the title Add Triton A8W8 Per-token Preshuffled GEMM [Triton/Gluon] Add Triton A8W8 Per-token Preshuffled GEMM Oct 23, 2026
@farlukas
farlukas force-pushed the farlukas/triton-preshuffled-a8w8 branch from fbd6d3e to 050c12e Compare October 23, 2026 00:14
@zufayu
zufayu requested review from a team and k50112113 October 23, 2026 01:02
@Boss2002n
Boss2002n requested a balanced review from Copilot October 23, 2026 01:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Valid shuffled shapes are rejected, some test targets lack required configs, and the preshuffled split-K paths lack coverage.

7 open issues
What changed in this PR

This PR adds Triton support to the existing A8W8 per-token preshuffled GEMM interface, alongside the Gluon implementation.

Changes:

  • Adds a preshuffled Triton kernel with split-K reduction and optional partial-result output.
  • Adds architecture-specific defaults and a gfx950 shape-specific config.
  • Extends tests and benchmarks to select either preshuffled backend.
File Description
op_tests/​triton_tests/​gemm/​basic/​test_gemm_a8w8.py Adds Triton preshuffle test variants.
op_tests/​op_benchmarks/​triton/​bench_gemm_a8w8.py Enables preshuffle benchmarks for both backends.
aiter/​ops/​triton/​gemm/​basic/​gemm_a8w8.py Adds backend selection and preshuffled split-K handling.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​gemm_a8w8_preshuffled/​GEMM-A8W8_PRESHUFFLED-N=2112-K=7168.json Adds shape-specific tuning with split-K.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​gemm_a8w8_preshuffled/​DEFAULT.json Adds gfx950 defaults by M range.
aiter/​ops/​triton/​configs/​gfx942/​triton/​gemm/​gemm_a8w8_preshuffled/​DEFAULT.json Adds gfx942 defaults.
aiter/​ops/​triton/​configs/​gfx1250/​triton/​gemm/​gemm_a8w8_preshuffled/​DEFAULT.json Adds gfx1250 defaults.
aiter/​ops/​triton/​configs/​gfx1201/​triton/​gemm/​gemm_a8w8_preshuffled/​DEFAULT.json Adds gfx1201 defaults.
aiter/​ops/​triton/​configs/​gfx1151/​triton/​gemm/​gemm_a8w8_preshuffled/​DEFAULT.json Adds gfx1151 defaults.
aiter/​ops/​triton/​_triton_kernels/​gemm/​basic/​gemm_a8w8.py Implements the preshuffled kernel and config selection.

Review effort: Balanced

@azaidy azaidy assigned azaidy and unassigned k50112113 Oct 23, 2026

@azaidy azaidy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants