Skip to content

Commit

Permalink
fix skip logic
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Wilkinson <[email protected]>
  • Loading branch information
LucasWilkinson committed Jan 24, 2025
1 parent a482f58 commit 08ecfcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/kernels/test_cascade_flash_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def test_cascade(
fa_version: int,
) -> None:
torch.set_default_device("cuda")
if is_fa_version_supported(fa_version):
pytest.skip("Flash attention version not supported due to: " + \
fa_version_unsupported_reason(fa_version))
if not is_fa_version_supported(fa_version):
pytest.skip(f"Flash attention version {fa_version} not supported due "
f"to: \"{fa_version_unsupported_reason(fa_version)}\"")

current_platform.seed_everything(0)

Expand Down
8 changes: 4 additions & 4 deletions tests/kernels/test_flash_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def test_flash_attn_with_paged_kv(
fa_version: int,
) -> None:
torch.set_default_device("cuda")
if is_fa_version_supported(fa_version):
pytest.skip(f"Flash attention version {fa_version} not supported due "
if not is_fa_version_supported(fa_version):
pytest.skip(f"Flash attention version {fa_version} not supported due "
f"to: \"{fa_version_unsupported_reason(fa_version)}\"")

current_platform.seed_everything(0)
Expand Down Expand Up @@ -183,8 +183,8 @@ def test_varlen_with_paged_kv(
fa_version: int,
) -> None:
torch.set_default_device("cuda")
if is_fa_version_supported(fa_version):
pytest.skip(f"Flash attention version {fa_version} not supported due "
if not is_fa_version_supported(fa_version):
pytest.skip(f"Flash attention version {fa_version} not supported due "
f"to: \"{fa_version_unsupported_reason(fa_version)}\"")
current_platform.seed_everything(0)
num_seqs = len(seq_lens)
Expand Down

0 comments on commit 08ecfcc

Please sign in to comment.