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.
()
| 203 | |
| 204 | |
| 205 | def 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 | |
| 214 | def has_gpu() -> bool: |
no test coverage detected
searching dependent graphs…