From 63cc112751de8755d92792b0b4156e8c18a6d6bb Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Thu, 20 Jun 2024 10:50:06 -0400 Subject: [PATCH] accelerator/cuca: Dereference pointer to stream cuMemcpyAsync and cuStreamSynchronize take a CUstream, not a pointer to CUstream. Signed-off-by: Joseph Schuchart --- opal/mca/accelerator/cuda/accelerator_cuda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/mca/accelerator/cuda/accelerator_cuda.c b/opal/mca/accelerator/cuda/accelerator_cuda.c index d09850bcdcd..0e80a64085c 100644 --- a/opal/mca/accelerator/cuda/accelerator_cuda.c +++ b/opal/mca/accelerator/cuda/accelerator_cuda.c @@ -499,13 +499,13 @@ static int accelerator_cuda_memcpy(int dest_dev_id, int src_dev_id, void *dest, * https://docs.nvidia.com/cuda/cuda-driver-api/api-sync-behavior.html * TODO: Add optimizations for type field */ result = cuMemcpyAsync((CUdeviceptr) dest, (CUdeviceptr) src, size, - (CUstream *) opal_accelerator_cuda_memcpy_stream.base.stream); + *(CUstream *) opal_accelerator_cuda_memcpy_stream.base.stream); if (OPAL_UNLIKELY(CUDA_SUCCESS != result)) { opal_show_help("help-accelerator-cuda.txt", "cuMemcpyAsync failed", true, dest, src, size, result); return OPAL_ERROR; } - result = cuStreamSynchronize((CUstream *) opal_accelerator_cuda_memcpy_stream.base.stream); + result = cuStreamSynchronize(*(CUstream *) opal_accelerator_cuda_memcpy_stream.base.stream); if (OPAL_UNLIKELY(CUDA_SUCCESS != result)) { opal_show_help("help-accelerator-cuda.txt", "cuStreamSynchronize failed", true, OPAL_PROC_MY_HOSTNAME, result);