Skip to content

[ROCm][WIP]: Fused aiter rope kvcache mla#35245

Closed
Rohan138 wants to merge 0 commit into
vllm-project:mainfrom
ROCm:fused_aiter_rope_kvcache_mla
Closed

[ROCm][WIP]: Fused aiter rope kvcache mla#35245
Rohan138 wants to merge 0 commit into
vllm-project:mainfrom
ROCm:fused_aiter_rope_kvcache_mla

Conversation

@Rohan138

@Rohan138 Rohan138 commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Fuse RoPE+cache+cat ops for MLA e.g. DeepSeek, Kimi on ROCm + AITER similar to #33443.

Requires:

Purpose

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify mergify Bot added the rocm Related to AMD ROCm label Feb 24, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Feb 24, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a fusion for RoPE, KV cache update, and concatenation operations for MLA on ROCm with AITER, which is a significant performance optimization. The changes include adding a new custom op for rotary embedding, refactoring the MLA attention layer to separate KV cache updates, and updating tests and configurations. The implementation looks mostly correct, but I've found a potential logic bug in the configuration and a minor inconsistency in function signatures that should be addressed.

Comment thread vllm/config/vllm.py Outdated
Comment on lines +148 to +149
rocm_aiter_ops.is_rmsnorm_enabled()
and not rocm_aiter_ops.is_triton_gemm_enabled()

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.

critical

There seems to be a logic inversion here. The docstring on line 143 states that this fusion should be enabled when using 'AITER Triton GEMMs', but the code on line 149 checks for not rocm_aiter_ops.is_triton_gemm_enabled(). This appears to be a bug that would incorrectly disable the fusion when Triton GEMMs are in use. Should this be rocm_aiter_ops.is_triton_gemm_enabled() to match the docstring and the previous logic?

Suggested change
rocm_aiter_ops.is_rmsnorm_enabled()
and not rocm_aiter_ops.is_triton_gemm_enabled()
rocm_aiter_ops.is_rmsnorm_enabled()
and rocm_aiter_ops.is_triton_gemm_enabled()

Comment thread vllm/_aiter_ops.py
@mergify

mergify Bot commented Feb 26, 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, @Rohan138.

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

@mergify

mergify Bot commented Mar 2, 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, @Rohan138.

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

@Rohan138 Rohan138 force-pushed the fused_aiter_rope_kvcache_mla branch 3 times, most recently from 8b5ed5d to 4d6956f Compare March 12, 2026 17:51
@Rohan138 Rohan138 closed this Apr 9, 2026
@Rohan138 Rohan138 force-pushed the fused_aiter_rope_kvcache_mla branch from 4d6956f to f7cad67 Compare April 9, 2026 21:15
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Apr 9, 2026
@Rohan138 Rohan138 deleted the fused_aiter_rope_kvcache_mla branch April 9, 2026 21:15
@Rohan138 Rohan138 restored the fused_aiter_rope_kvcache_mla branch April 9, 2026 21:16
@Rohan138 Rohan138 deleted the fused_aiter_rope_kvcache_mla branch May 31, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rocm Related to AMD ROCm v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant