torch.cuda.device_memory_used¶
- torch.cuda.device_memory_used(device=None)[source]¶
Return used global (device) memory in bytes as given by nvidia-smi or amd-smi.
- Parameters
device (torch.device or int, optional) – selected device. Returns statistic for the current device, given by
current_device()
, ifdevice
isNone
(default).- Return type