[Openmp-commits] [PATCH] D142008: [libomptarget] Delay recursive shared library registrations until offload RTLs are loaded

Mészáros Gergely via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 18 06:58:53 PST 2023

Maetveis added a comment.

In D142008#4062051 <https://reviews.llvm.org/D142008#4062051>, @jhuber6 wrote:

> So, this occurs when we load the plugin shared library?

Yes to be precise in the github issue's case it happens when loading the amdgpu plugin which initializes HSA and HSA Loads all shared libraries in the process <https://github.com/RadeonOpenCompute/ROCR-Runtime/blob/ac0384d6256b4910509c257a30d1a13d01b8a5ee/src/core/util/lnx/os_linux.cpp#L207>

> I'm wondering why we seem to be loading `libomptarget` again from the plugins.

I don't see that happening, just a call to `__tgt_register_lib` from the initialization of the second shared library that is linked with OpenMP.

> In any case I don't think we handle the case of multiple libraries being loaded well so we should try to address that as well.

You'll have to explain it in detail as I'm not familiar with the code, this is my first contribution to libomp, but I'm happy to help.



More information about the Openmp-commits mailing list