[llvm] [Offload] Implement the remaining initial Offload API (PR #122106)
Callum Fare via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 08:34:02 PDT 2025
================
@@ -104,3 +104,15 @@ def : Function {
Return<"OL_ERRC_INVALID_DEVICE">
];
}
+
+def : Function {
+ let name = "olGetHostDevice";
----------------
callumfare wrote:
I've implemented these changes, see the latest commit.
I'm still on the fence about whether this is better than the previous design. It's more cumbersome to get to the underlying platform handle, and based on the discussion on `olMemFree` we might end up using that more often. We also can't test platforms without any available devices, although that's a pretty minor concern. Another option is to go back to the previous design, but lazily initialize the platforms and devices when they're first used. So returning a platform or device wouldn't initialize the underlying plugin or device, but their first use (e.g. in `olGetDevices(Platform, ...)`, `olCreateQueue(Device, ...)`) would.
https://github.com/llvm/llvm-project/pull/122106
More information about the llvm-commits
mailing list