I can use this torch.cuda.device_count() to check the number of GPUs. I was wondering if there was something equivalent to check the number of CPUs.
torch.cuda.device_count()
just use this :
os.cpu_count()