未验证 提交 6801b6e2 编写于 作者: Z Zhou Wei 提交者: GitHub

Modify the search order of dynamic library (#33722)

* Modify the search order of dynamic library

* Modify the search order of dynamic library
上级 b6e9498e
...@@ -219,17 +219,17 @@ static inline void* GetDsoHandleFromSearchPath( ...@@ -219,17 +219,17 @@ static inline void* GetDsoHandleFromSearchPath(
for (auto dso : dso_names) { for (auto dso : dso_names) {
// 1. search in user config path by FLAGS // 1. search in user config path by FLAGS
dso_handle = GetDsoHandleFromSpecificPath(config_path, dso, dynload_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) { if (nullptr == dso_handle) {
for (auto path : extra_paths) { for (auto path : extra_paths) {
VLOG(3) << "extra_paths: " << path; VLOG(3) << "extra_paths: " << path;
dso_handle = GetDsoHandleFromSpecificPath(path, dso, dynload_flags); 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; if (nullptr != dso_handle) break;
} }
......
...@@ -665,7 +665,6 @@ TWO_PARALLEL_JOB = [ ...@@ -665,7 +665,6 @@ TWO_PARALLEL_JOB = [
'convert_model2dot_ernie', 'convert_model2dot_ernie',
'im2col_test', 'im2col_test',
'test_logical_op', 'test_logical_op',
'test_imperative_mnist',
'test_imperative_deepcf', 'test_imperative_deepcf',
'test_cholesky_op', 'test_cholesky_op',
'test_sample_logits_op', 'test_sample_logits_op',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册