From 6801b6e269d886e46a45f2752e909ac1c9558278 Mon Sep 17 00:00:00 2001 From: Zhou Wei Date: Thu, 24 Jun 2021 11:16:20 +0800 Subject: [PATCH] Modify the search order of dynamic library (#33722) * Modify the search order of dynamic library * Modify the search order of dynamic library --- paddle/fluid/platform/dynload/dynamic_loader.cc | 10 +++++----- tools/parallel_UT_rule.py | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/platform/dynload/dynamic_loader.cc b/paddle/fluid/platform/dynload/dynamic_loader.cc index be9cda4a2e9..f0a46e0818a 100644 --- a/paddle/fluid/platform/dynload/dynamic_loader.cc +++ b/paddle/fluid/platform/dynload/dynamic_loader.cc @@ -219,17 +219,17 @@ static inline void* GetDsoHandleFromSearchPath( for (auto dso : dso_names) { // 1. search in user config path by FLAGS dso_handle = GetDsoHandleFromSpecificPath(config_path, dso, dynload_flags); - // 2. search in extra paths + // 2. search in system default path + if (nullptr == dso_handle) { + dso_handle = GetDsoHandleFromDefaultPath(dso, dynload_flags); + } + // 3. search in extra paths if (nullptr == dso_handle) { for (auto path : extra_paths) { VLOG(3) << "extra_paths: " << path; dso_handle = GetDsoHandleFromSpecificPath(path, dso, dynload_flags); } } - // 3. search in system default path - if (nullptr == dso_handle) { - dso_handle = GetDsoHandleFromDefaultPath(dso, dynload_flags); - } if (nullptr != dso_handle) break; } diff --git a/tools/parallel_UT_rule.py b/tools/parallel_UT_rule.py index dbb77d07d5a..5108d34f7bf 100644 --- a/tools/parallel_UT_rule.py +++ b/tools/parallel_UT_rule.py @@ -665,7 +665,6 @@ TWO_PARALLEL_JOB = [ 'convert_model2dot_ernie', 'im2col_test', 'test_logical_op', - 'test_imperative_mnist', 'test_imperative_deepcf', 'test_cholesky_op', 'test_sample_logits_op', -- GitLab