MCPcopy Create free account
hub / github.com/dmlc/xgboost / device_mem_total

Function device_mem_total

demo/guide-python/external_memory.py:57–63  ·  view source on GitHub ↗

The total number of bytes of memory this GPU has.

()

Source from the content-addressed store, hash-verified

55
56
57def device_mem_total() -> int:
58 """The total number of bytes of memory this GPU has."""
59 import cuda.bindings.runtime as cudart
60
61 status, _, total = cudart.cudaMemGetInfo()
62 _checkcu(status)
63 return total
64
65
66def make_batches(

Callers 2

setup_async_poolFunction · 0.70
setup_rmmFunction · 0.70

Calls 1

_checkcuFunction · 0.70

Tested by

no test coverage detected