torch.cuda.memory.get_per_process_memory_fraction# torch.cuda.memory.get_per_process_memory_fraction(device=None)[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