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
ec2d458d
Unverified
Commit
ec2d458d
authored
Jun 17, 2021
by
Rick Ho
Committed by
GitHub
Jun 17, 2021
Browse files
Merge pull request #51 from laekov/fix-expert-exchange
use single variable for returned value
parents
28bfe689
318513ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fmoe/gates/utils.py
fmoe/gates/utils.py
+1
-1
No files found.
fmoe/gates/utils.py
View file @
ec2d458d
...
@@ -16,7 +16,7 @@ def limit_by_capacity(topk_idx, num_expert, world_size, capacity):
...
@@ -16,7 +16,7 @@ def limit_by_capacity(topk_idx, num_expert, world_size, capacity):
new_gec
=
fmoe_native
.
limit_by_capacity
(
gec
,
capacity
,
new_gec
=
fmoe_native
.
limit_by_capacity
(
gec
,
capacity
,
num_expert
,
world_size
)
num_expert
,
world_size
)
if
world_size
>
1
:
if
world_size
>
1
:
new_lec
,
=
fmoe_native
.
expert_exchange
(
new_gec
,
num_expert
,
new_lec
=
fmoe_native
.
expert_exchange
(
new_gec
,
num_expert
,
world_size
)
world_size
)
else
:
else
:
new_lec
=
new_gec
new_lec
=
new_gec
...
...
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