Commit 3b4a0a23 authored by Michael Carilli's avatar Michael Carilli
Browse files

Fixing syntax

parent 71957836
...@@ -194,9 +194,6 @@ class DistributedDataParallel(Module): ...@@ -194,9 +194,6 @@ class DistributedDataParallel(Module):
self.prof = prof self.prof = prof
if allreduce_different_streams and delay_allreduce:
raise ValueError("allreduce_different_streams may only be used if delay_allreduce=False.")
self.allreduce_different_streams = (num_allreduce_streams > 1) self.allreduce_different_streams = (num_allreduce_streams > 1)
self.num_allreduce_streams = num_allreduce_streams self.num_allreduce_streams = num_allreduce_streams
self.allreduce_communicators = allreduce_communicators self.allreduce_communicators = allreduce_communicators
...@@ -205,6 +202,9 @@ class DistributedDataParallel(Module): ...@@ -205,6 +202,9 @@ class DistributedDataParallel(Module):
assert len(allreduce_communicators[0]) == len(allreduce_communicators[1]) assert len(allreduce_communicators[0]) == len(allreduce_communicators[1])
assert allreduce_different_streams assert allreduce_different_streams
if self.allreduce_different_streams and delay_allreduce:
raise ValueError("allreduce_different_streams may only be used if delay_allreduce=False.")
if shared_param is not None: if shared_param is not None:
raise ValueError("shared_param is no longer supported as an option. It was misleadingly named from the start. It turns out overlapping communication with computation should work fine with shared parameters. If you still wish to delay communication to the end of the backward pass, use delay_allreduce=True|False instead.") raise ValueError("shared_param is no longer supported as an option. It was misleadingly named from the start. It turns out overlapping communication with computation should work fine with shared parameters. If you still wish to delay communication to the end of the backward pass, use delay_allreduce=True|False instead.")
......
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