Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffra committed Jun 23, 2023
1 parent 24c7d7f commit 80ccaf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepspeed/runtime/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ def _configure_distributed_model(self, model):
self.__check_params(self.module, torch.float)

# zero.Init() handles device placement of model
if not (self.dont_change_device or is_zero3_model):
if not self.dont_change_device:
self.module.to(self.device)

# MoE related initialization
Expand Down Expand Up @@ -1080,7 +1080,7 @@ def _configure_distributed_model(self, model):
self.expert_parallel_group = groups._get_expert_parallel_group_dict()
self.expert_data_parallel_group = groups._get_expert_data_parallel_group_dict()

if not (self.amp_enabled() or is_zero3_model):
if not self.amp_enabled():
self._broadcast_model()

# check if parameters are duplicated in optimizer param_groups
Expand Down

0 comments on commit 80ccaf9

Please sign in to comment.