[llvm] [Offload] Fix dataDelete op for TARGET_ALLOC_HOST memory type (PR #91134)

Jhonatan Cléto via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 15:38:02 PDT 2024


================
@@ -461,7 +461,9 @@ void targetFreeExplicit(void *DevicePtr, int DeviceNum, int Kind,
   if (!DeviceOrErr)
     FATAL_MESSAGE(DeviceNum, "%s", toString(DeviceOrErr.takeError()).c_str());
 
-  DeviceOrErr->deleteData(DevicePtr, Kind);
+  if (DeviceOrErr->deleteData(DevicePtr, Kind))
----------------
cl3to wrote:

@jhuber6 Now if the dataDelete op fails, the program will be aborted. This causes tests like [offload/test/api/omp_host_pinned_memory.c](https://github.com/llvm/llvm-project/blob/main/offload/test/api/omp_host_pinned_memory.c) to fail if the op fails.

https://github.com/llvm/llvm-project/pull/91134


More information about the llvm-commits mailing list