| from .Common import * | |
| def GetNumberOfPhysicalCores(): | |
| return 4 | |
| def GetNumberOfVirtualCores(): | |
| return 8 | |
| def CudaGpuAvailable(): | |
| if IsOsMac(): | |
| return False | |
| else: | |
| import torch # GetDevice | |
| return torch.cuda.is_available() | |
| def GetDevice(device): | |
| if device == "" or device == None: | |
| if CudaGpuAvailable(): | |
| device = "cuda:0" | |
| else: | |
| device = "cpu" | |
| return device | |