Remove logs and use RTLD_LAZY

This commit is contained in:
ozanarmagan 2023-07-26 12:31:09 +03:00
parent c9259731c8
commit 666caf8eaa

View File

@ -15,9 +15,8 @@ TextEmbedder::TextEmbedder(const std::string& model_name) {
if(provider == "CUDAExecutionProvider") {
// check existence of so file
void* handle = dlopen("libonnxruntime_providers_cuda.so", RTLD_NOW | RTLD_GLOBAL);
void* handle = dlopen("libonnxruntime_providers_cuda.so", RTLD_LAZY);
if(!handle) {
LOG(ERROR) << "Cannot load libonnxruntime_providers_cuda.so";
continue;
}