[openmp] Workaround for HSA in issue 60119
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Sat, 21 Jan 2023 12:01:13 +0000 (12:01 +0000)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Sat, 21 Jan 2023 12:01:14 +0000 (12:01 +0000)
commit2257e3d2e55a52d70db10e9f4ed1669ab79ace3f
treef4266fea796d58d0045b4bd5d89fe0cad2c88f96
parent5a4e9aac79710ffcb5b614b8f46eea0aea86f13d
[openmp] Workaround for HSA in issue 60119

Move plugin initialization to libomptarget initialization.

Removes the call_once control, probably fractionally faster overall.
Fixes issue 60119 because the plugin initialization, which might
try to dlopen unrelated shared libraries, is no longer nested within
a call from application code.

Fixes #60119

Reviewed By: Maetveis, jhuber6

Differential Revision: https://reviews.llvm.org/D142249
openmp/libomptarget/include/device.h
openmp/libomptarget/include/rtl.h
openmp/libomptarget/plugins/remote/server/Server.cpp
openmp/libomptarget/src/interface.cpp
openmp/libomptarget/src/rtl.cpp