Skip to content

Commit

Permalink
fix mp sync params when dp_degree=1 (PaddlePaddle#57918)
Browse files Browse the repository at this point in the history
  • Loading branch information
haohongxiang authored and jiahy0825 committed Oct 16, 2023
1 parent 698eb42 commit c1a9f4b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def _prepare_for_model(self):
logger.info("start broadcast sharding parameters")
broadcast_sharding_parameters(self._layers, self._hcg)

logger.info("start broadcast dp parameters")
broadcast_dp_parameters(self._layers, self._hcg)
if self._hcg.get_data_parallel_world_size() > 1:
logger.info("start broadcast dp parameters")
broadcast_dp_parameters(self._layers, self._hcg)

logger.info("mp's parameters is ready")

Expand Down

0 comments on commit c1a9f4b

Please sign in to comment.