[llvm] [offload][CUDA] Fix DLWRAP for memory routines (PR #190500)

Kevin Sala Penades via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 4 19:15:08 PDT 2026


https://github.com/kevinsala created https://github.com/llvm/llvm-project/pull/190500

None

>From a01ea9cbfeb2f5113513bc8eaf704012cecf9f60 Mon Sep 17 00:00:00 2001
From: Kevin Sala <salapenades1 at llnl.gov>
Date: Sat, 4 Apr 2026 19:10:53 -0700
Subject: [PATCH] [offload][CUDA] Fix DLWRAP for memory routines

---
 offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp b/offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp
index 8fc8d0e43fab2..00cf262df9aed 100644
--- a/offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp
+++ b/offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp
@@ -100,8 +100,6 @@ DLWRAP(cuEventSynchronize, 1)
 DLWRAP(cuEventElapsedTime, 3)
 DLWRAP(cuEventDestroy, 1)
 
-DLWRAP_FINALIZE()
-
 DLWRAP(cuMemUnmap, 2)
 DLWRAP(cuMemRelease, 1)
 DLWRAP(cuMemAddressFree, 2)
@@ -112,6 +110,8 @@ DLWRAP(cuMemCreate, 4)
 DLWRAP(cuMemSetAccess, 4)
 DLWRAP(cuMemGetAllocationGranularity, 3)
 
+DLWRAP_FINALIZE()
+
 #ifndef DYNAMIC_CUDA_PATH
 #define DYNAMIC_CUDA_PATH "libcuda.so"
 #endif



More information about the llvm-commits mailing list