Rate this Page

torch.cuda.device_memory_used#

torch.cuda.device_memory_used(device=None)[source]#

Return used global (device) memory in bytes as given bynvidia-smi oramd-smi.

Parameters

device (torch.device orint,optional) – selected device. Returnsstatistic for the current device, given bycurrent_device(),ifdevice isNone (default).

Return type

int