Skip to content
Merged
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
12 changes: 11 additions & 1 deletion aiter/ops/flydsl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,15 @@ def get_shared_memory_per_block(device=None, fallback_gfx: str = "") -> int:
return _get_shared_memory_per_block_cached(device, fallback_gfx)


@lru_cache(maxsize=1)
def is_flydsl_available() -> bool:
return importlib.util.find_spec("flydsl") is not None
if importlib.util.find_spec("flydsl") is None:
return False
# flydsl only ships kernels for the architectures in its SMEM_CAPACITY_MAP.
# On other archs (e.g. gfx1100 / RDNA3) importing the kernel modules crashes
# during config registration, so report flydsl as unavailable there instead
# of failing the import.
from flydsl.runtime.device import get_rocm_arch
from flydsl.utils.smem_allocator import SMEM_CAPACITY_MAP

return get_rocm_arch() in SMEM_CAPACITY_MAP
Comment thread
mgehre-amd marked this conversation as resolved.
Loading