diff --git a/paddle/fluid/platform/init.cc b/paddle/fluid/platform/init.cc index eae360c146df5c..a3fff528f7903e 100644 --- a/paddle/fluid/platform/init.cc +++ b/paddle/fluid/platform/init.cc @@ -142,7 +142,7 @@ void LoadCustomDevice(const std::string &library_dir) { LOG(INFO) << "Try loading custom device libs from: [" << library_dir << "]"; std::vector libs = phi::ListAllLibraries(library_dir); for (const auto &lib_path : libs) { - auto dso_handle = dlopen(lib_path.c_str(), RTLD_NOW); + auto dso_handle = dlopen(lib_path.c_str(), RTLD_LAZY); PADDLE_ENFORCE_NOT_NULL( dso_handle, platform::errors::InvalidArgument(