Skip to content

Commit 5f6640e

Browse files
authored
[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().
1 parent 2e16500 commit 5f6640e

File tree

1 file changed

+1
-1
lines changed
  • openmp/libomptarget/src/OpenMP

1 file changed

+1
-1
lines changed

openmp/libomptarget/src/OpenMP/API.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ EXTERN void *omp_get_mapped_ptr(const void *Ptr, int DeviceNum) {
598598

599599
size_t NumDevices = omp_get_initial_device();
600600
if (DeviceNum == NumDevices) {
601-
REPORT("Device %d is initial device, returning Ptr " DPxMOD ".\n",
601+
DP("Device %d is initial device, returning Ptr " DPxMOD ".\n",
602602
DeviceNum, DPxPTR(Ptr));
603603
return const_cast<void *>(Ptr);
604604
}

0 commit comments

Comments
 (0)