Unverified Commit 59eed176 authored by Sean Naren's avatar Sean Naren Committed by GitHub
Browse files

Only initialize distributed if required (#734)


Co-authored-by: default avatarJeff Rasley <jerasley@microsoft.com>
parent e2dfe0d1
...@@ -131,8 +131,8 @@ class DeepSpeedEngine(Module): ...@@ -131,8 +131,8 @@ class DeepSpeedEngine(Module):
dist_init_required = not dist.is_initialized() dist_init_required = not dist.is_initialized()
if dist_init_required is False: if dist_init_required is False:
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() is True, "Torch distributed not initialized. Please set dist_init_required to True or initialize before calling deepspeed.initialize()"
else:
# Initialize torch distributed if needed # Initialize torch distributed if needed
init_distributed(dist_backend=self.dist_backend) init_distributed(dist_backend=self.dist_backend)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment