We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 249627a commit 6ea965bCopy full SHA for 6ea965b
2 files changed
deepmd/pt/utils/env.py
@@ -34,7 +34,7 @@
34
# only linux
35
ncpus = len(os.sched_getaffinity(0))
36
except AttributeError:
37
- ncpus = os.cpu_count()
+ ncpus = os.cpu_count() or 1
38
NUM_WORKERS = int(os.environ.get("NUM_WORKERS", min(4, ncpus)))
39
if multiprocessing.get_start_method() != "fork":
40
# spawn or forkserver does not support NUM_WORKERS > 0 for DataLoader
deepmd/pt_expt/utils/env.py
0 commit comments