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

Function has_nvshmem

python/tvm/testing/env.py:286–298  ·  view source on GitHub ↗

True if the disco NVSHMEM runtime is available (requires CUDA). Probes the runtime global function rather than the ``USE_NVSHMEM`` build flag, since the flag can be set in builds that do not ship the runtime.

()

Source from the content-addressed store, hash-verified

284
285@functools.cache
286def has_nvshmem() -> bool:
287 """True if the disco NVSHMEM runtime is available (requires CUDA).
288
289 Probes the runtime global function rather than the ``USE_NVSHMEM`` build
290 flag, since the flag can be set in builds that do not ship the runtime.
291 """
292 try:
293 return has_cuda() and (
294 tvm.get_global_func("runtime.disco.nvshmem.init_nvshmem_uid", allow_missing=True)
295 is not None
296 )
297 except Exception: # pylint: disable=broad-except
298 return False
299
300
301# --- version / capability probes -------------------------------------------

Callers

nothing calls this directly

Calls 2

has_cudaFunction · 0.85
get_global_funcMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…