Skip to content

Commit dfd9b5d

Browse files
committed
fix smart schedule shadow sync bug
1 parent 0a6beca commit dfd9b5d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cuda/fastermoe/smart_schedule.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void fmoe_cuda_fused_backward_impl(
338338
collect_fn(si, i / num_expert, 0);
339339
if (i / num_expert == rank) {
340340
cudaEventCreate(evt_reduce + i % num_expert);
341-
cudaEventRecord(evt_reduce[i % num_expert], smgr->stream(num_expert));
341+
cudaEventRecord(evt_reduce[i % num_expert], smgr->stream(0));
342342
}
343343
++si;
344344
}
@@ -367,7 +367,6 @@ void fmoe_cuda_fused_backward_impl(
367367
for (long i = 0, si = 0; i < world_size * num_expert; ++i) {
368368
if (stored_models[i]) {
369369
if (i / num_expert == rank) {
370-
FMOE_SWE(smgr->stream(0), evt_reduce[i % num_expert]);
371370
FMOE_SWE(smgr->torchStream(), evt_reduce[i % num_expert]);
372371
set_grad_fn(si, i % num_expert);
373372
}

0 commit comments

Comments
 (0)