MCPcopy Create free account
hub / github.com/apache/tvm / has_llvm

Function has_llvm

python/tvm/testing/env.py:205–211  ·  view source on GitHub ↗

True if the LLVM backend was built in and enabled in TVM_TEST_TARGETS. Uses ``tvm.runtime.enabled`` rather than device existence: ``llvm`` maps to the CPU device, which exists even on a ``USE_LLVM=OFF`` build.

()

Source from the content-addressed store, hash-verified

203
204
205def has_llvm() -> bool:
206 """True if the LLVM backend was built in and enabled in TVM_TEST_TARGETS.
207
208 Uses ``tvm.runtime.enabled`` rather than device existence: ``llvm`` maps to
209 the CPU device, which exists even on a ``USE_LLVM=OFF`` build.
210 """
211 return _target_enabled("llvm") and _runtime_enabled("llvm")
212
213
214def has_gpu() -> bool:

Callers 2

has_nvptxFunction · 0.85
has_llvm_min_versionFunction · 0.85

Calls 2

_target_enabledFunction · 0.85
_runtime_enabledFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…