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

Method exist

python/tvm/runtime/device.py:38–51  ·  view source on GitHub ↗

Whether this device exists. Returns True if TVM has support for the device, if the physical device is present, and the device is accessible through appropriate drivers (e.g. CUDA/Vulkan). Returns ------- exist : bool True if the device ex

(self)

Source from the content-addressed store, hash-verified

36
37 @property
38 def exist(self):
39 """Whether this device exists.
40
41 Returns True if TVM has support for the device, if the
42 physical device is present, and the device is accessible
43 through appropriate drivers (e.g. CUDA/Vulkan).
44
45 Returns
46 -------
47 exist : bool
48 True if the device exists
49
50 """
51 return self._GetDeviceAttr(self.dlpack_device_type(), self.index, 0) != 0
52
53 @property
54 def max_threads_per_block(self):

Callers 1

bind_assign_valueFunction · 0.45

Calls 1

_GetDeviceAttrMethod · 0.95

Tested by

no test coverage detected