[Openmp-commits] [openmp] [OpenMP][AMDGPU] Add interop support for OpenMP AMD GPU plugin (PR #88000)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Apr 8 07:36:40 PDT 2024


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 8ccf1c117b0dc08f7e9c24fe98f45ebe32e95cd1 f2a4e524a2be3384d940a4ae86510a8a18e22ea0 -- openmp/libomptarget/test/api/omp_interop_amdgpu.c openmp/libomptarget/include/OpenMP/InteropAPI.h openmp/libomptarget/include/OpenMP/omp.h openmp/libomptarget/include/Shared/PluginAPI.h openmp/libomptarget/include/Shared/PluginAPI.inc openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp openmp/libomptarget/plugins-nextgen/common/include/PluginInterface.h openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp openmp/libomptarget/src/OpenMP/InteropAPI.cpp openmp/runtime/src/kmp_ftn_entry.h
``````````

</details>

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

``````````diff
diff --git a/openmp/libomptarget/test/api/omp_interop_amdgpu.c b/openmp/libomptarget/test/api/omp_interop_amdgpu.c
index c66df93d44..26b9fbf5ce 100644
--- a/openmp/libomptarget/test/api/omp_interop_amdgpu.c
+++ b/openmp/libomptarget/test/api/omp_interop_amdgpu.c
@@ -35,11 +35,11 @@ int main() {
   // clang-format on
   vectorSet(N, 1.0, x);
 
-#pragma omp task depend(out : y [0:N])
+#pragma omp task depend(out : y[0 : N])
   vectorSet(N, -1.0, y);
 
-  // Get SyncObject for synchronization
-  // clang-format off
+// Get SyncObject for synchronization
+// clang-format off
   #pragma omp interop init(targetsync : SyncObj) device(DeviceNum)               \
           depend(in : x [0:N]) depend(inout : y [0:N])
   // clang-format on
@@ -74,9 +74,9 @@ int main() {
   }
 
   // This also ensures foreign tasks complete
-#pragma omp interop destroy(SyncObj) nowait depend(out : y [0:N])
+#pragma omp interop destroy(SyncObj) nowait depend(out : y[0 : N])
 
-#pragma omp target depend(inout : x [0:N])
+#pragma omp target depend(inout : x[0 : N])
   vectorScale(N, ScaleFactor, x);
 
 #pragma omp taskwait

``````````

</details>


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


More information about the Openmp-commits mailing list