MCPcopy Index your code
hub / github.com/apache/tvm / has_gpu

Function has_gpu

python/tvm/testing/env.py:214–222  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

212
213
214def has_gpu() -> bool:
215 """True if any GPU backend (cuda/rocm/opencl/metal/vulkan) is present."""
216 return (
217 _device_exists("cuda")
218 or _device_exists("rocm")
219 or _device_exists("opencl")
220 or _device_exists("metal")
221 or _device_exists("vulkan")
222 )
223
224
225@functools.cache

Callers

nothing calls this directly

Calls 1

_device_existsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…