Rate this Page

torch.cuda.memory.list_gpu_processes#

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

Return a human-readable printout of the running processes and their GPU memory use for a given device.

This can be useful to display periodically during training, or whenhandling out-of-memory exceptions.

Parameters

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

Return type

str