-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposing/implementing the HAL driver registry via the C API. #3937
Conversation
9487e50
to
2106f4f
Compare
855884c
to
7b8e9f7
Compare
2106f4f
to
b1bfbc7
Compare
@KoolJBlack scott mentioned you may be looking at HAL+android stuff soon - this is probably going to be very useful for you :) Happy to gvc and walk through this if you have questions (about this or the HAL API in general). |
Enables drivers to be provided externally by callers and discovered/loaded dynamically. Zero cost when applications explicitly create their own drivers directly (LTO stripped). Example use cases are compiling LLVM JIT in its own dylib, remote/sandboxed drivers enumerated based on availability, driver multiversioning, and out-of-tree drivers from downstream projects.
b1bfbc7
to
0e7dfa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked through this. Would like to have more discussion with Ben, but it looks good.
Thanks.
Enables drivers to be provided externally by callers and discovered/loaded dynamically. Zero cost when applications explicitly create their own drivers directly (LTO stripped).
Example use cases are compiling LLVM JIT in its own dylib, remote/sandboxed drivers enumerated based on availability, driver multiversioning, and out-of-tree drivers from downstream projects. Hooray for having a story that will prevent us from ever needing to link CUDA into our binaries ;)
This also let me clean up some of the duplication that had crept in with multiple places all doing driver querying/filtering/etc (and sometimes in slightly different ways). It's intentional that we don't have a non-test utility for that, as non-test targets should not be trying to create all drivers and ignoring any of the metadata the driver registry is now able to provide.