已合并
fix: LLT 使用 stub 避免真实 dump 依赖 #4598
yelongjian创建于 23 天前
fix: LLT 使用 stub 避免真实 dump 依赖 #4598
已合并
共 7 个文件变更+13-5
| @@ -9,6 +9,7 @@ | |||
| 9 | # ----------------------------------------------------------------------------------------------------------- | 9 | # ----------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | add_library(ascendcl_stub SHARED src/ascendcl_stub.cc) | 11 | add_library(ascendcl_stub SHARED src/ascendcl_stub.cc) |
| 12 | +set_target_properties(ascendcl_stub PROPERTIES OUTPUT_NAME acl_rt) | ||
| 12 | target_compile_options(ascendcl_stub PRIVATE -g) | 13 | target_compile_options(ascendcl_stub PRIVATE -g) |
| 13 | target_include_directories(ascendcl_stub PRIVATE | 14 | target_include_directories(ascendcl_stub PRIVATE |
| 14 | ${CMAKE_CURRENT_LIST_DIR}/src | 15 | ${CMAKE_CURRENT_LIST_DIR}/src |
| @@ -30,3 +31,9 @@ target_link_libraries(ascendcl_stub | |||
| 30 | 31 | ||
| 31 | stub_module(ascendcl ascendcl_stub) | 32 | stub_module(ascendcl ascendcl_stub) |
| 32 | stub_module(acl_rt ascendcl_stub) | 33 | stub_module(acl_rt ascendcl_stub) |
| 34 | + | ||
| 35 | +get_target_property(ACL_RT_IMPORTED acl_rt IMPORTED) | ||
| 36 | +if (ACL_RT_IMPORTED) | ||
| 37 | + set_target_properties(acl_rt PROPERTIES | ||
| 38 | + IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/libacl_rt.so") | ||
| 39 | +endif() | ||
| @@ -64,7 +64,7 @@ target_link_libraries(llm_engine_test | |||
| 64 | intf_llt_pub | 64 | intf_llt_pub |
| 65 | llm_engine_base | 65 | llm_engine_base |
| 66 | llm_engine | 66 | llm_engine |
| 67 | - ascend_dump | 67 | + profiler_stub |
| 68 | ${AIR_COMMON_LINK_OPTION} | 68 | ${AIR_COMMON_LINK_OPTION} |
| 69 | GTestShared::gtest GTestShared::gtest_main GTestShared::gmock | 69 | GTestShared::gtest GTestShared::gtest_main GTestShared::gmock |
| 70 | -Wl,--no-as-needed | 70 | -Wl,--no-as-needed |
| @@ -93,7 +93,7 @@ target_link_libraries(helper_runtime_test | |||
| 93 | mmpa_stub | 93 | mmpa_stub |
| 94 | adump_server | 94 | adump_server |
| 95 | adcore | 95 | adcore |
| 96 | - ascend_dump | 96 | + profiler_stub |
| 97 | -Wl,--whole-archive | 97 | -Wl,--whole-archive |
| 98 | df_memset_stubs | 98 | df_memset_stubs |
| 99 | -Wl,--no-whole-archive | 99 | -Wl,--no-whole-archive |
| @@ -38,7 +38,7 @@ target_include_directories(st_dvpp_runtime2_test PRIVATE | |||
| 38 | target_link_libraries(st_dvpp_runtime2_test PRIVATE | 38 | target_link_libraries(st_dvpp_runtime2_test PRIVATE |
| 39 | intf_llt_pub | 39 | intf_llt_pub |
| 40 | unified_dlog | 40 | unified_dlog |
| 41 | - ascend_dump | 41 | + profiler_stub |
| 42 | gert | 42 | gert |
| 43 | -Wl,--whole-archive | 43 | -Wl,--whole-archive |
| 44 | -Wl,--no-whole-archive | 44 | -Wl,--no-whole-archive |
| @@ -1043,6 +1043,7 @@ target_link_libraries(ut_python_runtime_artifact_utils_utest | |||
| 1043 | GTestShared::gtest | 1043 | GTestShared::gtest |
| 1044 | GTestShared::gtest_main | 1044 | GTestShared::gtest_main |
| 1045 | ge_common_base | 1045 | ge_common_base |
| 1046 | + ascendcl_stub | ||
| 1046 | opp_registry | 1047 | opp_registry |
| 1047 | register | 1048 | register |
| 1048 | graph_base | 1049 | graph_base |
| @@ -49,7 +49,7 @@ target_link_libraries(ut_graph PRIVATE | |||
| 49 | unified_dlog | 49 | unified_dlog |
| 50 | lowering | 50 | lowering |
| 51 | register | 51 | register |
| 52 | - ascend_dump | 52 | + profiler_stub |
| 53 | ge_runtime_stub eager_style_graph_builder_base | 53 | ge_runtime_stub eager_style_graph_builder_base |
| 54 | ge_metadef_headers mmpa_stub graph graph_base error_manager runtime_headers | 54 | ge_metadef_headers mmpa_stub graph graph_base error_manager runtime_headers |
| 55 | msprof_headers GTestShared::gtest GTestShared::gtest_main ascend_protobuf slog_stub c_sec json -lrt -ldl | 55 | msprof_headers GTestShared::gtest GTestShared::gtest_main ascend_protobuf slog_stub c_sec json -lrt -ldl |
| @@ -56,7 +56,7 @@ target_link_libraries(ut_register | |||
| 56 | GTestShared::gtest | 56 | GTestShared::gtest |
| 57 | GTestShared::gtest_main | 57 | GTestShared::gtest_main |
| 58 | ascend_protobuf | 58 | ascend_protobuf |
| 59 | - ascend_dump | 59 | + profiler_stub |
| 60 | slog_stub | 60 | slog_stub |
| 61 | platform | 61 | platform |
| 62 | json | 62 | json |