Skip to content

[FlyDSL] [gfx950] hc_mix kernel for Qwen3.8 hyper-connections - #5993

Merged
junhaha666 merged 5 commits into
ROCm:mainfrom
amd-nprotaso:pr/flydsl-hc-mix
Oct 21, 2026
Merged

junhaha666 merged 5 commits into
ROCm:mainfrom
amd-nprotaso:pr/flydsl-hc-mix

Conversation

@amd-nprotaso

@amd-nprotaso amd-nprotaso commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds a FlyDSL kernel for the Qwen3.8 hyper-connection mix projection (_hc_project) on gfx950: BF16 input, decode-sized M (up to 128 rows).

Changes

  • aiter.ops.flydsl.hc_mix: down projection, then split-K reduce + SiLU, then up projection with gated HC reduction. Math runs in FP32; only the SiLU intermediate and the output are rounded to BF16.
  • pack_hc_weights: packs the weights once into the MFMA operand layout.

Performance

Setup:

  • MI355X (gfx950), torch 2.11.0+rocm7.2, FlyDSL 0.3.4.1, BF16.
  • x [M, 10240], down [320, 10240], up [10240, 320].
  • 64 weight sets are rotated between calls, so the weights are cold in L2, as in a real layer stack.
  • Each measurement is a CUDA-graph replay; the time is the per-call median.
  • Script: benchmark/kernels/bench_hc_mix_flydsl.py in the SGLang PR.
M FlyDSL hc_mix (µs) SGLang persistent Triton fused_hc_mix (µs) torch.compile (µs) vs Triton vs torch.compile
1 18.1 36.3 34.3 2.00x 1.90x
2 18.8 44.9 38.1 2.38x 2.02x
4 20.3 44.9 38.1 2.21x 1.88x
8 22.1 45.7 38.2 2.07x 1.73x
16 26.3 45.5 38.6 1.73x 1.47x
geomean 2.07x 1.79x

The weights alone are 2 × 320 × 10240 × 2 B = 13.1 MB. At M=1 that is about 0.72 TB/s effective, against the Triton kernel's 0.36 TB/s.

Accuracy

Against the float64 reference: atol=4e-3, rtol=1e-2, and atol=5e-3 in the gate-range test.

Tests

$ python -m pytest -q op_tests/test_flydsl_hc_mix.py
25 passed

Adds a FlyDSL implementation of the Qwen3.8 hyper-connection mix projection
(_hc_project) as aiter.ops.flydsl.hc_mix, with pack_hc_weights to prepack the
weights, plus op_tests/test_flydsl_hc_mix.py checking it against a torch
reference.

About 2.7x faster than the SGLang baseline on gfx950 (median 2.66x over 5
shapes).

Co-Authored-By: Claude <noreply@anthropic.com>
@amd-nprotaso
amd-nprotaso requested a review from a team September 30, 2026 10:01
@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
multigpu 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: 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 5993 --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.

@github-actions github-actions Bot changed the title # [FlyDSL][gfx950] hc_mix kernel for Qwen3.8 hyper-connections [FlyDSL] #[gfx950] hc_mix kernel for Qwen3.8 hyper-connections Sep 30, 2026
@amd-nprotaso amd-nprotaso changed the title [FlyDSL] #[gfx950] hc_mix kernel for Qwen3.8 hyper-connections [FlyDSL] [gfx950] hc_mix kernel for Qwen3.8 hyper-connections Sep 30, 2026
@zufayu
zufayu requested a review from yadaish October 1, 2026 00:34
Comment thread op_tests/test_flydsl_hc_mix.py Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants