File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 7
7
// ===----------------------------------------------------------------------===//
8
8
9
9
#include < CL/sycl/detail/defines.hpp>
10
+ #include < CL/sycl/detail/pi.hpp>
10
11
11
12
#include < dlfcn.h>
12
13
#include < string>
@@ -19,7 +20,12 @@ namespace pi {
19
20
void *loadOsLibrary (const std::string &PluginPath) {
20
21
// TODO: Check if the option RTLD_NOW is correct. Explore using
21
22
// RTLD_DEEPBIND option when there are multiple plugins.
22
- return dlopen (PluginPath.c_str (), RTLD_NOW);
23
+ void *so = dlopen (PluginPath.c_str (), RTLD_NOW);
24
+ if (!so && trace (TraceLevel::PI_TRACE_ALL)) {
25
+ std::cerr << " SYCL_PI_TRACE[-1]: dlopen(" << PluginPath << " ) failed with <"
26
+ << dlerror () << " >" << std::endl;
27
+ }
28
+ return so;
23
29
}
24
30
25
31
int unloadOsLibrary (void *Library) { return dlclose (Library); }
You can’t perform that action at this time.
0 commit comments