torch.cuda.memory.memory_reserved#
- torch.cuda.memory.memory_reserved(device=None)[source]#
Return the current GPU memory managed by the caching allocator in bytes for a given device.
- Parameters
device (torch.device orint,optional) – selected device. Returnsstatistic for the current device, given by
current_device(),ifdeviceisNone(default).- Return type
Note
SeeMemory management for more details about GPU memorymanagement.