[llvm] [Offload] Implement 'olIsValidBinary' in offload and clean up (PR #159658)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 19 07:28:49 PDT 2025
jhuber6 wrote:
Also @RossBrunton, this isn't related at all to the patch, but I'm wondering what you think about https://github.com/llvm/llvm-project/issues/159636. The problem is that initializing all devices and plugins is quite expensive when multiple are available, it takes something like 250 ms to initialize CUDA when I don't intend to use it for example.
Do you have any good ideas for possibly relaxing this? Maybe initialize devices and plugins at first use? It's a little tough because I think we discussed previously that the platform is kind of an implementation detail of a device. We could possibly make it more explicit that users need.
I believe in most APIs you get to iterate the devices without necessarily initializing them for use. Another issue is that we need to initialize all of CUDA / HSA to iterate them in the first place. Any good ideas? I don't know the internal mechanisms of the runtime as much.
https://github.com/llvm/llvm-project/pull/159658
More information about the llvm-commits
mailing list