Skip to content

Commit

Permalink
Fix uninitialized cuda event
Browse files Browse the repository at this point in the history
  • Loading branch information
lowener committed Sep 11, 2024
1 parent e76eb18 commit 64a9e2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/include/raft/linalg/detail/eig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,11 @@ void eigDC(raft::resources const& handle,
int cudart_version = 0;
RAFT_CUDA_TRY(cudaRuntimeGetVersion(&cudart_version));
cudaStream_t stream_new;
cudaEvent_t sync_event;
cudaEvent_t sync_event = resource::detail::get_cuda_stream_sync_event(handle);
rmm::cuda_stream stream_new_wrapper;
if (cudart_version < 12050) {
// Use a new stream instead of `cudaStreamPerThread` to avoid cusolver bug # 4580093.
stream_new = stream_new_wrapper.value();
sync_event = resource::detail::get_cuda_stream_sync_event(handle);
RAFT_CUDA_TRY(cudaEventRecord(sync_event, stream));
RAFT_CUDA_TRY(cudaStreamWaitEvent(stream_new, sync_event));
} else {
Expand Down

0 comments on commit 64a9e2e

Please sign in to comment.