Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions aiter/ops/topk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions op_tests/test_topk_per_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand Down
Loading