[llvm] [Offload] Lazily initialize platforms in the Offloading API (PR #227084)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 11:56:30 PDT 2026
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 cpp -- offload/liboffload/src/OffloadImpl.cpp offload/tools/offload-tblgen/EntryPointGen.cpp offload/unittests/OffloadAPI/init/olInit.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/init/olInit.cpp b/offload/unittests/OffloadAPI/init/olInit.cpp
index da9642f06..2d4e1cb69 100644
--- a/offload/unittests/OffloadAPI/init/olInit.cpp
+++ b/offload/unittests/OffloadAPI/init/olInit.cpp
@@ -38,7 +38,7 @@ TEST_F(olInitTest, RepeatedInitWithDevices) {
for (size_t I = 0; I < 3; I++) {
ASSERT_SUCCESS(olInit(nullptr));
size_t Count = 0;
-
+
// Force the platform to be initialized.
ASSERT_SUCCESS(olIterateDevices(
[](ol_device_handle_t, void *Data) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/227084
More information about the llvm-commits
mailing list