Repository navigation
Upstream sync 24/N: merge 49fb2ee348 [ROCm][CI] add Aiter ops tests (#52208) (conflict) - #1271
Merged
roberteg16 merged 4 commits intoSep 10, 2026
Merged
Conversation
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
…m-project#52208) (conflict) Conflict-only step. Two hunks in vllm/_aiter_ops.py, both in AiterOps static methods. Took upstream's implementations; kept the fork's unrelated accessor that git had glued into the same hunk. Hunk 1 - rms_norm (and the fork's qk_norm accessor caught up in it) ours: def get_fused_qk_norm_mrope_kvcache_op() -> OpOverload: return torch.ops.vllm.aiter_fused_qk_norm_mrope_kvcache.default @staticmethod def rms_norm(x, weight, variance_epsilon): return torch.ops.vllm.rocm_aiter_rms_norm(x, weight, variance_epsilon) theirs: def rms_norm(x, weight, epsilon): import aiter return aiter.rms_norm(x, weight, epsilon) Hunk 2 - rms_norm2d_with_add ours: return torch.ops.vllm.rocm_aiter_rmsnorm2d_fwd_with_add( x, residual, weight, variance_epsilon) theirs: import aiter out = torch.empty_like(x); residual_out = torch.empty_like(x) aiter.rmsnorm2d_fwd_with_add(out, x, residual, residual_out, weight, epsilon, 0) return out, residual_out The fork's two implementations dispatch through torch.ops.vllm.* wrappers. Checked whether those wrappers exist, because a missing registration here is an AttributeError at first call rather than an import error, and this file is ROCm-only so CI on other platforms would never reach it. They do not exist: register_ops_once(); hasattr(torch.ops.vllm, 'rocm_aiter_rms_norm') -> False register_ops_once(); hasattr(torch.ops.vllm, 'rocm_aiter_rmsnorm2d_fwd_with_add') -> False Verified against the built tree at batch 23, i.e. before this merge, so the fork's side was already referencing unregistered ops - neither name appears in the direct_register_custom_op block at _aiter_ops.py:2178-2440. Upstream's versions call the aiter library directly and are what its new test exercises (tests/kernels/core/test_rocm_aiter_ops.py:215 calls rocm_aiter_ops.rms_norm(x, weight, eps) and compares against a PyTorch reference), so taking theirs both fixes the dispatch and satisfies the tests the commit adds. get_fused_qk_norm_mrope_kvcache_op is unrelated to either side of the conflict - it only landed in the same hunk because it directly precedes rms_norm - and is kept. Its op IS registered and is exercised by tests/rocm/aiter/test_fused_qk_norm_mrope_kvcache.py; dropping it would have broken that test and the qk-norm fusion pass. py_compile, ruff check and ruff format pass on the merged file.
2 tasks done
roberteg16
marked this pull request as ready for review
September 8, 2026 10:12
roberteg16
requested review from
eble-amd
and removed request for
AndreasKaratzas
September 8, 2026 10:12
eble-amd
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Twenty-fourth step of the batched upstream catch-up. Stacked on #<batch 23 PR>.
Conflict-only step.
Merged upstream changes:
49fb2ee348[ROCm][CI] add Aiter ops tests vllm-project/vllm#52208 — [ROCm][CI] add Aiter ops testsTwo hunks in
vllm/_aiter_ops.py, both inAiterOpsstatic methods.Hunk 1 —
rms_norm(plus a fork accessor caught in the same hunk)Hunk 2 —
rms_norm2d_with_addAudit
The fork's two implementations dispatch through
torch.ops.vllm.*wrappers. Checked whether those wrappers exist, because a missing registration here is anAttributeErrorat first call rather than at import, and this file is ROCm-only so CI on other platforms would never reach it.They do not exist. Against the built tree at batch 23 — i.e. before this merge:
Neither name appears in the
direct_register_custom_opblock at_aiter_ops.py:2178-2440. So the fork's side was already broken; taking ours would have preserved two methods that raise on any call.Upstream's versions call the
aiterlibrary directly and are exactly what the commit's new tests exercise —tests/kernels/core/test_rocm_aiter_ops.py:215callsrocm_aiter_ops.rms_norm(x, weight, eps)and compares against a PyTorch reference. Taking theirs both fixes the dispatch and satisfies the new tests.get_fused_qk_norm_mrope_kvcache_opis unrelated to either side — it only landed in the same hunk because it immediately precedesrms_norm— and is kept. Its op is registered, it is exercised bytests/rocm/aiter/test_fused_qk_norm_mrope_kvcache.py, and it is consumed by the qk-norm fusion pass; dropping it would have broken both.py_compile,ruff checkandruff formatpass on the merged file.Merge commit only — do not squash or rebase.
AI assistance was used to prepare this merge.
Test plan
torch.ops.vllm.*targets proven absent at runtime on the pre-merge build — the fork's side could not have workedget_fused_qk_norm_mrope_kvcache_opconfirmed registered and tested before being retainedpy_compile+ruff check+ruff formatpytest tests/kernels/core/test_rocm_aiter_ops.py— cannot run on gfx1151:require_aiter()gates onis_aiter_found_and_supported()=get_cdna_version() > 2, i.e. CDNA 3+. This board is RDNA 3.5, so all 12 tests skip by design (verified at runtime:is_aiter_found_and_supported() -> False). Needs MI3xx hardware; the rest of the suite (test_triton_scaled_mm.py) passes 61/61 against this wheel.