@@ -130,29 +130,14 @@ class DeepSpeedEngine(Module):
...
@@ -130,29 +130,14 @@ class DeepSpeedEngine(Module):
ifdist_init_requiredisFalse:
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()"
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.
# Initialize torch distributed if needed
ifdist_init_requiredandnotdist.is_initialized():
init_distributed(dist_backend=self.dist_backend)
# discover using mpi4py if user specifies the flag