[Openmp-commits] [PATCH] D127432: [Libomptarget] Add support for offloading binaries in libomptarget
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 28 05:29:57 PDT 2022
JonChesterfield 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)) {
----------------
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.
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