[Openmp-commits] [openmp] [OpenMP] Fix ompx_dump_mapping_tables lit test (PR #85754)

via Openmp-commits openmp-commits at lists.llvm.org
Tue Mar 19 02:14:18 PDT 2024


================
@@ -6,33 +6,28 @@
 #define N 10
 
 int main() {
-  int *a = new int[N]; // mapped and released from device 0
-  int *b = new int[N]; // mapped to device 2
+  int *a = new __int32_t[N];     // mapped and released from device 0
+  int *b = new __int32_t[2 * N]; // mapped to device 0
 
   // clang-format off
   // CHECK: Mapping tables after target enter data:
   // CHECK-NEXT: omptarget device 0 info: OpenMP Host-Device pointer mappings after block
   // CHECK-NEXT: omptarget device 0 info: Host Ptr Target Ptr Size (B) DynRefCount HoldRefCount Declaration
-  // CHECK-NEXT: omptarget device 0 info: {{(0x[0-9a-f]{16})}} {{(0x[0-9a-f]{16})}}
-  // CHECK-NEXT: omptarget device 1 info: OpenMP Host-Device pointer mappings table empty
-  // CHECK-NEXT: omptarget device 2 info: OpenMP Host-Device pointer mappings after block
-  // CHECK-NEXT: omptarget device 2 info: Host Ptr Target Ptr Size (B) DynRefCount HoldRefCount Declaration
-  // CHECK-NEXT: omptarget device 2 info: {{(0x[0-9a-f]{16})}} {{(0x[0-9a-f]{16})}}
-  // clang-format on
+  // CHECK-NEXT: omptarget device 0 info: {{(0x[0-9a-f]{16})}} {{(0x[0-9a-f]{16})}} 40
+  // CHECK-NEXT: omptarget device 0 info: {{(0x[0-9a-f]{16})}} {{(0x[0-9a-f]{16})}} 80
----------------
nicebert wrote:

Made order of appearance  irrelevant for the first dump (could've just gotten rid of the size tbh)

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


More information about the Openmp-commits mailing list