Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed Oct 23, 2024
1 parent 0b0d943 commit f9b43e8
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions deepmd/pt/entrypoints/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,7 @@ def get_trainer(
local_rank = os.environ.get("LOCAL_RANK")
if local_rank is not None:
local_rank = int(local_rank)
nccl_available = dist.is_nccl_available()
gloo_available = dist.is_gloo_available()
# nccl first
if nccl_available:
backend = "nccl"
elif gloo_available:
backend = "gloo"
else:
raise RuntimeError(
"No suitable backend found. Neither NCCL nor Gloo is available."
)
dist.init_process_group(backend=backend)
dist.init_process_group(backend="cuda:nccl,cpu:gloo")

Check warning on line 108 in deepmd/pt/entrypoints/main.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/entrypoints/main.py#L108

Added line #L108 was not covered by tests

def prepare_trainer_input_single(
model_params_single, data_dict_single, rank=0, seed=None
Expand Down

0 comments on commit f9b43e8

Please sign in to comment.