[Openmp-commits] [PATCH] D127432: [Libomptarget] Add support for offloading binaries in libomptarget
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 28 05:30:53 PDT 2022
jhuber6 added inline comments.
================
Comment at: openmp/libomptarget/src/rtl.cpp:478
- if (!R->is_valid_binary(Img)) {
- DP("Image " DPxMOD " is NOT compatible with RTL " DPxMOD "!\n",
- DPxPTR(Img->ImageStart), DPxPTR(R->LibraryHandler));
+ if (R->is_valid_binary_info) {
+ if (!R->is_valid_binary_info(Img, Info)) {
----------------
JonChesterfield wrote:
> This turns out to be a bad thing. unregisterLib can be called by the host application exit, at which point the plugin may have been unloaded. Is_valid_binary happens to work ok anyway, though I think that's sketchy, but is_valid_binary_info will call into cuda / hsa after they've been torn down and blow up.
Is there a reason to even call this? We already determined the valid binaries before. We should only need to traverse a list of the valid ones here withotu checking it again.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127432/new/
https://reviews.llvm.org/D127432
More information about the Openmp-commits
mailing list