tvm_tirx.testing.env

Contents

tvm_tirx.testing.env#

Local runtime, device, and compiler capability probes.

Functions#

has_cuda()

True if a CUDA device is present.

has_rocm()

True if a ROCm device is present.

has_vulkan()

True if a Vulkan device is present.

has_metal()

True if a Metal device is present.

has_opencl()

True if an OpenCL device is present.

has_nvptx()

True if NVPTX is usable: a (CUDA) device, plus the LLVM backend it needs.

has_llvm()

True if the LLVM backend was built in.

has_gpu()

True if any GPU backend (cuda/rocm/opencl/metal/vulkan) is present.

has_multi_gpu([count])

True if at least count devices of a single GPU backend exist.

cuda_arch([device_id])

Return a CUDA device's canonical runtime architecture, if available.

has_cuda_arch(*arches[, device_id])

True if a CUDA device exactly matches one of arches.

has_cuda_compute(major[, minor, exact])

True if the CUDA compute capability satisfies (major, minor).

has_nvcc_version(major[, minor, release])

True if a CUDA device is present and nvcc is at least (major, minor, release).

has_llvm_min_version(major)

True if LLVM is available and its major version is at least major.

has_matrixcore()

True if a ROCm device with Matrix Core support (compute >= 8) exists.

has_cudagraph()

True if a CUDA device is present and the toolkit supports CUDA Graphs.

has_cpu_feature(features)

True if the host CPU supports features (a name or list of names).

has_x86_vnni()

True if the host CPU supports x86 VNNI (AVX512-VNNI or AVX-VNNI).

has_x86_avx512()

True if the host CPU supports the x86 AVX512 extensions.