From 9467539c930ff0bf054758b42a91f5894a97c022 Mon Sep 17 00:00:00 2001 From: Vorapol Assavasangthong Date: Wed, 2 Sep 2026 11:20:47 +0000 Subject: [PATCH] [FlyDSL] Remove stale TopK availability checks FlyDSL is required after #5116, so the removed helper breaks test collection and silently disables decode dispatch. Co-authored-by: Cursor --- aiter/ops/topk.py | 13 +------------ op_tests/test_topk_per_row.py | 3 +-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/aiter/ops/topk.py b/aiter/ops/topk.py index 8012db3e93..46b96009f6 100644 --- a/aiter/ops/topk.py +++ b/aiter/ops/topk.py @@ -475,17 +475,6 @@ def _top_k_per_row_decode( _FLYDSL_TOPK_DECODE_KS = (512, 1024, 2048, 4096) -@functools.lru_cache(maxsize=1) -def _flydsl_topk_decode_available() -> bool: - """Whether the optional FlyDSL package is available on this device.""" - try: - from .flydsl.utils import is_flydsl_available - - return is_flydsl_available() - except (ImportError, OSError, RuntimeError): - return False - - @functools.lru_cache(maxsize=128) def _flydsl_topk_decode_shape_supported( arch: str, @@ -524,7 +513,7 @@ def _should_use_flydsl_topk_decode( return False arch = get_gfx() - if arch not in _FLYDSL_TOPK_DECODE_GATES or not _flydsl_topk_decode_available(): + if arch not in _FLYDSL_TOPK_DECODE_GATES: return False if not _flydsl_topk_decode_shape_supported( diff --git a/op_tests/test_topk_per_row.py b/op_tests/test_topk_per_row.py index 37be29d038..a595adfc17 100644 --- a/op_tests/test_topk_per_row.py +++ b/op_tests/test_topk_per_row.py @@ -6,7 +6,6 @@ import aiter from aiter.jit.utils.chip_info import get_gfx -from aiter.ops.flydsl.utils import is_flydsl_available from aiter.test_common import benchmark, perftest @@ -510,7 +509,7 @@ def test_mb_workspace_reuse(): df = [] -flydsl_available = get_gfx() in ("gfx942", "gfx950") and is_flydsl_available() +flydsl_available = get_gfx() in ("gfx942", "gfx950") for data_generation in args.data_generation: for m in args.decode_batch_size: for ctx in args.context_len: