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

Alex Duran via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 00:45:14 PST 2025


================
@@ -1214,5 +1215,10 @@ Error olLaunchHostFunction_impl(ol_queue_handle_t Queue,
                                                 Queue->AsyncInfo);
 }
 
+Error olGetHostDevice_impl(ol_device_handle_t *Device) {
+  *Device = OffloadContext::get().HostDevice;
----------------
adurang wrote:

Just to be clear, I meant HostDevice not Device. If HostDevice would be null, I think we should error not just return a null ptr and success.

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


More information about the llvm-commits mailing list