[Openmp-commits] [openmp] 5f6640e - [OpenMP52][LIBOMPTARGET] Do not throw error in omp_get_mapped_ptr for the host (#80038)
via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 30 10:29:58 PST 2024
Author: Saiyedul Islam
Date: 2024-01-30T23:59:54+05:30
New Revision: 5f6640e268b5e6ead22983ba9e2074e3bbf0612b
URL: https://github.com/llvm/llvm-project/commit/5f6640e268b5e6ead22983ba9e2074e3bbf0612b
DIFF: https://github.com/llvm/llvm-project/commit/5f6640e268b5e6ead22983ba9e2074e3bbf0612b.diff
LOG: [OpenMP52][LIBOMPTARGET] Do not throw error in omp_get_mapped_ptr for the host (#80038)
OpenMP spec 5.2 specifies return value to be the host ptr
in case of device_num being same as omp_get_initial_device().
Added:
Modified:
openmp/libomptarget/src/OpenMP/API.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/src/OpenMP/API.cpp b/openmp/libomptarget/src/OpenMP/API.cpp
index a7b6eac8bcd65..1ab1877774f6e 100644
--- a/openmp/libomptarget/src/OpenMP/API.cpp
+++ b/openmp/libomptarget/src/OpenMP/API.cpp
@@ -598,7 +598,7 @@ EXTERN void *omp_get_mapped_ptr(const void *Ptr, int DeviceNum) {
size_t NumDevices = omp_get_initial_device();
if (DeviceNum == NumDevices) {
- REPORT("Device %d is initial device, returning Ptr " DPxMOD ".\n",
+ DP("Device %d is initial device, returning Ptr " DPxMOD ".\n",
DeviceNum, DPxPTR(Ptr));
return const_cast<void *>(Ptr);
}
More information about the Openmp-commits
mailing list