Skip to content

Commit 1cd9bbc

Browse files
[Iluvatar GPU] Fix nan (#2339)
1 parent 56be0ec commit 1cd9bbc

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

backends/iluvatar_gpu/runtime/runtime.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,9 @@ C_Status RecordEvent(const C_Device device, C_Stream stream, C_Event event) {
674674
}
675675

676676
cudaError_t cuda_status;
677-
678-
cudaError_t query_status = cudaEventQuery(cudaEvent_t(event));
679-
if (query_status == cudaErrorNotReady) {
680-
cuda_status = cudaEventSynchronize(cudaEvent_t(event));
681-
if (cuda_status != cudaSuccess) {
682-
return C_ERROR;
683-
}
677+
cuda_status = cudaStreamSynchronize(cudaStream_t(stream));
678+
if (cuda_status != cudaSuccess) {
679+
return C_ERROR;
684680
}
685681

686682
cuda_status = cudaEventRecord(cudaEvent_t(event), cudaStream_t(stream));

0 commit comments

Comments
 (0)