Commit 560d3f1b authored by Jiezhong Qiu's avatar Jiezhong Qiu
Browse files

sync every stream

parent 610752d2
...@@ -216,7 +216,9 @@ void moe_cuda_grad_weight( ...@@ -216,7 +216,9 @@ void moe_cuda_grad_weight(
grad_weight + gate_host[i] * out_feat * in_feat, grad_weight + gate_host[i] * out_feat * in_feat,
out_feat)); out_feat));
} }
checkCudaErrors(cudaDeviceSynchronize()); for (size_t i=0; i<num_expert; ++i) {
checkCudaErrors(cudaStreamSynchronize(*(h->streams + i)));
}
delete[] gate_host; delete[] gate_host;
} }
......
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