@@ -121,25 +121,31 @@ class DeepSpeedEngine(Module):
self.loaded_checkpoint_dp_world_size=None
self.enable_backward_allreduce=True
self.progressive_layer_drop=None
self.dist_backend="nccl"
ifdist_init_requiredisNone:
dist_init_required=notdist.is_initialized()
ifdist_init_requiredisFalse:
assert(dist.is_initialized()==True),"Torch distributed not initialized. Please set dist_init_required to True or initialize before calling deepspeed.initialize()"
# DeepSpeed will initialize torch distributed only if the user has not already intialized it.
ifdist_init_requiredandnotdist.is_initialized():
# discover using mpi4py if user specifies the flag