Shortcuts

torch.cuda.get_per_process_memory_fraction

torch.cuda.get_per_process_memory_fraction(device=None)[source][source]

Get memory fraction for a process.

Parameters

device (torch.device or int, optional) – selected device. If it is None the default CUDA device is used.

Returns

memory fraction, in range 0~1. Allowed memory equals total_memory * fraction.

Return type

float

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources