[Openmp-commits] [openmp] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 20 19:32:53 PDT 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 1cea309b7e2256746c72f3177e1a5b226bed4f83 d30ff2ef5df686c99184eec7caf175371694cd2d -- openmp/libomptarget/DeviceRTL/include/Allocator.h openmp/libomptarget/DeviceRTL/src/Allocator.cpp openmp/libomptarget/test/offloading/malloc.c openmp/libomptarget/test/offloading/malloc_parallel.c clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h openmp/libomptarget/DeviceRTL/src/Kernel.cpp openmp/libomptarget/DeviceRTL/src/State.cpp openmp/libomptarget/include/Environment.h openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp openmp/libomptarget/test/mapping/lambda_mapping.cpp
``````````

</details>

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

``````````diff
diff --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp
index 5a21f4b47..3f829b579 100644
--- a/openmp/libomptarget/DeviceRTL/src/State.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/State.cpp
@@ -28,7 +28,8 @@ using namespace ompx;
 ///{
 
 /// External symbol to access dynamic shared memory.
-[[gnu::aligned(allocator::ALIGNMENT)]] extern unsigned char DynamicSharedBuffer[];
+[[gnu::aligned(
+    allocator::ALIGNMENT)]] extern unsigned char DynamicSharedBuffer[];
 #pragma omp allocate(DynamicSharedBuffer) allocator(omp_pteam_mem_alloc)
 
 /// The kernel environment passed to the init method by the compiler.
@@ -96,8 +97,10 @@ private:
   }
 
   /// The actual storage, shared among all warps.
-  [[gnu::aligned(allocator::ALIGNMENT)]] unsigned char Data[state::SharedScratchpadSize];
-  [[gnu::aligned(allocator::ALIGNMENT)]] unsigned char Usage[mapping::MaxThreadsPerTeam];
+  [[gnu::aligned(
+      allocator::ALIGNMENT)]] unsigned char Data[state::SharedScratchpadSize];
+  [[gnu::aligned(
+      allocator::ALIGNMENT)]] unsigned char Usage[mapping::MaxThreadsPerTeam];
 };
 
 static_assert(state::SharedScratchpadSize / mapping::MaxThreadsPerTeam <= 256,

``````````

</details>


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


More information about the Openmp-commits mailing list