[CI/Build] Refactor Attention backend for test_prefix_prefill from xformers to SDPA#28424
Merged
DarkLight1337 merged 3 commits intovllm-project:mainfrom Nov 11, 2025
Merged
Conversation
Signed-off-by: zhewenli <zhewenli@meta.com>
7553a5f to
5fa92e6
Compare
5 tasks
Member
|
cc @ywang96 |
Member
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the attention backend for test_prefix_prefill from xformers to PyTorch's Scaled Dot Product Attention (SDPA), which is a great move for standardization and potentially performance. The changes also include important compatibility fixes for ROCm, such as using int32 for certain tensors and skipping unsupported fp8_e5m2 configurations. The implementation of the SDPA reference is well-structured. I've included one suggestion to improve the performance of the newly added test utility function for creating attention masks, which should help reduce the overall test execution time.
Member
|
b6f852f saves CI about 10 seconds (better than nothing I guess) |
3 tasks
devpatelio
pushed a commit
to SumanthRH/vllm
that referenced
this pull request
Nov 29, 2025
…ormers to SDPA (vllm-project#28424) Signed-off-by: zhewenli <zhewenli@meta.com> Signed-off-by: Roger Wang <hey@rogerw.io> Co-authored-by: Roger Wang <hey@rogerw.io>
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.
Purpose
xformersdependency #28287 (comment) by changing the ground truth for attention backend from xformers to pytorch SDPAa. The ROCm paged attention kernel expects 32-bit
inttensors, but the test passes 64-bittorch.longtensors.b. ROCm paged attention kernel only supports
auto,fp8, andfp8_e4m3KV cache dtypes.Test Plan
H100(https://gist.github.com/zhewenl/5ada1e5f360c4d230bc8b6eff47effcc):
MI300 (failing with some numeric issues, will track in a separate issue/PR): https://gist.github.com/zhewenl/3224057e57aad300341c8a0d66bd9878