[llvm-branch-commits] [llvm] [offload][omp] Initialize devices through liboffload (PR #221276)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 4 09:22:34 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,h -- offload/include/PluginManager.h offload/include/device.h offload/liboffload/src/OffloadImpl.cpp offload/libompaccsupport/PluginManager.cpp offload/libompaccsupport/device.cpp offload/plugins-nextgen/common/include/PluginInterface.h offload/plugins-nextgen/common/src/PluginInterface.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/include/PluginManager.h b/offload/include/PluginManager.h
index f1937a368..36b8f7d3c 100644
--- a/offload/include/PluginManager.h
+++ b/offload/include/PluginManager.h
@@ -157,8 +157,7 @@ private:
   llvm::SmallVector<GenericPluginTy *> Plugins;
 
   // Mapping of device handles to the OpenMP device identifier.
-  llvm::DenseMap<ol_device_handle_t, int32_t>
-      DeviceIds;
+  llvm::DenseMap<ol_device_handle_t, int32_t> DeviceIds;
 
   // Set of all device images currently in use.
   llvm::DenseSet<const __tgt_device_image *> UsedImages;
diff --git a/offload/libompaccsupport/device.cpp b/offload/libompaccsupport/device.cpp
index 51d1194d9..fec0f5bc7 100644
--- a/offload/libompaccsupport/device.cpp
+++ b/offload/libompaccsupport/device.cpp
@@ -83,8 +83,8 @@ DeviceTy::~DeviceTy() {
 
 llvm::Error DeviceTy::init() {
   // TODO: Remove this once all device operations go through liboffload
-  // This just ensures the device is initialized for cases where we go through the
-  // plugin interface.
+  // This just ensures the device is initialized for cases where we go through
+  // the plugin interface.
   size_t Size = 0;
   olGetDeviceInfoSize(DeviceHandle, OL_DEVICE_INFO_GLOBAL_MEM_SIZE, &Size);
 

``````````

</details>


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


More information about the llvm-branch-commits mailing list