Skip to content

[ROCm][CI] Add float16 dtype and unsupported head size tests for paged attention - #53177

Merged
AndreasKaratzas merged 3 commits into
vllm-project:mainfrom
divakar-amd:pr40979-attention-tests
Aug 21, 2026
Merged

[ROCm][CI] Add float16 dtype and unsupported head size tests for paged attention#53177
AndreasKaratzas merged 3 commits into
vllm-project:mainfrom
divakar-amd:pr40979-attention-tests

Conversation

@divakar-amd

Copy link
Copy Markdown
Contributor
  • Extended DTYPES in test_attention.py to include torch.float16 (was only torch.bfloat16)
  • Added test_paged_attention_unsupported_head_sizes to verify the ROCm kernel correctly rejects head sizes not supported by the native HIP kernel (only 64 and 128 are supported)

The ROCm paged attention kernel (csrc/rocm/attention.cu) only supports head sizes 64 and 128. This test ensures the kernel raises a clear RuntimeError("Unsupported head size") for other values rather than silently failing or producing incorrect results.

  • All changes are ROCm-only (guarded with skipif not current_platform.is_rocm())

Add test_rocm_attention_head_sizes.py with tests for:
- test_rocm_paged_attn_alibi
- test_rocm_paged_attn_head_sizes
- test_rocm_paged_attn_unsupported_head_sizes
- test_triton_attn_decode_head_sizes

These tests validate ROCm-specific attention kernel behavior for
various head size configurations.

Signed-off-by: Divakar Verma <divakar.verma@amd.com>
…alidation

Signed-off-by: Divakar Verma <divakar.verma@amd.com>
Signed-off-by: Divakar Verma <divakar.verma@amd.com>

@claude claude Bot 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

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

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84912 for commit 9b9d9732c3c4.

@AndreasKaratzas
AndreasKaratzas merged commit b5f7fcc into vllm-project:main Aug 21, 2026
28 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Aug 21, 2026
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: Done

Development

Successfully merging this pull request may close these issues.

2 participants