Stable runtime helpers#
FlyDSL exposes two stable host-side helpers for selecting architecture-specific
kernel paths. Import them from flydsl.runtime.device:
from flydsl.runtime.device import get_rocm_arch, is_rdna_arch
get_rocm_arch()#
Return a lower-case ROCm architecture name such as gfx942 or gfx1201.
The helper checks, in order:
FLYDSL_GPU_ARCH;HSA_OVERRIDE_GFX_VERSION;the first GPU reported by
rocm_agent_enumerator;gfx942as a best-effort fallback when detection is unavailable.
An override may use either the normal gfx* spelling or ROCm’s dotted form;
for example, 9.4.2 is normalized to gfx942.
is_rdna_arch(arch=None)#
Return whether an architecture belongs to an RDNA family. Passing None
uses get_rocm_arch(). The recognized prefixes are gfx10, gfx11, and
gfx120. gfx1250 is wave32 CDNA5 and is intentionally not classified as
RDNA.
arch = get_rocm_arch()
uses_rdna_instructions = is_rdna_arch(arch)
Only these two runtime paths are part of the stable API contract. Runtime implementation, registration, and compatibility machinery is intentionally omitted from the public reference. See API Stability for the exact stability rules and Architecture & compilation pipeline guide for compiler, cache, and debug configuration.