[Openmp-commits] [openmp] [OpenMP] Fix build breakage (NFC) (PR #80313)
Kelvin Li via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 1 10:32:48 PST 2024
https://github.com/kkwli updated https://github.com/llvm/llvm-project/pull/80313
>From ddacdb587b3f92a1a59ddfb150067409ea723271 Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Thu, 1 Feb 2024 00:25:39 -0500
Subject: [PATCH 1/2] [OpenMP] Fix build failure
---
openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
index 5ed73d103584d..f7b791b8420dc 100644
--- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
@@ -69,7 +69,7 @@ cuMemGetAllocationGranularity(size_t *granularity,
#if (defined(CUDA_VERSION) && (CUDA_VERSION < 11020))
// Forward declarations of asynchronous memory management functions. This is
// necessary for older versions of CUDA.
-CUresult cuMemAllocAsync(CUdeviceptr *ptr, size_t, CUstream) { *ptr = nullptr; }
+CUresult cuMemAllocAsync(CUdeviceptr *ptr, size_t, CUstream) { ptr = nullptr; }
CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) {}
#endif
>From ca4cc12e369a9273a24000ab952f57f507f300b5 Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Thu, 1 Feb 2024 13:30:04 -0500
Subject: [PATCH 2/2] Set it to zero instead
---
openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
index f7b791b8420dc..f85a00cd1cd53 100644
--- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
@@ -69,7 +69,7 @@ cuMemGetAllocationGranularity(size_t *granularity,
#if (defined(CUDA_VERSION) && (CUDA_VERSION < 11020))
// Forward declarations of asynchronous memory management functions. This is
// necessary for older versions of CUDA.
-CUresult cuMemAllocAsync(CUdeviceptr *ptr, size_t, CUstream) { ptr = nullptr; }
+CUresult cuMemAllocAsync(CUdeviceptr *ptr, size_t, CUstream) { *ptr = 0; }
CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) {}
#endif
More information about the Openmp-commits
mailing list