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

Method l2_cache_size_bytes

python/tvm/runtime/device.py:224–239  ·  view source on GitHub ↗

Return the size of the device L2 cache in bytes Supported devices include CUDA/ROCM/OpenCL. Returns ------- l2_cache_size_bytes : int or None The size of the device L2 cache in bytes returned by device runtime API. Return None if the device d

(self)

Source from the content-addressed store, hash-verified

222
223 @property
224 def l2_cache_size_bytes(self):
225 """Return the size of the device L2 cache in bytes
226
227 Supported devices include CUDA/ROCM/OpenCL.
228
229 Returns
230 -------
231 l2_cache_size_bytes : int or None
232 The size of the device L2 cache in bytes returned by device runtime API.
233 Return None if the device does not support this feature.
234
235 Note
236 ----
237 The value returned by opencl's API is smaller than actual device L2 cache size.
238 """
239 return self._GetDeviceAttr(self.dlpack_device_type(), self.index, 13)
240
241 @property
242 def total_global_memory(self):

Callers

nothing calls this directly

Calls 1

_GetDeviceAttrMethod · 0.95

Tested by

no test coverage detected