[Openmp-commits] [openmp] [OpenMP][libomptarget] Enable automatic unified shared memory executi… (PR #75999)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 22 09:05:20 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 650119c737c12860af7b7e661f5c3c0dc1400010 b8ea45e8e370b2ff158d15f5831959cbb2d0113e -- openmp/libomptarget/test/mapping/auto_zero_copy.cpp openmp/libomptarget/include/Shared/PluginAPI.h openmp/libomptarget/include/Shared/PluginAPI.inc openmp/libomptarget/include/Shared/Requirements.h openmp/libomptarget/include/device.h openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h openmp/libomptarget/plugins-nextgen/common/include/PluginInterface.h openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp openmp/libomptarget/src/OpenMP/Mapping.cpp openmp/libomptarget/src/PluginManager.cpp openmp/libomptarget/src/device.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/openmp/libomptarget/test/mapping/auto_zero_copy.cpp b/openmp/libomptarget/test/mapping/auto_zero_copy.cpp
index 80bb3d24a0..be22f3346e 100644
--- a/openmp/libomptarget/test/mapping/auto_zero_copy.cpp
+++ b/openmp/libomptarget/test/mapping/auto_zero_copy.cpp
@@ -4,8 +4,8 @@
 // RUN: | %fcheck-generic -check-prefix=INFO_ZERO -check-prefix=CHECK
 
 // RUN: %libomptarget-compilexx-generic
-// RUN: env HSA_XNACK=1 LIBOMPTARGET_INFO=30 USE_USM=1 %libomptarget-run-generic 2>&1 \
-// RUN: | %fcheck-generic -check-prefix=INFO_ZERO -check-prefix=CHECK
+// RUN: env HSA_XNACK=1 LIBOMPTARGET_INFO=30 USE_USM=1 %libomptarget-run-generic
+// 2>&1 \ RUN: | %fcheck-generic -check-prefix=INFO_ZERO -check-prefix=CHECK
 
 // RUN: %libomptarget-compilexx-generic
 // RUN: env HSA_XNACK=0 LIBOMPTARGET_INFO=30 %libomptarget-run-generic 2>&1 \
@@ -35,13 +35,18 @@ int main() {
   for (int i = 0; i < n; i++)
     b[i] = i;
 
-  // INFO_ZERO: Return HstPtrBegin 0x{{.*}} Size=4096 for unified shared memory
-  // INFO_ZERO: Return HstPtrBegin 0x{{.*}} Size=4096 for unified shared memory
+    // INFO_ZERO: Return HstPtrBegin 0x{{.*}} Size=4096 for unified shared
+    // memory INFO_ZERO: Return HstPtrBegin 0x{{.*}} Size=4096 for unified
+    // shared memory
 
-  // INFO_COPY: Creating new map entry with HstPtrBase=0x{{.*}}, HstPtrBegin=0x{{.*}}, TgtAllocBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096,
-  // INFO_COPY: Creating new map entry with HstPtrBase=0x{{.*}}, HstPtrBegin=0x{{.*}}, TgtAllocBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096,
-  // INFO_COPY: Mapping exists with HstPtrBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096, DynRefCount=1 (update suppressed)
-  // INFO_COPY: Mapping exists with HstPtrBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096, DynRefCount=1 (update suppressed)
+    // INFO_COPY: Creating new map entry with HstPtrBase=0x{{.*}},
+    // HstPtrBegin=0x{{.*}}, TgtAllocBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}},
+    // Size=4096, INFO_COPY: Creating new map entry with HstPtrBase=0x{{.*}},
+    // HstPtrBegin=0x{{.*}}, TgtAllocBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}},
+    // Size=4096, INFO_COPY: Mapping exists with HstPtrBegin=0x{{.*}},
+    // TgtPtrBegin=0x{{.*}}, Size=4096, DynRefCount=1 (update suppressed)
+    // INFO_COPY: Mapping exists with HstPtrBegin=0x{{.*}},
+    // TgtPtrBegin=0x{{.*}}, Size=4096, DynRefCount=1 (update suppressed)
 #pragma omp target teams distribute parallel for map(tofrom : a[ : n])         \
     map(to : b[ : n])
   for (int i = 0; i < n; i++)

``````````

</details>


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


More information about the Openmp-commits mailing list