You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using ONNX Runtime v1.12.1 as a statically built library in a C++ project.
As far as I know, Execution Providers like CUDA, TensorRT and OpenVINO have to be built as shared libraries and can't be statically linked into the main onnxruntime (please correct me if I'm wrong here).
This already poses a first problem, since we are actually discouraged from using shared libraries in our project.
However, what comes more is that we can't customize the path from where these shared libraries are loaded during runtime, since ONNX Runtime uses the system library loader to load them from a hardcoded path relative to the executable:
ORT_THROW_IF_ERROR(Env::Default().LoadDynamicLibrary(full_path, true/*shared_globals on unix*/, &handle_));
As we don't have access to the directory of the executable, we can't place the shared libraries there.
Is there any option to manually specify the path for loading the shared libraries of Execution Providers?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm currently using ONNX Runtime v1.12.1 as a statically built library in a C++ project.
As far as I know, Execution Providers like CUDA, TensorRT and OpenVINO have to be built as shared libraries and can't be statically linked into the main onnxruntime (please correct me if I'm wrong here).
This already poses a first problem, since we are actually discouraged from using shared libraries in our project.
However, what comes more is that we can't customize the path from where these shared libraries are loaded during runtime, since ONNX Runtime uses the system library loader to load them from a hardcoded path relative to the executable:
onnxruntime/onnxruntime/core/session/provider_bridge_ort.cc
Lines 1020 to 1021 in 4cd8b42
As we don't have access to the directory of the executable, we can't place the shared libraries there.
Is there any option to manually specify the path for loading the shared libraries of Execution Providers?
Best regards
Beta Was this translation helpful? Give feedback.
All reactions