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 origin/main HEAD --extensions h,c,cpp -- 
offload/test/offloading/ompx_bare_gridsize.c 
offload/unittests/OffloadAPI/device_code/gridsize.cpp 
clang/lib/CodeGen/CGOpenMPRuntime.cpp 
clang/test/OpenMP/target_teams_codegen.cpp 
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h 
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp offload/include/Shared/APITypes.h 
offload/liboffload/src/OffloadImpl.cpp 
offload/libomptarget/KernelLanguage/API.cpp offload/libomptarget/omptarget.cpp 
offload/plugins-nextgen/common/include/PluginInterface.h 
offload/plugins-nextgen/common/src/PluginInterface.cpp 
offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/offload/unittests/OffloadAPI/device_code/gridsize.cpp 
b/offload/unittests/OffloadAPI/device_code/gridsize.cpp
index c7385baf8..9fe1db789 100644
--- a/offload/unittests/OffloadAPI/device_code/gridsize.cpp
+++ b/offload/unittests/OffloadAPI/device_code/gridsize.cpp
@@ -2,8 +2,9 @@
 #include <stdint.h>
 
 extern "C" __gpu_kernel void gridsize(uint32_t *nblocks, uint32_t *nthreads) {
-  if (__gpu_block_id(0) == 0 && __gpu_block_id(1) == 0 && __gpu_block_id(2) == 
0 &&
-      __gpu_thread_id(0) == 0 && __gpu_thread_id(1) == 0 && __gpu_thread_id(2) 
== 0) {
+  if (__gpu_block_id(0) == 0 && __gpu_block_id(1) == 0 &&
+      __gpu_block_id(2) == 0 && __gpu_thread_id(0) == 0 &&
+      __gpu_thread_id(1) == 0 && __gpu_thread_id(2) == 0) {
     for (int i = 0; i < 3; ++i) {
       nblocks[i] = __gpu_num_blocks(i);
       nthreads[i] = __gpu_num_threads(i);
diff --git a/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp 
b/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp
index 006bc16a0..946fcc91a 100644
--- a/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp
+++ b/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp
@@ -484,7 +484,8 @@ TEST_P(olLaunchKernelGridSizeTest, Success) {
     LaunchArgs.GroupSize = {BaseThreads[0], Dim >= 2 ? BaseThreads[1] : 1,
                             Dim >= 3 ? BaseThreads[2] : 1};
 
-    ASSERT_SUCCESS(olLaunchKernel(Queue, Device, Kernel, &LaunchArgs, nullptr, 
std::size(ArgPtrs), ArgPtrs, ArgSizes));
+    ASSERT_SUCCESS(olLaunchKernel(Queue, Device, Kernel, &LaunchArgs, nullptr,
+                                  std::size(ArgPtrs), ArgPtrs, ArgSizes));
 
     ASSERT_SUCCESS(olSyncQueue(Queue));
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/199483
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to