[Bugfix/CI] Fix broken kernels/test_mha.py (#12450)

This commit is contained in:
Tyler Michael Smith
2025-01-26 10:39:03 -08:00
committed by GitHub
parent aa2cd2c43d
commit 72f4880425
2 changed files with 10 additions and 2 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ def clear_cache():
@pytest.mark.parametrize("device", ["cpu", "hip", "cuda"])
def test_mha_attn_platform(device: str):
"""
Test that the attention selector between different platform and device.
Test the attention selector between different platform and device.
"""
torch.set_default_dtype(torch.float16)
@@ -41,7 +41,7 @@ def test_mha_attn_platform(device: str):
else:
with patch("vllm.attention.selector.current_platform", CudaPlatform()):
attn = MultiHeadAttention(16, 64, scale=1)
assert attn.attn_backend == _Backend.FLASH_ATTN
assert attn.attn_backend == _Backend.XFORMERS
with patch("vllm.attention.selector.current_platform", CudaPlatform()):
attn = MultiHeadAttention(16, 72, scale=1)