[llvm] [OFFLOAD] Add support for host offloading device (PR #177307)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 27 19:21:51 PST 2026


================
@@ -300,6 +301,9 @@ Error initPlugins(OffloadContext &Context) {
                            .emplace_back(std::make_unique<ol_device_impl_t>(
                                -1, nullptr, *HostPlatform, InfoTreeNode{}))
                            .get();
+  if (!Context.HostDevice)
----------------
fineg74 wrote:

Context.HostDevice is host as a host, it doesn't have any plugin attached and therefore doesn't have any devices. Host as an offloading device is initialized the same way as other devices in initPlugins

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


More information about the llvm-commits mailing list