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
dfd9b5d5
Commit
dfd9b5d5
authored
Sep 11, 2023
by
Rick Ho
Browse files
fix smart schedule shadow sync bug
parent
0a6becae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
cuda/fastermoe/smart_schedule.h
cuda/fastermoe/smart_schedule.h
+1
-2
No files found.
cuda/fastermoe/smart_schedule.h
View file @
dfd9b5d5
...
@@ -338,7 +338,7 @@ void fmoe_cuda_fused_backward_impl(
...
@@ -338,7 +338,7 @@ void fmoe_cuda_fused_backward_impl(
collect_fn
(
si
,
i
/
num_expert
,
0
);
collect_fn
(
si
,
i
/
num_expert
,
0
);
if
(
i
/
num_expert
==
rank
)
{
if
(
i
/
num_expert
==
rank
)
{
cudaEventCreate
(
evt_reduce
+
i
%
num_expert
);
cudaEventCreate
(
evt_reduce
+
i
%
num_expert
);
cudaEventRecord
(
evt_reduce
[
i
%
num_expert
],
smgr
->
stream
(
num_expert
));
cudaEventRecord
(
evt_reduce
[
i
%
num_expert
],
smgr
->
stream
(
0
));
}
}
++
si
;
++
si
;
}
}
...
@@ -367,7 +367,6 @@ void fmoe_cuda_fused_backward_impl(
...
@@ -367,7 +367,6 @@ void fmoe_cuda_fused_backward_impl(
for
(
long
i
=
0
,
si
=
0
;
i
<
world_size
*
num_expert
;
++
i
)
{
for
(
long
i
=
0
,
si
=
0
;
i
<
world_size
*
num_expert
;
++
i
)
{
if
(
stored_models
[
i
])
{
if
(
stored_models
[
i
])
{
if
(
i
/
num_expert
==
rank
)
{
if
(
i
/
num_expert
==
rank
)
{
FMOE_SWE
(
smgr
->
stream
(
0
),
evt_reduce
[
i
%
num_expert
]);
FMOE_SWE
(
smgr
->
torchStream
(),
evt_reduce
[
i
%
num_expert
]);
FMOE_SWE
(
smgr
->
torchStream
(),
evt_reduce
[
i
%
num_expert
]);
set_grad_fn
(
si
,
i
%
num_expert
);
set_grad_fn
(
si
,
i
%
num_expert
);
}
}
...
...
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