Skip to content

Commit

Permalink
get attr
Browse files Browse the repository at this point in the history
  • Loading branch information
FeixLiu committed Oct 10, 2022
1 parent 8b8c64a commit 290be20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppfleetx/core/engine/eager_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ def configure_optimizers(self):
'sharding_degree']
self._sharding_offload = self._dist_configs['sharding'][
'sharding_offload']
self._reduce_overlap = self._dist_configs['sharding']['reduce_overlap']
self._reduce_overlap = getattr(self._dist_configs['sharding'], 'reduce_overlap', False)
if self._sharding_degree > 1 and self._reduce_overlap:
if self._sharding_stage == 3 or self._sharding_offload:
self._reduce_overlap = False
logger.warning("reduce overlap only valid for sharding stage 2 without offload")
self._broadcast_overlap = self._dist_configs['sharding']['broadcast_overlap']
self._broadcast_overlap = getattr(self._dist_configs['sharding'], 'broadcast_overlap', False)
if self._sharding_degree > 1 and self._broadcast_overlap:
if self._sharding_stage == 3 or self._sharding_offload:
self._broadcast_overlap = False
Expand Down

0 comments on commit 290be20

Please sign in to comment.