Skip to content

Commit

Permalink
Set the CUDA stream before calling cublas.
Browse files Browse the repository at this point in the history
Signed-off-by: George Bosilca <[email protected]>
  • Loading branch information
bosilca committed Aug 2, 2023
1 parent 77c8e9f commit cf33780
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dtd_wrappers/zgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ parsec_core_zgemm_cuda(parsec_device_gpu_module_t* gpu_device,

handles = parsec_info_get(&gpu_stream->infos, CuHI);

parsec_cuda_exec_stream_t* cuda_stream = (parsec_cuda_exec_stream_t*)gpu_stream;
cublasSetStream( handles->cublas_handle, cuda_stream->cuda_stream );
status = cublasZgemm(handles->cublas_handle, transA, transB,
n, m, k,
&alphag, (cuDoubleComplex*)Ag, lda,
Expand Down
2 changes: 2 additions & 0 deletions src/dtd_wrappers/zherk.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ parsec_core_zherk_cuda(parsec_device_gpu_module_t* gpu_device,
}
#endif /* defined(PARSEC_DEBUG_NOISIER) */

parsec_cuda_exec_stream_t* cuda_stream = (parsec_cuda_exec_stream_t*)gpu_stream;
cublasSetStream( handles->cublas_handle, cuda_stream->cuda_stream );
status = cublasZherk(handles->cublas_handle, uplo, trans,
m, n,
&alpha, (cuDoubleComplex*)Ag, lda,
Expand Down
2 changes: 2 additions & 0 deletions src/dtd_wrappers/ztrsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ parsec_core_ztrsm_cuda(parsec_device_gpu_module_t* gpu_device,
}
#endif /* defined(PARSEC_DEBUG_NOISIER) */

parsec_cuda_exec_stream_t* cuda_stream = (parsec_cuda_exec_stream_t*)gpu_stream;
cublasSetStream( handles->cublas_handle, cuda_stream->cuda_stream );
status = cublasZtrsm(handles->cublas_handle,
side, uplo, trans, diag,
m, n, &alphag,
Expand Down

0 comments on commit cf33780

Please sign in to comment.