Skip to content

Commit 3999442

Browse files
rasmithRandall Smith
andauthored
[CI/Build][AMD] Add check for flash_att_varlen_func to test_tree_attention.py (#29252)
Signed-off-by: Randall Smith <[email protected]> Co-authored-by: Randall Smith <[email protected]>
1 parent 71362ff commit 3999442

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/v1/spec_decode/test_tree_attention.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import math
55

6+
import pytest
67
import torch
78

89
from tests.v1.attention.utils import (
@@ -11,9 +12,16 @@
1112
try_get_attention_backend,
1213
)
1314
from vllm.attention.backends.registry import AttentionBackendEnum
15+
from vllm.attention.utils.fa_utils import is_flash_attn_varlen_func_available
1416
from vllm.config import ParallelConfig, SpeculativeConfig
1517
from vllm.v1.attention.backends.utils import CommonAttentionMetadata
1618

19+
if not is_flash_attn_varlen_func_available():
20+
pytest.skip(
21+
"This test requires flash_attn_varlen_func, but it's not available.",
22+
allow_module_level=True,
23+
)
24+
1725

1826
class MockAttentionLayer(torch.nn.Module):
1927
_q_scale = torch.tensor(1.0, dtype=torch.float32, device="cuda")

0 commit comments

Comments
 (0)