Skip to content

[ROCm][Perf] Call aiter.paged_mqa_logits for the sparse indexer decode logits - #60042

Draft
amd-sriram wants to merge 3 commits into
vllm-project:mainfrom
amd-sriram:rocm/aiter-paged-mqa-logits
Draft

amd-sriram wants to merge 3 commits into
vllm-project:mainfrom
amd-sriram:rocm/aiter-paged-mqa-logits

Conversation

@amd-sriram

Copy link
Copy Markdown
Contributor

Purpose

Review feedback on #59422: vLLM should ask AITER for paged MQA logits and let AITER pick the kernel, instead of carrying a Gluon/FlyDSL switch that changes every time one of the kernels improves. This calls AITER's paged_mqa_logits (from aiter.paged_mqa_logits import paged_mqa_logits, imported lazily like aiter.fused_moe) for the sparse indexer decode logits on gfx942/gfx950. AITER picks Gluon or FlyDSL, and their launch knobs, from its tuned table (ROCm/aiter#6140), the same model as its fused-MoE dispatch.

vLLM passes the same tensors it passes to the Gluon kernel today and no backend knobs (ChunkK, WavePerEU, SplitKV). When the installed AITER has no aiter.paged_mqa_logits module, the existing Gluon call runs unchanged, so this is a no-op until vLLM's AITER pin includes the op.

Dependency

ROCm/aiter#6140 (aiter/paged_mqa_logits.py, its tuned table and tuner).

Details

Test Plan

  • pytest tests/v1/attention/test_rocm_aiter_paged_mqa_logits.py (new): the AITER op gets the caller's tensors, the 2D seq_lens and only Preshuffle / KVBlockSize; the Gluon call runs when AITER lacks the op.
  • MI355X, real tensors through rocm_fp8_paged_mqa_logits with the 2D seq_lens table, against the torch reference, with [HIP] [FlyDSL] [CI] Add aiter.paged_mqa_logits with a tuned Gluon/FlyDSL table ROCm/aiter#6140 installed. Shapes picked to hit both backends in the tuned table.

Test Result

  • Unit test: 2/2 pass on MI355X.
  • Real tensors (AITER_LOG_TUNED_CONFIG=1 shows the pick):
batch next_n context AITER pick calc_diff vs torch
16 3 8192 gluon ChunkK=128 WavePerEU=4 9.2e-11
256 3 8192 flydsl 8.5e-11
8 1 32768 gluon ChunkK=256 WavePerEU=4 7.5e-11
64 8 8192 flydsl 8.5e-11

@mergify

mergify Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @amd-sriram.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 9, 2026
amd-sriram and others added 3 commits October 14, 2026 04:31
AITER picks Gluon or FlyDSL and their knobs from its tuned table. Falls back to the Gluon call when AITER predates the op.

Signed-off-by: Sriram Kumar <sriramkumar.kishorekumar@amd.com>
Signed-off-by: Sriram Kumar <sriramkumar.kishorekumar@amd.com>
aiter.paged_mqa_logits takes one length per sequence, like the deepgemm
kernels vllm-project#59420 fixed. Route the (B, next_n) table through
_per_sequence_context_lens on this path too.

Signed-off-by: build <build@local>

This branch has not been deployed

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

Labels

rocm Related to AMD ROCm

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant