Rate this Page

torch.xpu.memory.memory_reserved#

torch.xpu.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 orstr,optional) – selected device. Returnsstatistic for the current device, given bycurrent_device(),ifdevice isNone (default).

Return type

int