2 // RUN: %libomptarget-compilexx-generic
3 // RUN: env LIBOMPTARGET_INFO=32 %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefix=NO-USM
5 // RUN: %libomptarget-compilexxx-generic-force-usm
6 // RUN: env HSA_XNACK=1 LIBOMPTARGET_INFO=32 \
7 // RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefix=FORCE-USM
9 // REQUIRES: unified_shared_memory
11 // UNSUPPORTED: nvptx64-nvidia-cuda
12 // UNSUPPORTED: nvptx64-nvidia-cuda-LTO
20 #pragma omp declare target
22 #pragma omp end declare target
29 int beta
[3] = {2, 5, 8};
31 // Require map clauses for non-USM execution
32 pGI
= (int *)malloc(sizeof(int));
35 #pragma omp target map(pGI[ : 1], GI)
50 // NO-USM: omptarget device 0 info: Copying data from host to device, HstPtr={{.*}}, TgtPtr={{.*}}, Size=4
51 // NO-USM-NEXT: omptarget device 0 info: Copying data from host to device, HstPtr={{.*}}, TgtPtr={{.*}}, Size=12
52 // NO-USM-NEXT: omptarget device 0 info: Copying data from host to device, HstPtr={{.*}}, TgtPtr={{.*}}, Size=4
53 // NO-USM-NEXT: omptarget device 0 info: Copying data from host to device, HstPtr={{.*}}, TgtPtr={{.*}}, Size=8, Name=pGI
54 // NO-USM-NEXT: omptarget device 0 info: Copying data from device to host, TgtPtr={{.*}}, HstPtr={{.*}}, Size=4
55 // NO-USM-NEXT: omptarget device 0 info: Copying data from device to host, TgtPtr={{.*}}, HstPtr={{.*}}, Size=12
56 // NO-USM-NEXT: omptarget device 0 info: Copying data from device to host, TgtPtr={{.*}}, HstPtr={{.*}}, Size=4
57 // NO-USM-NEXT: SUCCESS