Skip to content

Commit

Permalink
set default NUM_WORKERS to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate committed Oct 15, 2024
1 parent 8a59a53 commit 7821997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/pd/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
ncpus = len(os.sched_getaffinity(0))
except AttributeError:
ncpus = os.cpu_count()
NUM_WORKERS = int(os.environ.get("NUM_WORKERS", min(4, ncpus)))
NUM_WORKERS = int(os.environ.get("NUM_WORKERS", min(0, ncpus)))
# Make sure DDP uses correct device if applicable
LOCAL_RANK = os.environ.get("LOCAL_RANK", None) or paddle.device.get_device()
LOCAL_RANK = int(0 if LOCAL_RANK is None else paddle.distributed.get_rank())
Expand Down

0 comments on commit 7821997

Please sign in to comment.