Skip to content

Commit 7d24f92

Browse files
committed
fix ci fail on gfx942
1 parent 3504392 commit 7d24f92

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎op_tests/test_flydsl_gather_kv_b_proj.py‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import pytest
2222
import torch
2323

24+
import aiter
2425
from aiter import dtypes
2526
from aiter.jit.utils.chip_info import get_gfx
2627
from aiter.ops.flydsl.gather_kv_b_proj import gather_kv_b_proj_flydsl
@@ -35,8 +36,10 @@
3536
QK_NOPE_HEAD_DIM = 128
3637
V_HEAD_DIM = 128
3738

39+
SUPPORTED_GFX = ("gfx950",)
40+
3841
_SKIP = pytest.mark.skipif(
39-
get_gfx() not in ("gfx950",),
42+
get_gfx() not in SUPPORTED_GFX,
4043
reason="gfx950 FlyDSL required",
4144
)
4245

@@ -438,7 +441,13 @@ def _bench(num_tokens, n_heads):
438441
return us_tri, us_fly, tflops, out_gb
439442

440443

441-
if __name__ == "__main__":
444+
def main():
445+
if get_gfx() not in SUPPORTED_GFX:
446+
aiter.logger.warning(
447+
"FlyDSL gather_kv_b_proj unsupported on %s; skipping", get_gfx()
448+
)
449+
return
450+
442451
parser = argparse.ArgumentParser()
443452
parser.add_argument("-heads", type=int, default=12, help="tp_k_head_num")
444453
args = parser.parse_args()
@@ -454,3 +463,7 @@ def _bench(num_tokens, n_heads):
454463
print(
455464
f"| {m} | {us_t:.2f} | {us_f:.2f} | {us_t / us_f:.2f}x | {tf:.1f} | {gb:.1f} |"
456465
)
466+
467+
468+
if __name__ == "__main__":
469+
main()

0 commit comments

Comments
 (0)