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

Function has_cudagraph

python/tvm/testing/env.py:390–403  ·  view source on GitHub ↗

True if a CUDA device is present and the toolkit supports CUDA Graphs. Implies :func:`has_cuda`: ``nvcc.have_cudagraph()`` only checks the toolkit version, so the device guard must be explicit. Gate a test with ``@pytest.mark.skipif(not tvm.testing.env.has_cudagraph(), reason=...)``

()

Source from the content-addressed store, hash-verified

388
389@functools.cache
390def has_cudagraph() -> bool:
391 """True if a CUDA device is present and the toolkit supports CUDA Graphs.
392
393 Implies :func:`has_cuda`: ``nvcc.have_cudagraph()`` only checks the
394 toolkit version, so the device guard must be explicit. Gate a test with
395 ``@pytest.mark.skipif(not tvm.testing.env.has_cudagraph(), reason=...)``
396 (add ``@pytest.mark.gpu`` for CI selection).
397 """
398 try:
399 from tvm.support import nvcc # pylint: disable=import-outside-toplevel
400
401 return has_cuda() and bool(nvcc.have_cudagraph())
402 except Exception: # pylint: disable=broad-except
403 return False
404
405
406# --- toolchain / environment probes ----------------------------------------

Callers

nothing calls this directly

Calls 1

has_cudaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…