[Openmp-commits] [PATCH] D131089: [Libomptarget] Explicitly init / deinit libomptarget from the user
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 4 06:46:33 PDT 2022
jhuber6 added a comment.
In D131089#3699417 <https://reviews.llvm.org/D131089#3699417>, @tianshilei1992 wrote:
> In D131089#3699012 <https://reviews.llvm.org/D131089#3699012>, @JonChesterfield wrote:
>
>> As written this is not thread safe. Does anything ensure __tgt_register_lib et al are only called from a single host thread? The atomic counter suggests it can be called from several
>
> I don't think we need to worry about thread safe here. All initialization in `libomptarget` and plugins assume thread safe as they are right now (no lock is used).
It makes the code messier, but it's not a huge burden. I guess the question is if it's on the user or the library to make sure that `libomptarget` is initialized correctly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131089/new/
https://reviews.llvm.org/D131089
More information about the Openmp-commits
mailing list