Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FastMoE
Commits
039b4550
Commit
039b4550
authored
Jun 01, 2022
by
Rick Ho
Browse files
add an option of init sync
parent
6fe415e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
fmoe/distributed.py
fmoe/distributed.py
+3
-1
No files found.
fmoe/distributed.py
View file @
039b4550
...
...
@@ -26,6 +26,7 @@ class DistributedGroupedDataParallel(nn.Module):
self
,
module
,
auto_allreduce
=
False
,
need_sync
=
True
,
**
kwargs
):
assert
not
auto_allreduce
,
"Automatic all-reduce is not implemented yet"
...
...
@@ -75,7 +76,8 @@ class DistributedGroupedDataParallel(nn.Module):
g
.
copy_
(
s
)
self
.
allreduce_params
=
allreduce_params
self
.
_sync_params
()
if
need_sync
:
self
.
_sync_params
()
def
_sync_params
(
self
):
groups
=
dict
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment