[llvm] [Offload] Add olCalculateMaxOccupancy (PR #142950)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 03:53:23 PDT 2025


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 HEAD~1 HEAD --extensions cpp,h,hpp -- offload/unittests/OffloadAPI/kernel/olCalculateMaxOccupancy.cpp offload/liboffload/src/OffloadImpl.cpp offload/plugins-nextgen/amdgpu/src/rtl.cpp offload/plugins-nextgen/common/include/PluginInterface.h offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp offload/plugins-nextgen/cuda/dynamic_cuda/cuda.h offload/plugins-nextgen/cuda/src/rtl.cpp offload/plugins-nextgen/host/src/rtl.cpp offload/unittests/OffloadAPI/common/Fixtures.hpp
``````````

</details>

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

``````````diff
diff --git a/offload/unittests/OffloadAPI/kernel/olCalculateMaxOccupancy.cpp b/offload/unittests/OffloadAPI/kernel/olCalculateMaxOccupancy.cpp
index 817998982..b791500b5 100644
--- a/offload/unittests/OffloadAPI/kernel/olCalculateMaxOccupancy.cpp
+++ b/offload/unittests/OffloadAPI/kernel/olCalculateMaxOccupancy.cpp
@@ -15,13 +15,15 @@ OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olCalculateMaxOccupancyTest);
 
 TEST_P(olCalculateMaxOccupancyTest, Success) {
   size_t Size{0};
-  ASSERT_SUCCESS_OR_UNSUPPORTED(olCalculateMaxOccupancy(Device, Kernel, 0, &Size));
+  ASSERT_SUCCESS_OR_UNSUPPORTED(
+      olCalculateMaxOccupancy(Device, Kernel, 0, &Size));
   ASSERT_GT(Size, 0u);
 }
 
 TEST_P(olCalculateMaxOccupancyTest, SuccessMem) {
   size_t Size{0};
-  ASSERT_SUCCESS_OR_UNSUPPORTED(olCalculateMaxOccupancy(Device, Kernel, 1024, &Size));
+  ASSERT_SUCCESS_OR_UNSUPPORTED(
+      olCalculateMaxOccupancy(Device, Kernel, 1024, &Size));
   ASSERT_GT(Size, 0u);
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list