Skip to content

Commit 08ecfcc

Browse files
fix skip logic
Signed-off-by: Lucas Wilkinson <lwilkinson@neuralmagic.com>
1 parent a482f58 commit 08ecfcc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/kernels/test_cascade_flash_attn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def test_cascade(
9393
fa_version: int,
9494
) -> None:
9595
torch.set_default_device("cuda")
96-
if is_fa_version_supported(fa_version):
97-
pytest.skip("Flash attention version not supported due to: " + \
98-
fa_version_unsupported_reason(fa_version))
96+
if not is_fa_version_supported(fa_version):
97+
pytest.skip(f"Flash attention version {fa_version} not supported due "
98+
f"to: \"{fa_version_unsupported_reason(fa_version)}\"")
9999

100100
current_platform.seed_everything(0)
101101

tests/kernels/test_flash_attn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def test_flash_attn_with_paged_kv(
9797
fa_version: int,
9898
) -> None:
9999
torch.set_default_device("cuda")
100-
if is_fa_version_supported(fa_version):
101-
pytest.skip(f"Flash attention version {fa_version} not supported due "
100+
if not is_fa_version_supported(fa_version):
101+
pytest.skip(f"Flash attention version {fa_version} not supported due "
102102
f"to: \"{fa_version_unsupported_reason(fa_version)}\"")
103103

104104
current_platform.seed_everything(0)
@@ -183,8 +183,8 @@ def test_varlen_with_paged_kv(
183183
fa_version: int,
184184
) -> None:
185185
torch.set_default_device("cuda")
186-
if is_fa_version_supported(fa_version):
187-
pytest.skip(f"Flash attention version {fa_version} not supported due "
186+
if not is_fa_version_supported(fa_version):
187+
pytest.skip(f"Flash attention version {fa_version} not supported due "
188188
f"to: \"{fa_version_unsupported_reason(fa_version)}\"")
189189
current_platform.seed_everything(0)
190190
num_seqs = len(seq_lens)

0 commit comments

Comments
 (0)