Skip to content

chore(stack): sglang 0.5.23, vLLM 0.34.0, aiter v0.1.29 - #253

Merged
zhenhuang12 merged 4 commits into
mainfrom
cursor/upgrade-sglang-0523-f4ec
Nov 18, 2026
Merged

zhenhuang12 merged 4 commits into
mainfrom
cursor/upgrade-sglang-0523-f4ec

Conversation

@xiaobochen-amd

@xiaobochen-amd xiaobochen-amd commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Why

AKLR targets sglang 0.5.22 and vLLM 0.33.0, and aiter-test times aklr/ops against aiter dbd8bf5. This PR moves the stack to sglang 0.5.23, vLLM 0.34.0 and the aiter v0.1.29 release, and adapts the routes, baselines, tests and kernels to them.

Scope

  • stack.json: lmsysorg/sglang:v0.5.23-rocm10-mi35x, vllm/vllm-openai-rocm:v0.34.0-rocm100 (by digest), aiter v0.1.29 (a0c4b69c). aiter-test checks the installed aiter by pip's recorded commit (direct_url.json): a release tag's version carries no +g<sha>.
  • sglang routes declare 0.5.23 beside the versions they had; 4 follow 0.5.23 only (DSA triton decode returns [tokens, heads, v]; DSA indexer use_cuda_graph; lm_head out and use_fp32_lm_head_output; DeepSeek-V2 MoE leave_output_sum; its padded rows, no longer an argument, are the forward context's moe_num_token_non_padded). New fallbacks: DSpark's fp8 lm_head, DeepSeek-V4.1's MXFP8 expert activations, aiter mla_decode_fwd's other KV layouts, DeepSeek-V2 MoE with padded rows, and the GDN routes' DP-relabeled decode (an extend whose logical_forward_mode is a decode). Baselines: six sglang imports moved; Kimi-K3 MLA decode passes uneven_batch as 0.5.23 does.
  • vLLM routes: the 0.34.0 class rename MuseSpark1xMoE → MuseSparkMoE; the aiter routes take aiter 0.1.28's parameters (herd_topk, out, fast_mode) and declare 0.34.0.
  • Tests: test_backend_matches_reference runs each plugin's cases in the job that times the plugin (its image's aiter) and aklr/ops' in aiter-test, gfx950-only cases under the gfx950 marker; there, Kimi-K3's latent MoE case takes the expert shape aiter has tuned. Each new fallback has a test.
  • Kernels: 15 that no longer reach 1.05 over aiter v0.1.29 on any workload become kernel-less schemas; one FlyDSL GEMM wrong at m=64 on FlyDSL 0.4.2 is fixed (below).

Tradeoffs

  • The 15 kernels: on one node our kernels' times are unchanged (new/old 0.96–1.01) and aiter v0.1.29's baselines are 4–38% faster (GEMM most); all 15 qualify on the old stack. Their workloads stay for another optimization round.

Verification

Environment: MI355X; sglang 0.5.23 image (aiter 285579b6, FlyDSL 0.4.0, Triton 3.8.0, torch 2.11); aiter-test adds aiter v0.1.29 (FlyDSL 0.4.2); vLLM 0.34.0 image (torch 2.13, aiter 0.1.28.post1, FlyDSL 0.4.2); ROCm 10.0
Gate overrides: none

Kernels

Kernel removed, workloads kept as a kernel-less schema (mhc_pre's already existed):

kernel best over aiter dbd8bf5 best over aiter v0.1.29
fused_moe situv2 896 experts ceeaa5bb 1.09 1.04
fused_moe swiglu_limit 128 experts e6c03532 1.15 1.03
gemm n128 k6144 (FlyDSL) 56d3c490 1.17 1.02
gemm n18432 k1536 (FlyDSL) f9ba6138 ≥2 1.00
gemm n20480 k7168 (FlyDSL) 05c83031 ≥2 1.00
gemm n256 k4096 (FlyDSL) 1daaac73 1.22 1.04
gemm n256 k6144 (FlyDSL) 9bc59fe9 1.07 0.98
gemm n2624 k6144 (FlyDSL) 2fc6db16 1.14 1.00
gemm n768 k7168 (FlyDSL) 399cbcd0 1.91 0.94
gemm n8448 k7168 (FlyDSL) 1e3106ff 1.09 1.045
gemm n2624 k6144 (Triton) 041f29d9 1.18 0.75
gemm n2624 k6144 (Triton) 7511d8bb 1.18 0.98
gemm n32 k6144 (Triton) 65f19013 1.92 0.98
gemm n6144 k2048 (Triton) 0774cef6 1.28 0.96
mhc_pre hidden 7168 c93b3a60 1.07 1.02

Fixed: gemm_a8w8_blockwise_scaled_b_shuffled_n32768_k1024 5477b83d → 4c06f271. On FlyDSL 0.4.2 its skinny path is wrong for m of 33 to 64 whatever its tile (1.4–1.9% of the output, each run); m=64, the only such workload, now takes the 128-row tile (SKINNY_MAX_M = 32), as m=128 does. The cause on 0.4.2 is not yet known.

contract baseline measured accuracy speedup
gemm_a8w8_blockwise_scaled (n32768 k1024), FlyDSL 0.4.2 aiter v0.1.29 13/13 13/13 1.05 – 2.24

Also correct 13/13 on FlyDSL 0.4.0 (sglang image) and 0.4.2 (vLLM image).

Code

  • Unit tests on this head, in each job's environment: sglang-test 222 passed, 4 skipped; vllm-test 107 passed; aiter-test tests/ops 324 passed (all of aiter-test's, 1069 passed, on the head before the rebase). CPU: 1365 passed; 9 fail on main too (no GPU torch). tests/check_layout.py, ruff: pass.
  • aklr/ops timed in aiter-test's environment: 262 schemas, 2491 workloads, 0 accuracy failures; the 15 above were the only no_qualifying_workload, and 5477b83d's m=64 the only wrong workload.
  • sglang-test's validation in its environment: aklr/plugins (but vLLM) 420 schemas, 1161 workloads; aklr/ops checked, 2351 workloads correct. Four kernels reach 1.05 on no workload on our node, three of them on the old stack too (Kimi-K3 latent MoE 02471a7b, DeepSeek-V2 MXFP4 MoE 22fee0b1 and f8cbd122: 0.96–1.02, recorded 1.07–1.13 on CI's node); attn_res … /8b4d96ce is 1.07–1.13 alone on either stack and 1.01–1.14 within the full run. feat: Kimi-K3.1-Pro kernels for sglang 0.5.24 #224's mla_v_absorb 26c7f9fc: 1.60–1.63.
  • vllm-test's validation in its environment: aklr/plugins/vllm 28 schemas, 491 workloads, 1.06–2.10; aklr/ops checked: only 5477b83d's m=64, fixed above.
  • python -m aklr export check, validate --stages audit (714 schemas, against main): pass.

Not run

  • End to end on a served model.
  • feat: Kimi-K3.1-Pro kernels for sglang 0.5.24 #224's fp8_paged_mqa_logits_verify 5766ff00 timed against aiter v0.1.29 (the node expired).
  • The validation above ran in apptainer sandboxes of the pinned images (the node's docker was broken), each with a private /tmp; CI's run on this head is the evidence.

Risk

Affects: every sglang and vLLM route; every aklr/ops measurement (the baseline aiter changes).
AgentX: all
If wrong: a route that no longer matches its target fails at install (sglang/vLLM start-up) or falls back; measurements against the new baseline differ.
Undo: git revert; publish-measurement re-measures after the revert.

stack.json pins lmsysorg/sglang:v0.5.23-rocm10-mi35x, vllm/vllm-openai-rocm:v0.34.0-rocm100 and
aiter v0.1.29; aiter-test checks the installed aiter by pip's recorded commit, as a release tag's
version carries none.

sglang routes declare 0.5.23; four follow it only (DSA triton decode, DSA indexer, lm_head,
DeepSeek-V2 MoE). New fallbacks: DSpark's fp8 lm_head, DeepSeek-V4.1's MXFP8 expert activations,
aiter mla_decode_fwd's other KV layouts. The GDN routes read logical_forward_mode. Baselines follow
six moved sglang imports and Kimi-K3 MLA decode's uneven_batch. vLLM routes: MuseSparkMoE, and the
aiter routes take aiter 0.1.28's parameters.

test_backend_matches_reference runs each plugin's cases in the job that times the plugin, gfx950
cases under the gfx950 marker; Kimi-K3's latent MoE case takes the expert shape aiter has tuned.
…chemas

On no workload do they reach 1.05 over aiter v0.1.29, while all do over dbd8bf5: on one node our
kernels' times stay (new/old 0.96-1.01) and aiter's baselines drop 4-38%. Their workloads stay as
kernel-less schemas for another optimization round (mhc_pre's already existed).
On FlyDSL 0.4.2 (the vLLM image's, aiter v0.1.29's) the skinny path is wrong for m of 33 to 64
whatever its tile, 1.4-1.9% of the output each run; m=64 takes the 128-row tile, as m=128 does,
correct on FlyDSL 0.4.0 and 0.4.2 and 1.05-2.24 over aiter.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Shared tests now repeatedly allocate gigabytes, and newly enabled but unverified vLLM support risks hook-installation failure if aiter signatures differ.

9 open issues
What changed in this PR

Updates AKLR’s supported stack to SGLang 0.5.23, vLLM 0.34.0 and aiter v0.1.29, adapting framework integrations and baseline validation to the new releases.

Changes:

  • Pins updated runtime images and verifies aiter’s installed commit through pip metadata.
  • Adapts routes, fallback guards and baseline imports to upstream API changes.
  • Splits backend-reference checks by framework and preserves workloads as kernel-less schemas where kernels no longer qualify.
File Description
tests/​plugins/​vllm/​test_reference.py Adds vLLM-environment backend-reference checks.
tests/​plugins/​vllm/​test_muse_spark.py Updates the mocked Muse Spark class name.
tests/​plugins/​sglang/​test_torch_gemm_routes.py Tests new lm_head fallback conditions.
tests/​plugins/​sglang/​test_reference.py Adds SGLang-environment backend-reference checks.
tests/​plugins/​sglang/​test_qwen3_5_gdn_route.py Tests logical-decode dispatch for relabeled batches.
tests/​plugins/​sglang/​cases.py Uses tuned expert dimensions for Kimi-K3’s test case.
tests/​ops/​test_reference.py Restricts backend checks to core ops and delegates comparison logic.
tests/​op_case.py Adds marked pytest parameters and shared backend comparison logic.
stack.json Pins the updated images and aiter commit.
harness/​skills/​kb/​triton/​debugging.md Updates baseline-environment and commit-verification guidance.
docs/​vllm_plugin_tutorial.zh.md Updates Chinese examples for vLLM 0.34.0.
docs/​vllm_plugin_tutorial.md Updates English examples for vLLM 0.34.0.
docs/​plugin_tutorial.zh.md Updates Chinese examples for SGLang 0.5.23.
docs/​plugin_tutorial.md Updates English examples for SGLang 0.5.23.
aklr/​plugins/​vllm/​models/​muse_spark/​baseline.py Updates the baseline docstring’s release and class name.
aklr/​plugins/​vllm/​models/​muse_spark/​api.py Targets the renamed Muse Spark class and updated release.
aklr/​plugins/​vllm/​models/​kimi_k3/​attn_res/​baseline.py Updates the baseline docstring’s target release.
aklr/​plugins/​vllm/​models/​kimi_k3/​attn_res/​api.py Declares vLLM 0.34.0 support.
aklr/​plugins/​vllm/​layers/​utils/​api.py Declares vLLM 0.34.0 support for skinny GEMM.
aklr/​plugins/​vllm/​layers/​mla.py Updates route versions and accepts fast_mode.
aklr/​plugins/​vllm/​layers/​mla_prefill.py Declares vLLM 0.34.0 support for prefill routes.
aklr/​plugins/​vllm/​layers/​gemm.py Accepts and forwards aiter’s output buffer.
aklr/​plugins/​vllm/​layers/​fused_moe.py Accepts aiter’s new herd-routing parameters.
aklr/​plugins/​vllm/​layers/​attention.py Declares vLLM 0.34.0 support for attention.
aklr/​plugins/​sglang/​models/​qwen3_next/​contract.py Updates the explanatory release comment.
aklr/​plugins/​sglang/​models/​qwen3_next/​baseline.py Updates gating imports and the sigmoid helper.
aklr/​plugins/​sglang/​models/​qwen3_next/​api.py Adds release support and logical-mode GDN dispatch.
aklr/​plugins/​sglang/​models/​qwen3_5/​baseline.py Updates the gating import and release docstrings.
aklr/​plugins/​sglang/​models/​qwen3_5/​api.py Adds release support and logical-mode GDN dispatch.
aklr/​plugins/​sglang/​models/​qwen2_moe/​baseline.py Updates the baseline docstring’s target release.
aklr/​plugins/​sglang/​models/​qwen2_moe/​api.py Declares SGLang 0.5.23 support for MoE routes.
aklr/​plugins/​sglang/​models/​moe_blocks.py Rejects experts using MXFP8 activations.
aklr/​plugins/​sglang/​models/​minimax_m2/​baseline.py Updates the baseline docstring’s target release.
aklr/​plugins/​sglang/​models/​minimax_m2/​api.py Declares SGLang 0.5.23 support.
aklr/​plugins/​sglang/​models/​kimi_k3/​baseline.py Updates output-gate imports and release documentation.
aklr/​plugins/​sglang/​models/​kimi_k3/​api.py Declares SGLang 0.5.23 support for Kimi-K3 routes.
aklr/​plugins/​sglang/​models/​kimi_k3_torch_gemm.py Extends GEMM route version declarations.
aklr/​plugins/​sglang/​models/​dspark_torch_gemm.py Leaves DSpark’s FP8 lm_head on SGLang.
aklr/​plugins/​sglang/​models/​deepseek_v2/​baseline.py Updates the baseline docstring’s target release.
aklr/​plugins/​sglang/​models/​deepseek_v2/​api.py Adapts the MoE signature and output-sum fallback.
aklr/​plugins/​sglang/​layers/​mla_decode/​baseline.py Passes the upstream uneven-batch buffer through decode.
aklr/​plugins/​sglang/​layers/​mla_decode/​api.py Declares SGLang 0.5.23 support.
aklr/​plugins/​sglang/​layers/​logits_processor_torch_gemm.py Adapts the lm_head signature and FP32-output fallback.
aklr/​plugins/​sglang/​layers/​dsa_indexer/​baseline.py Updates the activation-quantization import.
aklr/​plugins/​sglang/​layers/​dsa_indexer/​api.py Adapts the indexer signature and helper import.
aklr/​plugins/​sglang/​layers/​dsa_backend/​baseline.py Updates the baseline docstring’s target release.
aklr/​plugins/​sglang/​layers/​dsa_backend/​api.py Matches the new decode output shape and extends version declarations.
aklr/​plugins/​sglang/​layers/​attn_residual/​api.py Declares SGLang 0.5.23 support.
aklr/​plugins/​sglang/​layers/​aiter_backend_mla_prefill.py Extends prefill route version declarations.
aklr/​plugins/​sglang/​aiter_calls.py Adapts aiter signatures and rejects unsupported MLA layouts.
aklr/​ops/​mla/​baseline.py Updates the DeepSeek-V4 FP8 attention import.
aklr/​ops/​mla_prefill/​baseline.py Updates the baseline docstring’s target release.
aklr/​ops/​mhc/​impls/​flydsl/​mhc_pre_hidden_size7168/​c93b3a6088572382.json Removes the non-qualifying mHC kernel artifact.
aklr/​ops/​gemm/​impls/​triton/​gemm_n6144_k2048/​0ea9679fff769244.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​triton/​gemm_n6144_k2048/​0774cef6a82ceb70.json Removes the previous Triton GEMM artifact.
aklr/​ops/​gemm/​impls/​triton/​gemm_n32_k6144/​a1950fc3df2a06d5.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​triton/​gemm_n32_k6144/​65f19013d279858b.json Removes the previous Triton GEMM artifact.
aklr/​ops/​gemm/​impls/​triton/​gemm_n2624_k6144/​7511d8bbfacd4d06.json Removes one previous Triton GEMM artifact.
aklr/​ops/​gemm/​impls/​triton/​gemm_n2624_k6144/​44c9027be8bb7c33.json Preserves the 48–60-row workloads without a kernel.
aklr/​ops/​gemm/​impls/​triton/​gemm_n2624_k6144/​0e3be159d29b3f28.json Preserves the remaining workloads without a kernel.
aklr/​ops/​gemm/​impls/​triton/​gemm_n2624_k6144/​041f29d9ee169248.json Removes the other previous Triton GEMM artifact.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n8448_k7168/​beea053db0550c6d.json Retains the GEMM workload without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n768_k7168/​399cbcd0ea88f335.json Removes the previous FlyDSL GEMM artifact.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n768_k7168/​0de3ea7c7da9a2a2.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n2624_k6144/​8effe37b520e128b.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n256_k6144/​3c141b55f849fbfe.json Retains the GEMM workload without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n256_k4096/​ff49b5ad6bce3761.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n20480_k7168/​48670711f8da2a3d.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n18432_k1536/​f9ba613875d19b11.json Removes the previous FlyDSL GEMM artifact.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n18432_k1536/​97c1381ae4b85029.json Retains GEMM workloads without a kernel.
aklr/​ops/​gemm/​impls/​flydsl/​gemm_n128_k6144/​924541f04cfcd0a4.json Retains GEMM workloads without a kernel.
aklr/​ops/​fused_moe/​impls/​flydsl/​fused_moe_swiglu_has_swiglu_limit_shuffled_16x16_model_dim6144_n_experts128_topk4_inter_dim768/​727df7871700d649.json Retains clamped SwiGLU MoE workloads without a kernel.
aklr/​ops/​fused_moe/​impls/​flydsl/​fused_moe_situv2_act_quant8_gate_up_interleaved_model_dim3584_n_experts896_topk16_inter_dim384/​279f0e732d27c757.json Retains SiTUv2 MoE workloads without a kernel.
.github/​workflows/​ci.yaml Verifies aiter’s commit using direct_url.json.
.github/​README.md Updates the documented development images.

Review effort: Max

Comment thread aklr/plugins/vllm/layers/mla.py Resolved
Comment thread tests/plugins/sglang/cases.py Resolved
Comment thread aklr/plugins/sglang/aiter_calls.py Resolved
- DeepSeek-V2 MoE stays on sglang where its top-k masks padded rows: 0.5.23 reads the bound from
  the forward context (moe_num_token_non_padded), no longer a forward_normal argument.
- The Qwen3.5 and Qwen3-Next GDN routes leave a DP-relabeled decode (an extend whose
  logical_forward_mode is a decode) to sglang, as they handled no such batch before.
- vLLM's aiter routes declare 0.34.0 only: 0.33.0rc1.dev910 was not tested.
- Kimi-K3's latent MoE keeps its small Point for the shared tests; only sglang-test's backend check
  takes the expert shape aiter has tuned (BACKEND_POINTS).
- Tests for the new fallbacks: the MLA decode's other KV layouts, leave_output_sum, padded rows,
  MXFP8 expert activations and the relabeled decode.
@zhenhuang12
zhenhuang12 merged commit 879befe into main Nov 18, 2026
9 checks passed
irvineoy added a commit that referenced this pull request Nov 18, 2026
Main's #253 moved CI to sglang 0.5.23, and test_hook requires every
route to declare the installed release. forward_mla_rocm.py is the same
file in 0.5.22 and 0.5.23, so forward_absorb_rocm_prepare and
forward_absorb_rocm_core, the helpers the routes call and the attributes
they read are unchanged. The other names the routes import are kept:
get_is_capture_mode, get_forward, get_lora, get_token_to_kv_pool and
UnquantizedLinearMethod, whose apply changed only on its cutedsl/gemv
branch. A decode that 0.5.23 relabels a one-token extend under DP
attention fails the core route's mode check and stays on sglang.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
zhenhuang12 added a commit that referenced this pull request Nov 18, 2026
…glang seam adapters

Each op's schema.py holds its templates and their Standards; its baseline moves from the seam
adapter to aklr/ops/<op>/baseline.py. attention, fused_moe, gemm, mla and mega_moe declare
their variants.

From main since the base: fp8_paged_mqa_logits_verify (#224) with its reference, baseline and
a baseline-only seam adapter, and sglang 0.5.23's module path of the DSv4 attention (#253).

aklr/plugins stays as on main (TODO.md).
zhenhuang12 added a commit that referenced this pull request Nov 18, 2026
Every file under aklr/ops/*/impls is rewritten: no standard, variant conditions in variant,
kernel entries positional, evaluations empty (every workload is measured again).

Main's changes since the base are carried over: 9 new kernels, 4 with changed sources, 12 that
now require aiter or mori, 17 withdrawn to definitions (#253) and 1 deleted. Its 182
measurement-only updates are not: the files carry no measurements.
irvineoy added a commit that referenced this pull request Nov 18, 2026
Main moved from a65066c to 7e9cff8, ten commits, among them #253
(sglang 0.5.23, which bcf2f95 already declares), #257 (the GPU jobs
run on the aklr-safe runner) and #252 (a tighter tests layout check).
Nothing conflicts. CI run 44255030975 on bcf2f95 started on the old
runner setup and its GPU prepare job is still queued, so this head's
run is the branch's first on aklr-safe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
irvineoy added a commit that referenced this pull request Nov 18, 2026
Main's #253 moved CI to sglang 0.5.23, and test_hook fails a route
that does not declare the installed release. Qwen3MoeSparseMoeBlock's
forward_normal is the same in 0.5.22 and 0.5.23, and so are the names
the route and the baseline read: fused_topk, the gate's
_prefer_triton_a16w16, the experts' weight and scale names and the
aiter runner's fp8 per-128x128 path.

TopK did change: since 0.5.23 it masks padded rows by a bound it takes
from the forward context (resolve_routing_inputs), a bound 0.5.22's
forward_normal never passed it. The op routes every row, so the route
leaves such a call to sglang, as main's DeepSeek-V2 MoE route does
since #253. sglang sets no bound under plain tensor parallelism, so
the Qwen3-Coder TP4 Points are served as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kyle-256 pushed a commit that referenced this pull request Nov 19, 2026
…FP8 cache, VC) on forward_absorb_rocm_prepare and _core (#49)

* feat(plugins): GLM-5.2 MLA absorb decode ops (qkv_a + norms, KC+RoPE+FP8 cache, VC) on forward_absorb_rocm_prepare and _core

Squashed onto main from:
- feat(plugins): MLA absorb KC+RoPE+FP8 cache and VC ops on forward_absorb_rocm_core
- fix(plugins): declare the MLA absorb ops' w_scale as one element, not 0-d
- fix(plugins): keep the MLA absorb kernels CI measured faster; VC bound for fp8 MFMA sums
- docs(plugins): mla_vc bound comment: 21 of 108 input sets failed, not 22 of 102
- feat(plugins): MLA qkv_a projection and latent RMSNorms op on forward_absorb_rocm_prepare
- feat(plugins): GLM-5.2 qkv_a projection and latent RMSNorm decode kernels for mla_qkv_a_norm
- fix(plugins): drop the TP8 mla_vc schema at 1 token, not faster than sglang
- fix(plugins): drop the TP4 mla_kc_rope_cache schema at 64 tokens, not faster than sglang
- fix(plugins): keep mla_kc_rope_cache only at TP4 256 tokens, where it beats the qkv_a op it displaces
- refactor(plugins): rename the forward_mla_rocm package to deepseek_common
- fix(deepseek_common): drop the two mla_vc schemas below the 1.05 bar

* fix(plugins): drop the TP4 1- and 2-token mla_vc schemas below 1.05

CI run 44219495647 benched both under the 1.05 bar, accuracy ok:
e63ffb3a (TP4, 1 token) at 1.03x and 82c901b6 (TP4, 2 tokens) just
under 1.05. Run 43385074220 had them at 1.12x and 1.06x. KC serves only
TP4 256 tokens, so the core route now leaves TP4 decodes of 1 and 2
tokens to sglang; the other 25 schemas are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(plugins): declare sglang 0.5.23 for the GLM-5.2 MLA absorb routes

Main's #253 moved CI to sglang 0.5.23, and test_hook requires every
route to declare the installed release. forward_mla_rocm.py is the same
file in 0.5.22 and 0.5.23, so forward_absorb_rocm_prepare and
forward_absorb_rocm_core, the helpers the routes call and the attributes
they read are unchanged. The other names the routes import are kept:
get_is_capture_mode, get_forward, get_lora, get_token_to_kv_pool and
UnquantizedLinearMethod, whose apply changed only on its cutedsl/gemv
branch. A decode that 0.5.23 relabels a one-token extend under DP
attention fails the core route's mode check and stays on sglang.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(plugins): drop the TP8-tuned 1-token qkv_a schema below 1.05

CI run 44296931687, the branch's first on sglang 0.5.23 and aiter
v0.1.29, benched 95c7c556 at 1.04x, accuracy ok. It had measured 1.09x
in run 44219495647. The 1-token Point stays served by the TP4-tuned
c609a440, at 1.12x in the same run. The other 24 schemas passed and
all 26 workloads were accurate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
zhenhuang12 pushed a commit that referenced this pull request Nov 19, 2026
…SparseMoeBlock.forward_normal, with kernels for Qwen3-Coder at TP4 on gfx950 (#56)

* feat(plugins): qwen3_moe_fp8_moe, Qwen3-MoE's FP8 router and experts on Qwen3MoeSparseMoeBlock.forward_normal

A new package models/qwen3_moe with one contract for sglang's Qwen3-MoE block
when its experts are fp8 at a scale per 128 x 128 block (Qwen3-Coder-480B-A35B
FP8 and the other Qwen3-MoE FP8 checkpoints): the router GEMM with its logits
in bf16, the softmax top-k renormalized over the chosen experts (norm_topk_prob),
and the experts, each linear's input quantized per 1 x 128 group. Qwen3-MoE has
no shared expert; every expert is held on the rank (no expert parallelism).

The route replaces forward_normal and returns what it returns: this rank's
share, which sglang's layer boundary sums over the TP group after the call
(0.5.22's forward_normal no longer all-reduces). It falls back for graph modes
and the configurations moe_blocks checks, expert parallelism, a LoRA-wrapped or
quantized gate, routing other than ungrouped renormalized softmax, and experts
other than block fp8 on aiter's fused_moe.

The baseline is what sglang 0.5.22 runs on aiter for these steps: the gate
(tgemm.mm, or aiter's triton gemm_a16w16 for the shapes sglang sends it),
fused_topk (aiter's topk_softmax) and aiter's fused_moe at per_128x128. The
output's SqnrBound of 30 dB admits the fp8 codes that aiter's and the kernels'
scale rounding flips at exact ties (34 to 38 dB at Qwen3-Coder's shape,
emulated in float64).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(plugins): Qwen3-Coder FP8 MoE kernels created by OpenAI for qwen3_moe_fp8_moe at TP4 on gfx950

Gluon kernels for Qwen3-Coder-480B-A35B FP8's MoE block at TP4 (model_dim 6144,
160 experts all on the rank, top-8, 640 intermediate rows per expert on this
rank), one schema per kernel, 16 exact token counts:

- decode, 9 schemas: 1, 2, 4, 8, 16, 32, 64, 128 and 256 tokens, each in
  sglang's default CUDA-graph capture list;
- prefill, 2 schemas: 1024, 2048, 4096, 5120 and 8192 tokens, and 10240 and
  16384 tokens, the chunk sizes of 1024- to 10240-token prompts under sglang's
  16384-token chunked-prefill default on MI355X.

Each kernel routes and runs the experts in its own launches, reads the experts
as sglang holds them for aiter (shuffle_weight's 16 x 16 tiles, the fp32 block
scales as the checkpoint stores them) and keeps nothing across calls.

Edits to the kernels: the entry writes the caller's out instead of allocating
its output (the two prefill entries already took one), the run entry added, and
in two kernels a compile-time next_power_of_2 of their own where a @gluon.jit
body called triton's, which sglang replaces with a plain function.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(plugins): declare sglang 0.5.23 for the Qwen3-MoE FP8 MoE route

Main's #253 moved CI to sglang 0.5.23, and test_hook fails a route
that does not declare the installed release. Qwen3MoeSparseMoeBlock's
forward_normal is the same in 0.5.22 and 0.5.23, and so are the names
the route and the baseline read: fused_topk, the gate's
_prefer_triton_a16w16, the experts' weight and scale names and the
aiter runner's fp8 per-128x128 path.

TopK did change: since 0.5.23 it masks padded rows by a bound it takes
from the forward context (resolve_routing_inputs), a bound 0.5.22's
forward_normal never passed it. The op routes every row, so the route
leaves such a call to sglang, as main's DeepSeek-V2 MoE route does
since #253. sglang sets no bound under plain tensor parallelism, so
the Qwen3-Coder TP4 Points are served as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
kyle-256 added a commit that referenced this pull request Nov 19, 2026
…schemas

On aiter a6c759b1f (FlyDSL 0.5.0) no workload of these reaches 1.05 over aiter: sparse_prefill_mxfp8 at 128 heads
(two kernels, 0.42-0.50x and 0.67-0.78x, where main recorded 1.23-1.37x and 1.89-2.08x; aiter's
mla_sparse_prefill_v4 now takes 260 us) and the fused MoE of 513 experts top-11 inter 512 (1.03-1.12x). As #253
did, their workloads stay as kernel-less schemas for another optimization round; the two sparse prefill kernels
share their workloads, so they leave one schema.
kyle-256 added a commit that referenced this pull request Nov 19, 2026
…ecome kernel-less schemas

On MI355X with aiter a6c759b1f, through aiter's provider and against the float64 reference:
- 16fab927 (61-1023 tokens): 1.00-1.04x over aiter, and 17.97 dB where aiter's own fused MoE
  reaches 30.46 dB;
- a5d411fa (1024-16384 tokens): 1.06-1.64x, but 17.97-17.98 dB where aiter reaches 27.98-30.42 dB.
Both pass the contract's 13 dB bound. The three kernels below 61 tokens match aiter (30.1-31.1 dB
both, 44.7-48.0 dB between them) and stay. As #253 did, the two keep their workloads as
kernel-less schemas for another round.
kyle-256 added a commit that referenced this pull request Nov 19, 2026
…schemas

On aiter a6c759b1f (FlyDSL 0.5.0) no workload of these reaches 1.05 over aiter: sparse_prefill_mxfp8 at 128 heads
(two kernels, 0.42-0.50x and 0.67-0.78x, where main recorded 1.23-1.37x and 1.89-2.08x; aiter's
mla_sparse_prefill_v4 now takes 260 us) and the fused MoE of 513 experts top-11 inter 512 (1.03-1.12x). As #253
did, their workloads stay as kernel-less schemas for another optimization round; the two sparse prefill kernels
share their workloads, so they leave one schema.
kyle-256 added a commit that referenced this pull request Nov 19, 2026
…ecome kernel-less schemas

On MI355X with aiter a6c759b1f, through aiter's provider and against the float64 reference:
- 16fab927 (61-1023 tokens): 1.00-1.04x over aiter, and 17.97 dB where aiter's own fused MoE
  reaches 30.46 dB;
- a5d411fa (1024-16384 tokens): 1.06-1.64x, but 17.97-17.98 dB where aiter reaches 27.98-30.42 dB.
Both pass the contract's 13 dB bound. The three kernels below 61 tokens match aiter (30.1-31.1 dB
both, 44.7-48.0 dB between them) and stay. As #253 did, the two keep their workloads as
kernel-less schemas for another round.
kyle-256 added a commit that referenced this pull request Nov 20, 2026
…ome kernel-less schemas

#271 touches aklr/core, so its CI benches every plugin schema again, and these three have no
workload at 1.05 over sglang's own: kimi_k3_latent_moe 02471a7b (4096-8192 tokens, 0.95-0.99x;
main records 0.98-1.03x) and deepseek_v2_mxfp4_moe 22fee0b1 (24 tokens, 1.01x; main 1.02x) and
f8cbd122 (32 tokens, 0.97x; main 0.99x). As #253 did, their workloads stay as kernel-less schemas.
zhenhuang12 pushed a commit that referenced this pull request Nov 20, 2026
…h the aiter provider, on aiter main and FlyDSL 0.5 (#271)

* feat(plugins): serve aiter's 16-bit GEMMs and its Triton blockscale GEMM

Selectors for the three GEMM contracts aiter routes next, in the provider's
gemm module:

- gemm_a16w16 (tuned_gemm: tgemm.mm, gemm_a16w16, gemm_a16w16_out) -> gemm.
  A with three or more dims is viewed as rows and the result viewed back;
  out is viewed to (rows, n) and returned. Declines scale_a/scale_b/scale_c,
  a shuffled B, an out whose dtype is not otype (aiter raises), and an A that
  cannot be viewed as rows (aiter runs F.linear).
- gemm_a16w16_activation (Triton gemm_a16w16) -> gemm, y as out. Declines an
  activation and skip_reduce; config, kernel_type and persistent pick aiter's
  schedule only.
- gemm_a8w8_blockscale_out (Triton gemm_a8w8_blockscale) ->
  gemm_a8w8_blockwise_scaled with operand_format "none:none", y as out.
  Declines skip_reduce, scales other than fp32, and an x_scale that is not
  contiguous (aiter's kernel reads it through its strides; AKLR's row-major
  a_scale is contiguous).

For the Triton ops the output dtype is y's when y is given, as aiter's.
Each run takes aiter's parameters by name and in order.

* feat(plugins): serve aiter's fused_moe and biased_grouped_topk routes

aiter routes two more MoE ops (ROCm/aiter, branch kyle/aklr-routes-moe):
fused_moe, on the layer beneath its public fused_moe, and
biased_grouped_topk. The provider gains a selector for each.

- fused_moe -> AKLR's fused_moe, through the mapping the sglang and vLLM
  routes of aiter's public fused_moe use, now op_kwargs in
  aklr/plugins/aiter/fused_moe.py. The call arrives with aiter's enums as
  ints and is read back with aiter's enums. Declined: block_size_M other
  than -1, padding, activation scales, biases, the stage-2 scatter (any
  ep_* field), activation quant overrides, herd_topk, deterministic=True,
  and SiTUv2 where aiter would not quantize to fp8. The sorting policy and
  the HERD routing factor alone are not taken.
- A sort a caller registered for aiter's next fused MoE
  (register_presorted_moe) is consumed beneath aiter's route, so the run
  pops it before anything else: left registered, it would apply to the
  next call aiter computes.
- biased_grouped_topk -> AKLR's biased_grouped_topk, whose eight parameters
  are aiter's first eight. Declined: num_valid_rows, dropped groups
  (topk_group != num_expert_group), a bias in another dtype than the
  scores, and one group while aiter routes by HERD
  (AITER_FLYDSL_USE_HERD=1). The run returns None, as aiter's op does.

tests/plugins/aiter/test_provider_moe.py covers both on CPU, with a
stand-in aiter and, where aiter.plugin is importable, aiter's own dispatch.
test_provider.py's contract table does not list the two ops yet, so its
test_each_selector_serves_an_aiter_contract_at_its_version fails until they
are added there.

* feat(plugins): serve aiter's MLA and fused mHC routes as its provider

aiter now routes five more ops through its kernel plugin interface
(kyle/aklr-routes-mla): mla_decode_fwd, mla_paged_decode (the decode mode of
mla_gluon), fp8_paged_mqa_logits, mla_sparse_prefill_v4 and
mhc_fused_post_pre. Each gets a selector that unpacks aiter's call by name,
declines what the AKLR contract does not take, and binds a run with aiter's
parameters.

- mla_decode_fwd -> mla_decode_fwd: the declines of aklr.plugins.aiter.mla,
  plus kv_layout, seq_lens, page_table, kv_csr_layout and return_logits;
  aiter's schedule metadata is ignored. Returns (o, lse).
- mla_paged_decode -> flash_mla_with_kvcache, dense pool: q_nope and q_pe go
  as the one q they are adjacent views of (two tensors apart decline), the
  pool rows as (N, 1, 1, 576), the 2-D table with cache_seqlens or the flat
  one with cu_seqlens_k, a 4-D q as causal queries. The output is copied
  into aiter's o; the lse is dropped unless asked for.
- fp8_paged_mqa_logits -> fp8_paged_mqa_logits: one query a request,
  preshuffled whole pages, no precomputed schedule, logits as wide as the
  block table and as max_model_len; [B, 1] lengths as [B].
- mla_sparse_prefill_v4 -> sparse_prefill_mxfp8, whose baseline is the same
  aiter kernel: the eleven tensors in order (fp8 NoPE as bytes), a sink
  required; the result is copied into out when given.
- mhc_fused_post_pre -> mhc_fused_post_pre: post_layer_mix (T, 4, 1) as
  (T, 4); shuffled fn or residual declines.

* test(plugins): list aiter's new routed ops in AITER_CONTRACTS

* fix(plugins): take mla_decode_fwd's NVFP4 keyword-only parameters

ROCm/aiter#7987 added q_aux, kv_aux, nvfp4_params and nvfp4_lse to
mla_decode_fwd as keyword-only parameters. The run takes them by name, and the
selector declines a call that passes any of them: that is aiter's NVFP4 path.

* fix(plugins): take fused_moe's splitk, which aiter now passes to the route

ROCm/aiter#4740 threads the public fused_moe's splitk down to fused_moe_, between bias2 and
swiglu_limit, and aiter#8075 records the routed contract with it. The selector unpacked aiter's
arguments by position, so the 40-argument call no longer unpacked, and every field after bias2 would
have been read one place late.

splitk is a split-K request to aiter's own kernels and moves only the order of the K sums, so AKLR
serves the call whatever it is, as aiter's docstring for the route allows.

* fix(plugins): return lse alone for aiter's mla_paged_decode

ROCm/aiter#8075 now registers mla_paged_decode as a custom op that writes o in place and returns lse
alone, so no result aliases an input; a custom op cannot return None for a tensor, so the op returns an
empty fp32 tensor when return_lse is off. AKLR's run still writes its output into o, and now returns
that lse instead of (o, lse).

* refactor(plugins): no route of the sglang or vLLM plugin wraps an aiter function aiter routes

sglang's aiter_calls (fused_moe, tgemm.mm, the Triton gemm_a16w16, mla_decode_fwd) and vLLM's layer
routes on the same aiter functions (layers/fused_moe, gemm, mla) wrapped calls that aiter's kernel
plugin interface now offers to AKLR's provider itself, so with both on a call reached AKLR twice.
They go, with the argument mappings only they used (aklr/plugins/aiter/{mla,triton_gemm,tuned_gemm});
the provider serves these ops (fused_moe, gemm_a16w16, gemm_a16w16_activation, mla_decode_fwd) with
the same checks, KV layouts included.

* refactor(plugins): serve vLLM's MLA prefill through aiter's flash_attn_varlen

vLLM's ROCM_AITER_FA MLA prefill backend calls aiter.flash_attn_varlen_func
with the lse, over a step's new tokens and over each context chunk. The vLLM
route on that backend wrapped what is now aiter's routed flash_attn_varlen,
so the provider takes it instead: a selector that hands a bf16, causal or
unmasked pass of at least 256 query rows to mla_prefill_varlen_lse in fp8,
returning aiter's (out, softmax_lse as [heads, tokens]); every other call
stays on aiter. The vLLM route and its tests go.

* refactor(plugins): serve the DSA indexer's paged logits through aiter's fp8_paged_mqa_logits

sglang's aiter_paged_mqa_logits calls aiter's deepgemm_fp8_paged_mqa_logits,
which aiter routes as fp8_paged_mqa_logits, and the provider already serves
its row calls. The sglang route on that wrapper goes. What it added, scoring
a target verify's rows by request under DCP, moves into the provider's
selector: the route on Indexer._get_topk_paged now only notes, through
note_target_verify, whether the logits asked next are such a verify's, and
the selector regroups those rows by views for fp8_paged_mqa_logits_verify,
writing aiter's out_logits. Rows it cannot regroup, or a verify AKLR falls
back on, take the row op as before.

* ci: baseline aiter at a6c759b1f, which has the kernel plugin routes AKLR's provider serves

ROCm/aiter#8075 routes flash_attn_varlen, mla_prefill_ps, mla_reduce,
gemm_a8w8_bpreshuffle, causal_conv1d_split_qkv and the two KDA recurrences
through aiter.plugin; #8179 restores the import aiter.fused_moe needs. This
aiter pins flydsl==0.5.0 (a0c4b69c pinned 0.4.2).

* docs(plugins): which framework routes stay beside aiter's provider

A route may not wrap an aiter function aiter routes, nor a framework function that only calls one; a route that runs nothing may note framework state for the provider; aiter functions aiter does not route keep their routes.

* fix(validation): trip on FlyDSL's compile in a capture from FlyDSL 0.5

FlyDSL before 0.5 reaches _build_call_state on a specialization's first
call in the process only, so the tripwire hooked it to catch a kernel
compiled inside a CUDA graph capture. FlyDSL 0.5 dropped the call-state
cache: every JitFunction call traces again and rebuilds its call state, so
a warmed kernel launched in the capture tripped it, and its runner died as
candidate_crash (mla_decode_fwd_n_heads96 on aiter a6c759b1f). From 0.5 the
tripwire hooks MlirCompiler.compile, which only a compile reaches.

* test(plugins): keep aiter's own MLA routes in the dispatch test

With an aiter that routes the MLA ops itself, routing a stand-in native under the same op name raised 'already routed' at setup (8 errors on aiter a6c759b1f). Those ops keep aiter's route: explain() checks the call against aiter's own contract, and only the test's own routes are called.

* feat(jit): put FlyDSL's per-specialization launch cache back for AKLR's kernels on FlyDSL 0.5

FlyDSL 0.5 dropped the call-state cache: every JitFunction call traces the
function again, lowers it and hashes the result before it launches. On
MI355X mla_prefill_varlen_lse's launcher took 24.8 ms a call and
mla_decode_fwd's 320 ms, against 0.16 and 0.09 ms on FlyDSL 0.4.2; aiter
since ca6bc0f85 requires FlyDSL 0.5.

FlyDSLBuilder now installs aklr.core.jit.flydsl_cache before it imports a
kernel: for the JitFunctions an AKLR kernel package defines, the first
call of a specialization goes through flyc.compile and every later one
launches its CompiledFunction. The key is FlyDSL 0.4.2's, from FlyDSL's
own signatures: the invalidating environment, the target, the compile
hints, a Constexpr's value, and each runtime argument's cache signature.
Other FlyDSL callers keep FlyDSL's path. Validation's compile tripwire
hooks the cache's miss on FlyDSL 0.5, the first call of a specialization
in the process, as _build_call_state was before 0.5.

* feat(gemm): gemm_a8w8 on preshuffled weights, with Kimi-K3's KDA in-projection kernels

`[email protected]` takes b preshuffled (layout variant `b_shuffled`, aiter's
16 x 16 shuffle_weight, b as (n, k)), detected by `b.is_shuffled`. Its
baseline is aiter's per-token fp8 GEMM on a preshuffled weight,
gemm_a8w8_bpreshuffle. Two FlyDSL schemas serve Kimi-K3's KDA in-projection
(n6288, k7168): m 8-240, and m 320-8192.

The kernels and their Points are those of the vLLM-route change; kernel.requires
now names FlyDSL (>=0.3.2, as K3's other GEMM kernels), which moves both files
to new uuids.

* feat(ops): [email protected], Kimi-K3's KDA prefill short convolution, in aklr/ops/kda_conv

The op vLLM's Kimi-K3 KDA prefill runs through aiter's fused q/k/v causal conv1d
(causal_conv1d_split_qkv_triton_tile_fn): the contract, its reference and
baseline, the FlyDSL kernel for proj 1536 with x and the conv state as strided
rows, and the definition schema beside it. It was a vLLM plugin op with a route
on KDA's conv; it comes to aklr/ops, where the aiter provider reaches it, and
the route is not carried over.

The contract id and the definition schema are unchanged. The kernel's file is
renamed: its sources import aiter's FlyDSL buffer_ops, so kernel.requires names
aiter too, and its workloads lose the measured fields only CI writes. n_tokens
is a plain var axis here, without the bucketed dispatch that is not on this
branch.

* feat(plugins): serve aiter's gemm_a8w8_bpreshuffle by gemm_a8w8 on a shuffled weight

aiter #8075 routes its per-token fp8 GEMM on a preshuffled weight
(gemm_a8w8_bpreshuffle), which vLLM's preshuffled per-token fp8 linears call
(Kimi-K3's KDA in-projection). The provider offers it to gemm_a8w8's
b_shuffled layout: e4m3fn operands of one K, fp32 scales per token and per
output column, no bias. check, a bias (aiter raises on one), a wider zero-padded
weight, per-tensor scales, int8 (aiter's own rules) and e5m2 stay on aiter.

aiter's op reads WQ as shuffled whatever it carries, and vLLM re-wraps the
weight as a Parameter, which drops is_shuffled; AKLR tells a shuffled b only by
that mark, and an unmarked one would read as row-major. select and run hand
AKLR a view of WQ that carries it; the caller's tensor is not touched.

* feat(plugins): serve aiter's causal_conv1d_split_qkv by kimi_k3_kda_conv

aiter #8075 routes its Triton tile prefill conv with the q/k/v split
(causal_conv1d_split_qkv), which Kimi-K3's KDA prefill calls on vLLM with x as
the [dim, n_tokens] transpose of the packed q|k|v projection rows and the state
as a (slots, dim, state_len) view of its SD pages. The provider hands AKLR those
rows as (n_tokens, 3, proj), each slot's first width - 1 state rows (vLLM keeps
more for speculative decoding) and dense index vectors (vLLM can pass a column
of its slot table), as the strided_rows variant, and returns (q, k, v).

Offered only inside the contract: silu (or swish), no bias, k_dim == v_dim,
x rows of 3 * k_dim channel-contiguous, float32 taps of width 4, a bf16 state
of x's dtype in SD pages, int32 cache_indices, bool has_initial_state and int32
query_start_loc given by the caller, and a negative or no pad_slot_id. aiter's
block_m, block_n, num_warps and metadata only schedule its own kernel, and
preserve_input_dtype changes nothing when x and the state share a dtype.

The tests check the run against aiter's documented result, q, k, v and the
state, and, with aiter's plugin interface, the route it takes.

* chore(kernels): 3 kernels aiter a6c759b1f outruns become kernel-less schemas

On aiter a6c759b1f (FlyDSL 0.5.0) no workload of these reaches 1.05 over aiter: sparse_prefill_mxfp8 at 128 heads
(two kernels, 0.42-0.50x and 0.67-0.78x, where main recorded 1.23-1.37x and 1.89-2.08x; aiter's
mla_sparse_prefill_v4 now takes 260 us) and the fused MoE of 513 experts top-11 inter 512 (1.03-1.12x). As #253
did, their workloads stay as kernel-less schemas for another optimization round; the two sparse prefill kernels
share their workloads, so they leave one schema.

* fix(plugins): select only reads the target-verify note; the call that runs takes it

aiter's explain() asks select too and runs nothing, so a select that consumed the note
let the next real call miss it.

* feat(plugins): register K3's attn_res and wvSplitKrc routes on vLLM 0.32.1rc1.dev276

The vLLM of the K3 AgentX image (nightly-rocm72-df6603f0). At its commit df6603f0 both callers
still call their callee, with the same parameters as v0.34.0's: _apply_attn_res calls attn_res,
and rocm_unquantized_gemm_impl calls ops.wvSplitKrc.

* fix(plugins): flash_attn_varlen asks with aligned stand-ins and copies offsets only to run

Selecting a call with offsets off AKLR's 16-byte boundary cloned them, so a declined call or
aiter's explain() enqueued device copies, and an accepted one copied them again in run.

* fix(plugins): a pass sglang's MLA prefill route has declined is not offered to AKLR again

The route's bf16 fallback calls aiter's flash_attn_varlen_func, which asks the provider: a causal
pass the route declined could be taken there in fp8. The fallback now runs inside the provider's
declining(), in which the provider declines every call on that thread.

* test(validation): which compiles the graph-capture tripwire hooks on each FlyDSL

With stand-in compilers: from FlyDSL 0.5 it trips on the launch cache's miss and on MlirCompiler,
before 0.5 on _build_call_state; armed it trips on each hook, and disarmed restores them.

* test(plugins): the stand-in fused_moe contract has aiter a6c759b1f's splitk

aiter's pinned contract, provider/moe.py and test_provider_moe.py list splitk after bias2;
test_provider.py's snapshot had dropped it.

* feat(plugins): serve SiTUv2 on MXFP4 activations, vLLM's Kimi-K3 MoE, by situv2_a4w4_moe

vLLM's Kimi-K3 recipe (AITER_SITUV2_A4W4) has aiter round SiTUv2's activations to MXFP4, which
the provider declined: fused_moe takes SiTUv2 on fp8 only. situv2_a4w4_moe is that call's own
contract, as its baseline makes it: gate and up rows separated, an e8m0 scale per 32.

* feat(plugins): serve vLLM's verify under decode context parallelism by mla_decode_fwd_cprr

vLLM's aiter MLA backend verifies draft tokens under decode context parallelism through aiter's
mla_decode_fwd with g_kv_indptr, cp_world_size and cp_rank, every request with max_seqlen_q causal
queries; the provider declined it as not one query a request. mla_decode_fwd_cprr is that call's
contract: q and o as [batch, queries, heads, width] views of aiter's rows, the lse back as a row's.

* test(plugins): the MoE dispatch tests keep aiter's own routes and check their contracts

The fixture skipped both dispatch tests whenever aiter routed either op itself, so on the pinned
aiter they never ran. Now an op aiter routes keeps its route, asked with explain() and never run,
and only the others get a stand-in; a new test holds this file's contract snapshot to the
installed routes' versions and positional parameters.

* fix(plugins): tell SiTUv2 on MXFP4 activations from aiter's enums by value

aiter's enums are pybind11's, a new object each lookup, so the identity test declined every
Kimi-K3 MoE call on aiter a6c759b1f (found on MI355X: route native, provider declined). The
stand-in enums of the tests were Python's, the same object each time; a test now uses enums
that compare by value only.

* chore(kernels): Kimi-K3's situv2 A4W4 MoE kernels from 61 tokens on become kernel-less schemas

On MI355X with aiter a6c759b1f, through aiter's provider and against the float64 reference:
- 16fab927 (61-1023 tokens): 1.00-1.04x over aiter, and 17.97 dB where aiter's own fused MoE
  reaches 30.46 dB;
- a5d411fa (1024-16384 tokens): 1.06-1.64x, but 17.97-17.98 dB where aiter reaches 27.98-30.42 dB.
Both pass the contract's 13 dB bound. The three kernels below 61 tokens match aiter (30.1-31.1 dB
both, 44.7-48.0 dB between them) and stay. As #253 did, the two keep their workloads as
kernel-less schemas for another round.

* fix(plugins): situv2_a4w4_moe holds its kernels to 25 dB, not fused_moe's 13

aiter's own SiTUv2 A4W4 reaches 27.98-31.06 dB against the float64 reference on Kimi-K3's calls
(MI355X, aiter a6c759b1f), and so do the three kernels kept (30.12-31.06 dB). fused_moe's 13 dB let
two kernels 12 dB short of aiter through (17.97 dB); at 25 dB validation stops them.

* chore(kernels): 3 sglang Triton MoE kernels no faster than sglang become kernel-less schemas

#271 touches aklr/core, so its CI benches every plugin schema again, and these three have no
workload at 1.05 over sglang's own: kimi_k3_latent_moe 02471a7b (4096-8192 tokens, 0.95-0.99x;
main records 0.98-1.03x) and deepseek_v2_mxfp4_moe 22fee0b1 (24 tokens, 1.01x; main 1.02x) and
f8cbd122 (32 tokens, 0.97x; main 0.99x). As #253 did, their workloads stay as kernel-less schemas.

* test(ops): the preshuffled gemm_a8w8 Point at k 256, which aiter a6c759b1f's bpreshuffle takes

From aiter a6c759b1f gemm_a8w8_bpreshuffle's heuristic dispatch takes k > 192 and a multiple of
64, so test_backend_matches_reference failed at the Point's k = 128 (Unsupported K).
zhenhuang12 added a commit that referenced this pull request Nov 20, 2026
…glang seam adapters

Each op's schema.py holds its templates and their Standards; its baseline moves from the seam
adapter to aklr/ops/<op>/baseline.py. attention, fused_moe, gemm, mla and mega_moe declare
their variants.

From main since the base: fp8_paged_mqa_logits_verify (#224) with its reference, baseline and
a baseline-only seam adapter, and sglang 0.5.23's module path of the DSv4 attention (#253).

aklr/plugins stays as on main (TODO.md).
zhenhuang12 added a commit that referenced this pull request Nov 25, 2026
…glang seam adapters

Each op's schema.py holds its templates and their Standards; its baseline moves from the seam
adapter to aklr/plugins/aiter/<op>/baseline.py. attention, fused_moe, gemm, mla and mega_moe declare
their variants.

From main since the base: fp8_paged_mqa_logits_verify (#224) with its reference, baseline and
a baseline-only seam adapter, and sglang 0.5.23's module path of the DSv4 attention (#253).

aklr/plugins stays as on main (TODO.md).

This branch was previously deployed

1 inactive deployment
gpu-trusted — de2be148 Deployed Nov 18, 2026 by xiaobochen-amd via prepare-gpu / prepare #1051
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.

3 participants