Skip to content

feat(gfx1151): INT8 W8A8 GEMM config + int8 fused-MoE forward + RDNA a8w8 routing - #3917

Merged
valarLip merged 13 commits into
mainfrom
carhuang/gfx1151_int8_gemm_config
Jul 20, 2026
Merged

valarLip merged 13 commits into
mainfrom
carhuang/gfx1151_int8_gemm_config

Conversation

@carlushuang

@carlushuang carlushuang commented Jun 25, 2026 •

Copy link
Copy Markdown
Collaborator

feat(gfx1151): INT8 W8A8 GEMM config + int8 fused-MoE forward + RDNA a8w8 routing

Three gfx1151 (RDNA3.5) INT8 W8A8 enablers where aiter's fp8/int4 MoE and CK a8w8 kernels are unavailable: (1) a generic gfx1151 INT8 W8A8 GEMM default config (get_gemm_config() hard-asserts on the missing per-arch file, crashing every INT8 GEMM at load); (2) fused_moe_int8_smoothquant, the INT8 W8A8 smoothquant MoE forward fused_moe lacked (routing→int8 quant→gemm1+SiLU→int8 quant→gemm2+scatter), so consumers need no out-of-tree orchestration; (3) gemm_a8w8 routes to Triton on non-gfx9 (the @torch_compile_guard dispatcher hard-called gfx9-only CK), giving one compile-/graph-safe entry per arch. Validated on Qwen3.6-35B-A3B (gfx1151): correct, ~22 tok/s eager / ~28 tok/s HIP-graph.

The Triton INT8 W8A8 GEMM path loads a per-arch default config via
get_gemm_config() -> _load_config_file(..., fpath_should_exist=True),
which hard-asserts when the file is absent. aiter ships this default for
gfx1201 (gfx1201-GEMM-A8W8.json) but not for gfx1151 (RDNA3.5), so any
INT8 W8A8 GEMM on gfx1151 fails at load:

  AssertionError: Required config file doesn't exist:
    .../configs/gemm/gfx1151-GEMM-A8W8.json

Add a generic gfx1151 default (single "any" entry) so the INT8 W8A8 path
works out of the box on RDNA3.5. Shape-specialized configs remain optional
(loaded with fpath_should_exist=False) and can be added via the tuner.
@carlushuang
carlushuang requested a review from a team June 25, 2026 04:47
@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:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
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: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
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 3917 --add-label <label>

@zufayu
zufayu requested review from amd-ruitang3 and yifehuan and removed request for amd-ruitang3 June 26, 2026 08:53
Expose an int8 W8A8 (per-token activation, per-channel weight) fused MoE
forward built on the smoothquant grouped GEMM: routing -> per-token int8
quant -> gemm1+fused SiLU -> per-token int8 quant -> gemm2+scatter/combine.
aiter's high-level fused_moe covers fp8_w8a8/int8_w8a16/int4_w4a16 but not
int8 W8A8; this fills that gap so consumers need no out-of-tree orchestration
(used by ROCm/ATOM on gfx1151, where the fp8/int4 MoE paths are unavailable).
@carlushuang carlushuang changed the title feat(gfx1151): add INT8 W8A8 GEMM default config feat(gfx1151): INT8 W8A8 GEMM config + int8 fused-MoE forward Jul 2, 2026
carlushuang added 2 commits July 2, 2026 08:51
The @torch_compile_guard-wrapped gemm_a8w8 hard-called the CK kernel, which
ships gfx9 (CDNA) code objects only. Route to the portable Triton gemm_a8w8
when the running arch isn't gfx9 (e.g. RDNA gfx11/gfx12). Callers get a single
compile-/graph-capture-safe entry point that works on every arch, so consumers
(ROCm/ATOM on gfx1151) no longer need to re-register a Triton wrapper of their own.
@carlushuang carlushuang changed the title feat(gfx1151): INT8 W8A8 GEMM config + int8 fused-MoE forward feat(gfx1151): INT8 W8A8 GEMM config + int8 fused-MoE forward + RDNA a8w8 routing Jul 2, 2026

@yifehuan yifehuan 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

@yifehuan
yifehuan requested review from a team and valarLip July 7, 2026 10:05
@valarLip
valarLip merged commit 11f7f79 into main Jul 20, 2026
55 of 56 checks passed
@valarLip
valarLip deleted the carhuang/gfx1151_int8_gemm_config branch July 20, 2026 04:27
@tangzzycc tangzzycc mentioned this pull request Aug 18, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants