[Openmp-commits] [openmp] [NFC][OpenMP][Flang] Add test for OpenMP target parallel do (PR #77776)

Dominik Adamski via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 18 04:20:24 PST 2024


================
@@ -0,0 +1,31 @@
+! Basic offloading test with a target region
+! REQUIRES: flang
+! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
+! UNSUPPORTED: aarch64-unknown-linux-gnu
+! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
+! UNSUPPORTED: x86_64-pc-linux-gnu
+! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
+
+! RUN: %libomptarget-compile-fortran-run-and-check-generic
+program main
+   use omp_lib
+   integer :: x(100)
+   integer :: errors = 0
+   integer :: i
+
+   !$omp target parallel do map(from: x)
+   do i = 1, 100
+       x(i) = i
+   end do
+   !$omp end target parallel do
----------------
DominikAdamski wrote:

Done. Instead of modifying the code I based on libomptarget runtime logs (similar test case: https://github.com/llvm/llvm-project/blob/main/openmp/libomptarget/test/offloading/ompx_bare.c )

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


More information about the Openmp-commits mailing list