[Openmp-commits] [PATCH] D142512: [OpenMP][libomptarget] Fix mapping/prelock.cpp test

Kevin Sala Penadés via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 24 15:39:11 PST 2023


kevinsala created this revision.
kevinsala added reviewers: jdoerfert, ye-luo, carlo.bertolli, jhuber6.
kevinsala added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
kevinsala requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.

Do not map a device accessible pointer which cannot be accessed by the host. Use is_device_ptr instead. Enable again the test for NextGen plugins.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142512

Files:
  openmp/libomptarget/test/mapping/prelock.cpp


Index: openmp/libomptarget/test/mapping/prelock.cpp
===================================================================
--- openmp/libomptarget/test/mapping/prelock.cpp
+++ openmp/libomptarget/test/mapping/prelock.cpp
@@ -1,5 +1,4 @@
-// RUN: %libomptarget-compilexx-generic
-// RUN: env LIBOMPTARGET_NEXTGEN_PLUGINS=0 %libomptarget-run-generic %fcheck-generic
+// RUN: %libomptarget-compilexx-run-and-check-generic
 
 // UNSUPPORTED: aarch64-unknown-linux-gnu
 // UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
@@ -37,11 +36,11 @@
   for (int i = 10; i < 20; i++)
     unlocked[i] += 1;
 
-#pragma omp target teams distribute parallel for map(tofrom : locked[ : n])
+#pragma omp target teams distribute parallel for is_device_ptr(locked)
   for (int i = 0; i < n; i++)
     locked[i] += 1;
 
-#pragma omp target teams distribute parallel for map(tofrom : locked[10 : 10])
+#pragma omp target teams distribute parallel for is_device_ptr(locked)
   for (int i = 10; i < 20; i++)
     locked[i] += 1;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142512.491940.patch
Type: text/x-patch
Size: 997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230124/97dfe55f/attachment-0001.bin>


More information about the Openmp-commits mailing list