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

Function _cuda_compute_version

python/tvm/testing/env.py:305–313  ·  view source on GitHub ↗

Return the (major, minor) CUDA compute version, or (0, 0) if unknown.

()

Source from the content-addressed store, hash-verified

303
304@functools.cache
305def _cuda_compute_version() -> tuple:
306 """Return the (major, minor) CUDA compute version, or (0, 0) if unknown."""
307 try:
308 from tvm.support import nvcc # pylint: disable=import-outside-toplevel
309
310 arch = nvcc.get_target_compute_version()
311 return nvcc.parse_compute_version(arch)
312 except Exception: # pylint: disable=broad-except
313 return (0, 0)
314
315
316def has_cuda_compute(major: int, minor: int = 0, exact: bool = False) -> bool:

Callers 1

has_cuda_computeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…