Is there a way to choose the number of cpus/threads when running trainer.fit()?
Right now it seems that it uses all that are available, but I would like to limit this in some way
I see there are options to choose the number of gpus, but is there nothing for cpus?
goku
January 4, 2021, 7:09pm
2
hmm im not sure. in the docs it say that only works with distributed_backend=”ddp_cpu”
?
num_processes ([
int ]) – number of processes for distributed training with distributed_backend=”ddp_cpu”
jirka
January 6, 2021, 7:11pm
4
yes, num_processes
is used only with ddp_cpu
as distributed backend, so in 1.2 we will set the num always to max unless you define any other number; for now, you can use num_processes=os.cpu_count()
will there be a way to set the number of cpus to any number (not max) in the future?