已合并
【fix】: Unified compilation options #1108
tangqunzhang创建于 3月12日
【fix】: Unified compilation options #1108
已合并
共 143 个文件变更+302-280
| @@ -2616,8 +2616,8 @@ aclError aclmdlLoadFromFileWithQImpl(const char *modelPath, uint32_t *modelId, c | |||
| 2616 | ACL_LOG_INFO("start to execute aclmdlLoadFromFileWithQ, inputQNum[%zu], outputQNum[%zu]", inputQNum, outputQNum); | 2616 | ACL_LOG_INFO("start to execute aclmdlLoadFromFileWithQ, inputQNum[%zu], outputQNum[%zu]", inputQNum, outputQNum); |
| 2617 | std::vector<uint32_t> inputQVec(inputQ, inputQ + inputQNum); | 2617 | std::vector<uint32_t> inputQVec(inputQ, inputQ + inputQNum); |
| 2618 | std::vector<uint32_t> outputQVec(outputQ, outputQ + outputQNum); | 2618 | std::vector<uint32_t> outputQVec(outputQ, outputQ + outputQNum); |
| 2619 | - ge::ModelQueueArg args{.input_queue_ids = std::move(inputQVec), .output_queue_ids = std::move(outputQVec), | 2619 | + ge::ModelQueueArg args{std::move(inputQVec), std::move(outputQVec), |
| 2620 | - .file_constant_mems = {}, false}; | 2620 | + {}, false}; |
| 2621 | const aclError ret = acl::ModelLoadFromFileWithQ(modelPath, modelId, args, 0); | 2621 | const aclError ret = acl::ModelLoadFromFileWithQ(modelPath, modelId, args, 0); |
| 2622 | if (ret != ACL_SUCCESS) { | 2622 | if (ret != ACL_SUCCESS) { |
| 2623 | return ret; | 2623 | return ret; |
| @@ -2638,8 +2638,8 @@ aclError aclmdlLoadFromMemWithQImpl(const void *model, size_t modelSize, uint32_ | |||
| 2638 | modelSize, inputQNum, outputQNum); | 2638 | modelSize, inputQNum, outputQNum); |
| 2639 | std::vector<uint32_t> inputQVec(inputQ, inputQ + inputQNum); | 2639 | std::vector<uint32_t> inputQVec(inputQ, inputQ + inputQNum); |
| 2640 | std::vector<uint32_t> outputQVec(outputQ, outputQ + outputQNum); | 2640 | std::vector<uint32_t> outputQVec(outputQ, outputQ + outputQNum); |
| 2641 | - ge::ModelQueueArg args{.input_queue_ids = std::move(inputQVec), .output_queue_ids = std::move(outputQVec), | 2641 | + ge::ModelQueueArg args{std::move(inputQVec), std::move(outputQVec), |
| 2642 | - .file_constant_mems = {}, false}; | 2642 | + {}, false}; |
| 2643 | const aclError ret = acl::ModelLoadFromMemWithQ(model, modelSize, modelId, args, 0); | 2643 | const aclError ret = acl::ModelLoadFromMemWithQ(model, modelSize, modelId, args, 0); |
| 2644 | if (ret != ACL_SUCCESS) { | 2644 | if (ret != ACL_SUCCESS) { |
| 2645 | return ret; | 2645 | return ret; |
| @@ -3513,8 +3513,8 @@ aclError aclmdlLoadWithConfigImpl(const aclmdlConfigHandle *handle, uint32_t *mo | |||
| 3513 | } | 3513 | } |
| 3514 | std::vector<uint32_t> inputQVec(handle->inputQ, handle->inputQ + handle->inputQNum); | 3514 | std::vector<uint32_t> inputQVec(handle->inputQ, handle->inputQ + handle->inputQNum); |
| 3515 | std::vector<uint32_t> outputQVec(handle->outputQ, handle->outputQ + handle->outputQNum); | 3515 | std::vector<uint32_t> outputQVec(handle->outputQ, handle->outputQ + handle->outputQNum); |
| 3516 | - ge::ModelQueueArg args{.input_queue_ids = std::move(inputQVec), .output_queue_ids = std::move(outputQVec), | 3516 | + ge::ModelQueueArg args{std::move(inputQVec), std::move(outputQVec), |
| 3517 | - .file_constant_mems = file_constant_mems, handle->withoutGraph}; | 3517 | + file_constant_mems, handle->withoutGraph}; |
| 3518 | return acl::ModelLoadFromFileWithQ(handle->loadPath.c_str(), modelId, args, handle->priority); | 3518 | return acl::ModelLoadFromFileWithQ(handle->loadPath.c_str(), modelId, args, handle->priority); |
| 3519 | } | 3519 | } |
| 3520 | case ACL_MDL_LOAD_FROM_MEM_WITH_Q: | 3520 | case ACL_MDL_LOAD_FROM_MEM_WITH_Q: |
| @@ -3525,8 +3525,8 @@ aclError aclmdlLoadWithConfigImpl(const aclmdlConfigHandle *handle, uint32_t *mo | |||
| 3525 | } | 3525 | } |
| 3526 | std::vector<uint32_t> inputQVec(handle->inputQ, handle->inputQ + handle->inputQNum); | 3526 | std::vector<uint32_t> inputQVec(handle->inputQ, handle->inputQ + handle->inputQNum); |
| 3527 | std::vector<uint32_t> outputQVec(handle->outputQ, handle->outputQ + handle->outputQNum); | 3527 | std::vector<uint32_t> outputQVec(handle->outputQ, handle->outputQ + handle->outputQNum); |
| 3528 | - ge::ModelQueueArg que_args{.input_queue_ids = std::move(inputQVec), .output_queue_ids = std::move(outputQVec), | 3528 | + ge::ModelQueueArg que_args{std::move(inputQVec), std::move(outputQVec), |
| 3529 | - .file_constant_mems = file_constant_mems, handle->withoutGraph}; | 3529 | + file_constant_mems, handle->withoutGraph}; |
| 3530 | return acl::ModelLoadFromMemWithQ(handle->mdlAddr, handle->mdlSize, modelId, que_args, handle->priority); | 3530 | return acl::ModelLoadFromMemWithQ(handle->mdlAddr, handle->mdlSize, modelId, que_args, handle->priority); |
| 3531 | } | 3531 | } |
| 3532 | default: | 3532 | default: |
| @@ -61,6 +61,10 @@ target_compile_definitions(stub_acl_cblas PRIVATE | |||
| 61 | _FORTIFY_SOURCE=2 | 61 | _FORTIFY_SOURCE=2 |
| 62 | ) | 62 | ) |
| 63 | 63 | ||
| 64 | +target_compile_options(stub_acl_cblas PRIVATE | ||
| 65 | + -Wno-unused-parameter | ||
| 66 | +) | ||
| 67 | + | ||
| 64 | set_target_properties(stub_acl_cblas | 68 | set_target_properties(stub_acl_cblas |
| 65 | PROPERTIES | 69 | PROPERTIES |
| 66 | OUTPUT_NAME acl_cblas | 70 | OUTPUT_NAME acl_cblas |
| @@ -94,6 +98,10 @@ set_target_properties(stub_acl_op_compiler | |||
| 94 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/stub | 98 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/stub |
| 95 | ) | 99 | ) |
| 96 | 100 | ||
| 101 | +target_compile_options(stub_acl_op_compiler PRIVATE | ||
| 102 | + -Wno-unused-parameter | ||
| 103 | +) | ||
| 104 | + | ||
| 97 | target_link_libraries(stub_acl_op_compiler PRIVATE | 105 | target_link_libraries(stub_acl_op_compiler PRIVATE |
| 98 | $<BUILD_INTERFACE:intf_pub> | 106 | $<BUILD_INTERFACE:intf_pub> |
| 99 | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | 107 | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> |
| @@ -117,6 +125,11 @@ target_include_directories(stub_acl_op_executor PRIVATE | |||
| 117 | target_compile_definitions(stub_acl_op_executor PRIVATE | 125 | target_compile_definitions(stub_acl_op_executor PRIVATE |
| 118 | _FORTIFY_SOURCE=2 | 126 | _FORTIFY_SOURCE=2 |
| 119 | ) | 127 | ) |
| 128 | + | ||
| 129 | +target_compile_options(stub_acl_op_executor PRIVATE | ||
| 130 | + -Wno-unused-parameter | ||
| 131 | +) | ||
| 132 | + | ||
| 120 | set_target_properties(stub_acl_op_executor | 133 | set_target_properties(stub_acl_op_executor |
| 121 | PROPERTIES | 134 | PROPERTIES |
| 122 | OUTPUT_NAME acl_op_executor | 135 | OUTPUT_NAME acl_op_executor |
| @@ -146,6 +159,11 @@ target_include_directories(stub_acl_mdl PRIVATE | |||
| 146 | target_compile_definitions(stub_acl_mdl PRIVATE | 159 | target_compile_definitions(stub_acl_mdl PRIVATE |
| 147 | _FORTIFY_SOURCE=2 | 160 | _FORTIFY_SOURCE=2 |
| 148 | ) | 161 | ) |
| 162 | + | ||
| 163 | +target_compile_options(stub_acl_mdl PRIVATE | ||
| 164 | + -Wno-unused-parameter | ||
| 165 | +) | ||
| 166 | + | ||
| 149 | set_target_properties(stub_acl_mdl | 167 | set_target_properties(stub_acl_mdl |
| 150 | PROPERTIES | 168 | PROPERTIES |
| 151 | OUTPUT_NAME acl_mdl | 169 | OUTPUT_NAME acl_mdl |
| @@ -39,7 +39,7 @@ static int32_t RegularFileFilterFn(const mmDirent2 *const entry) | |||
| 39 | return static_cast<int32_t>(ret); | 39 | return static_cast<int32_t>(ret); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | -aclError ListFiles(const std::string &dirName, const FileNameFilterFn filter, std::vector<std::string> &names, | 42 | +aclError ListFiles(const std::string &dirName, FileNameFilterFn filter, std::vector<std::string> &names, |
| 43 | const int32_t maxDepth) | 43 | const int32_t maxDepth) |
| 44 | { | 44 | { |
| 45 | if (maxDepth <= 0) { | 45 | if (maxDepth <= 0) { |
| @@ -21,7 +21,7 @@ namespace file_utils { | |||
| 21 | using FileNameFilterFn = bool(const std::string &fileName); | 21 | using FileNameFilterFn = bool(const std::string &fileName); |
| 22 | 22 | ||
| 23 | aclError ListFiles( | 23 | aclError ListFiles( |
| 24 | - const std::string &dirName, const FileNameFilterFn filter, std::vector<std::string> &names, const int32_t maxDepth); | 24 | + const std::string &dirName, FileNameFilterFn filter, std::vector<std::string> &names, const int32_t maxDepth); |
| 25 | } // namespace file_utils | 25 | } // namespace file_utils |
| 26 | } // namespace acl | 26 | } // namespace acl |
| 27 | 27 | ||
| @@ -28,6 +28,7 @@ if (NOT ENABLE_TEST) | |||
| 28 | $<BUILD_INTERFACE:slog_headers> | 28 | $<BUILD_INTERFACE:slog_headers> |
| 29 | $<BUILD_INTERFACE:mmpa_headers> | 29 | $<BUILD_INTERFACE:mmpa_headers> |
| 30 | $<BUILD_INTERFACE:hccl_headers> | 30 | $<BUILD_INTERFACE:hccl_headers> |
| 31 | + $<BUILD_INTERFACE:pybind_options> | ||
| 31 | alog | 32 | alog |
| 32 | flow_graph | 33 | flow_graph |
| 33 | llm_engine | 34 | llm_engine |
| @@ -38,6 +38,7 @@ add_dependencies(atc_stub_ge_compiler ge_stub) | |||
| 38 | target_compile_options(atc_stub_ge_compiler PRIVATE | 38 | target_compile_options(atc_stub_ge_compiler PRIVATE |
| 39 | -fno-common | 39 | -fno-common |
| 40 | -Werror=return-type | 40 | -Werror=return-type |
| 41 | + -Wno-unused-parameter | ||
| 41 | ) | 42 | ) |
| 42 | 43 | ||
| 43 | target_link_libraries(atc_stub_ge_compiler PRIVATE | 44 | target_link_libraries(atc_stub_ge_compiler PRIVATE |
| @@ -68,6 +69,7 @@ add_dependencies(fwk_stub_ge_runner_v2 ge_stub) | |||
| 68 | target_compile_options(fwk_stub_ge_runner_v2 PRIVATE | 69 | target_compile_options(fwk_stub_ge_runner_v2 PRIVATE |
| 69 | -fno-common | 70 | -fno-common |
| 70 | -Werror=return-type | 71 | -Werror=return-type |
| 72 | + -Wno-unused-parameter | ||
| 71 | ) | 73 | ) |
| 72 | 74 | ||
| 73 | 75 | ||
| @@ -102,6 +104,7 @@ add_dependencies(fwk_stub_ge_runner ge_stub) | |||
| 102 | target_compile_options(fwk_stub_ge_runner PRIVATE | 104 | target_compile_options(fwk_stub_ge_runner PRIVATE |
| 103 | -fno-common | 105 | -fno-common |
| 104 | -Werror=return-type | 106 | -Werror=return-type |
| 107 | + -Wno-unused-parameter | ||
| 105 | ) | 108 | ) |
| 106 | 109 | ||
| 107 | 110 | ||
| @@ -596,6 +596,7 @@ target_compile_definitions(ge_common_stub PRIVATE | |||
| 596 | target_compile_options(ge_common_stub PRIVATE | 596 | target_compile_options(ge_common_stub PRIVATE |
| 597 | -fvisibility=default -O2 -fno-common -Wfloat-equal | 597 | -fvisibility=default -O2 -fno-common -Wfloat-equal |
| 598 | -Werror=return-type | 598 | -Werror=return-type |
| 599 | + -Wno-unused-parameter | ||
| 599 | ) | 600 | ) |
| 600 | 601 | ||
| 601 | target_include_directories(ge_common_stub PRIVATE | 602 | target_include_directories(ge_common_stub PRIVATE |
| @@ -10,33 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | if (CMAKE_BUILD_TYPE MATCHES GCOV) | 11 | if (CMAKE_BUILD_TYPE MATCHES GCOV) |
| 12 | message("GCOV test mode") | 12 | message("GCOV test mode") |
| 13 | - set(AIR_COMMON_COMPILE_OPTION | 13 | + set(AIR_COMMON_COMPILE_OPTION "") |
| 14 | - -O0 | ||
| 15 | - -g | ||
| 16 | - --coverage -fprofile-arcs -ftest-coverage | ||
| 17 | - -DFUNC_VISIBILITY | ||
| 18 | - -DFMK_SUPPORT_DUMP | ||
| 19 | - -DFWK_SUPPORT_TRAINING_TRACE | ||
| 20 | - ) | ||
| 21 | - set(AIR_COV_COMPILE_OPTION | ||
| 22 | - --coverage -fprofile-arcs -ftest-coverage | ||
| 23 | - ) | ||
| 24 | - if (ENABLE_ASAN MATCHES true) | ||
| 25 | - set(AIR_COMMON_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION} -fsanitize=address -fsanitize=leak -fsanitize-recover=address) | ||
| 26 | - endif() | ||
| 27 | set(AIR_COMMON_DYNAMIC_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION}) | 14 | set(AIR_COMMON_DYNAMIC_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION}) |
| 28 | - if (TARGET_SYSTEM_NAME STREQUAL "Android") | 15 | + set(AIR_COMMON_LINK_OPTION "") |
| 29 | - set(AIR_COMMON_LINK_OPTION | ||
| 30 | - -ldl -lgcov | ||
| 31 | - ) | ||
| 32 | - else () | ||
| 33 | - set(AIR_COMMON_LINK_OPTION | ||
| 34 | - -lrt -ldl -lgcov | ||
| 35 | - ) | ||
| 36 | - endif () | ||
| 37 | - if (ENABLE_ASAN MATCHES true) | ||
| 38 | - set(AIR_COMMON_LINK_OPTION ${AIR_COMMON_LINK_OPTION} -fsanitize=address -fsanitize=leak -fsanitize-recover=address) | ||
| 39 | - endif() | ||
| 40 | elseif(CMAKE_BUILD_TYPE MATCHES DT) | 16 | elseif(CMAKE_BUILD_TYPE MATCHES DT) |
| 41 | message("Dump graph test mode") | 17 | message("Dump graph test mode") |
| 42 | set(AIR_COMMON_COMPILE_OPTION -O0 -g) | 18 | set(AIR_COMMON_COMPILE_OPTION -O0 -g) |
| @@ -16,15 +16,27 @@ endif() | |||
| 16 | ########## intf_pub_base ########## | 16 | ########## intf_pub_base ########## |
| 17 | add_library(intf_pub_base INTERFACE) | 17 | add_library(intf_pub_base INTERFACE) |
| 18 | 18 | ||
| 19 | +if (ENABLE_GCOV MATCHES true) | ||
| 20 | + set(OPTIMIZE_OPTION "-O0") | ||
| 21 | +else () | ||
| 22 | + set(OPTIMIZE_OPTION "-O2") | ||
| 23 | +endif () | ||
| 24 | + | ||
| 19 | target_compile_options(intf_pub_base INTERFACE | 25 | target_compile_options(intf_pub_base INTERFACE |
| 20 | - -Wall | 26 | + ${OPTIMIZE_OPTION} |
| 21 | - -fPIC | 27 | + -Werror -fno-common -Wextra -Wfloat-equal -Wall -fPIC |
| 22 | -fstack-protector-strong | 28 | -fstack-protector-strong |
| 23 | -D_FORTIFY_SOURCE=2 | 29 | -D_FORTIFY_SOURCE=2 |
| 24 | $<$<CONFIG:Debug>:-g> | 30 | $<$<CONFIG:Debug>:-g> |
| 25 | - $<$<BOOL:${ENABLE_ASAN}>:-Wno-maybe-uninitialized -fsanitize=address -fsanitize=leak | 31 | + $<$<BOOL:${ENABLE_ASAN}>: |
| 26 | - -fsanitize-recover=address,all -fno-stack-protector -fno-omit-frame-pointer -g> | 32 | + -Wno-maybe-uninitialized -fsanitize=address -fsanitize=leak -fsanitize-recover=address,all |
| 27 | - $<$<BOOL:${ENABLE_GCOV}>:-fprofile-arcs -ftest-coverage -DFUNC_VISIBILITY> | 33 | + -fno-stack-protector -fno-omit-frame-pointer -g> |
| 34 | + $<$<BOOL:${ENABLE_GCOV}>: | ||
| 35 | + -g | ||
| 36 | + --coverage -fprofile-arcs -ftest-coverage | ||
| 37 | + -DFUNC_VISIBILITY | ||
| 38 | + -DFMK_SUPPORT_DUMP | ||
| 39 | + -DFWK_SUPPORT_TRAINING_TRACE> | ||
| 28 | ) | 40 | ) |
| 29 | 41 | ||
| 30 | target_compile_definitions(intf_pub_base INTERFACE | 42 | target_compile_definitions(intf_pub_base INTERFACE |
| @@ -113,6 +125,14 @@ target_link_libraries(intf_pub_cxx17 INTERFACE | |||
| 113 | $<BUILD_INTERFACE:intf_pub_base> | 125 | $<BUILD_INTERFACE:intf_pub_base> |
| 114 | ) | 126 | ) |
| 115 | 127 | ||
| 128 | +# 屏蔽pybind里的编译告警 | ||
| 129 | +add_library(pybind_options INTERFACE) | ||
| 130 | + | ||
| 131 | +target_compile_options(pybind_options INTERFACE | ||
| 132 | + -Wno-float-equal | ||
| 133 | + -Wno-missing-field-initializers | ||
| 134 | +) | ||
| 135 | + | ||
| 116 | ########## ccache ########## | 136 | ########## ccache ########## |
| 117 | find_program(CCACHE_FOUND ccache) | 137 | find_program(CCACHE_FOUND ccache) |
| 118 | if (CCACHE_FOUND) | 138 | if (CCACHE_FOUND) |
| @@ -105,6 +105,7 @@ target_compile_options(aicpu_engine_common PRIVATE | |||
| 105 | -Werror=format | 105 | -Werror=format |
| 106 | -Wextra | 106 | -Wextra |
| 107 | -Wfloat-equal | 107 | -Wfloat-equal |
| 108 | + -Wno-pmf-conversions | ||
| 108 | ) | 109 | ) |
| 109 | 110 | ||
| 110 | target_link_options(aicpu_engine_common PRIVATE | 111 | target_link_options(aicpu_engine_common PRIVATE |
| @@ -42,7 +42,7 @@ const std::string kOpsParallel = "aicpu_ops_parallel"; | |||
| 42 | 42 | ||
| 43 | namespace aicpu { | 43 | namespace aicpu { |
| 44 | ge::Status AicpuGraphOptimizer::Initialize(const map<string, string> &options, | 44 | ge::Status AicpuGraphOptimizer::Initialize(const map<string, string> &options, |
| 45 | - ge::OptimizeUtility *const optimize_utility) { | 45 | + [[maybe_unused]] ge::OptimizeUtility *const optimize_utility) { |
| 46 | // initial optimizers | 46 | // initial optimizers |
| 47 | auto iter = options.find(ge::SOC_VERSION); | 47 | auto iter = options.find(ge::SOC_VERSION); |
| 48 | AICPU_IF_BOOL_EXEC(iter == options.end(), | 48 | AICPU_IF_BOOL_EXEC(iter == options.end(), |
| @@ -45,8 +45,8 @@ class Optimizer { | |||
| 45 | * @return status whether this operation success | 45 | * @return status whether this operation success |
| 46 | */ | 46 | */ |
| 47 | virtual ge::Status OptimizeOriginalGraph( | 47 | virtual ge::Status OptimizeOriginalGraph( |
| 48 | - ge::ComputeGraph &graph, | 48 | + [[maybe_unused]] ge::ComputeGraph &graph, |
| 49 | - const std::map<std::string, OpFullInfo> &all_op_info) const { | 49 | + [[maybe_unused]] const std::map<std::string, OpFullInfo> &all_op_info) const { |
| 50 | return ge::SUCCESS; | 50 | return ge::SUCCESS; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| @@ -66,12 +66,12 @@ class Optimizer { | |||
| 66 | * @return status whether this operation success | 66 | * @return status whether this operation success |
| 67 | */ | 67 | */ |
| 68 | virtual ge::Status OptimizeFusedGraph( | 68 | virtual ge::Status OptimizeFusedGraph( |
| 69 | - ge::ComputeGraph &graph, | 69 | + [[maybe_unused]] ge::ComputeGraph &graph, |
| 70 | - const std::map<std::string, OpFullInfo> &all_op_info) const { | 70 | + [[maybe_unused]] const std::map<std::string, OpFullInfo> &all_op_info) const { |
| 71 | return ge::SUCCESS; | 71 | return ge::SUCCESS; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | - virtual void SetCustUserInfos(map<std::string, std::string> info) { | 74 | + virtual void SetCustUserInfos([[maybe_unused]] map<std::string, std::string> info) { |
| 75 | return; | 75 | return; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -188,9 +188,9 @@ class KernelBuilder { | |||
| 188 | * @param inputs_type vector store input type | 188 | * @param inputs_type vector store input type |
| 189 | * @param outputs_type vector store output type | 189 | * @param outputs_type vector store output type |
| 190 | */ | 190 | */ |
| 191 | - virtual void GetInOutPutsDataType(const ge::OpDescPtr &op_desc_ptr, | 191 | + virtual void GetInOutPutsDataType([[maybe_unused]] const ge::OpDescPtr &op_desc_ptr, |
| 192 | - std::vector<uint32_t> &inputs_type, | 192 | + [[maybe_unused]] std::vector<uint32_t> &inputs_type, |
| 193 | - std::vector<uint32_t> &outputs_type) const {} | 193 | + [[maybe_unused]] std::vector<uint32_t> &outputs_type) const {} |
| 194 | 194 | ||
| 195 | ge::Status GetFftsPlusInAddrOffset(const ge::OpDescPtr &op_desc_ptr, | 195 | ge::Status GetFftsPlusInAddrOffset(const ge::OpDescPtr &op_desc_ptr, |
| 196 | FftsPlusInfo &ffts_info) const; | 196 | FftsPlusInfo &ffts_info) const; |
| @@ -27,7 +27,7 @@ std::mutex g_cust_mutex; | |||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | namespace aicpu { | 29 | namespace aicpu { |
| 30 | -Status KernelInfo::Initialize(const map<string, string> &options) { | 30 | +Status KernelInfo::Initialize([[maybe_unused]] const map<string, string> &options) { |
| 31 | AICPU_CHECK_RES(Finalize()); | 31 | AICPU_CHECK_RES(Finalize()); |
| 32 | // read kernel info json file | 32 | // read kernel info json file |
| 33 | if (!ReadOpInfoFromJsonFile()) { | 33 | if (!ReadOpInfoFromJsonFile()) { |
| @@ -53,7 +53,7 @@ class KernelInfo { | |||
| 53 | 53 | ||
| 54 | ge::Status GetCustUserInfo(std::map<std::string, std::string> &cust_user_info) const; | 54 | ge::Status GetCustUserInfo(std::map<std::string, std::string> &cust_user_info) const; |
| 55 | 55 | ||
| 56 | - virtual bool IsSupportedOps(const std::string &op) const { | 56 | + virtual bool IsSupportedOps([[maybe_unused]] const std::string &op) const { |
| 57 | return false; | 57 | return false; |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| @@ -68,7 +68,7 @@ void ConvertGeToAicpuTensor(const ge::GeTensorDesc &tensor_desc, | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | int32_t AddStringAttrToNodeDef(const ge::Operator &op, const char *name, | 70 | int32_t AddStringAttrToNodeDef(const ge::Operator &op, const char *name, |
| 71 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 71 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 72 | std::string s; | 72 | std::string s; |
| 73 | ge::graphStatus ret = op.GetAttr(name, s); | 73 | ge::graphStatus ret = op.GetAttr(name, s); |
| 74 | if (ret != ge::GRAPH_SUCCESS) { | 74 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -82,7 +82,7 @@ int32_t AddStringAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | int32_t AddListStringAttrToNodeDef(const ge::Operator &op, const char *name, | 84 | int32_t AddListStringAttrToNodeDef(const ge::Operator &op, const char *name, |
| 85 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 85 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 86 | std::vector<std::string> list_s; | 86 | std::vector<std::string> list_s; |
| 87 | ge::graphStatus ret = op.GetAttr(name, list_s); | 87 | ge::graphStatus ret = op.GetAttr(name, list_s); |
| 88 | if (ret != ge::GRAPH_SUCCESS) { | 88 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -103,7 +103,7 @@ int32_t AddListStringAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | int32_t AddFloatAttrToNodeDef(const ge::Operator &op, const char *name, | 105 | int32_t AddFloatAttrToNodeDef(const ge::Operator &op, const char *name, |
| 106 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 106 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 107 | float f = 0; | 107 | float f = 0; |
| 108 | ge::graphStatus ret = op.GetAttr(name, f); | 108 | ge::graphStatus ret = op.GetAttr(name, f); |
| 109 | if (ret != ge::GRAPH_SUCCESS) { | 109 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -117,7 +117,7 @@ int32_t AddFloatAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | int32_t AddListFloatAttrToNodeDef(const ge::Operator &op, const char *name, | 119 | int32_t AddListFloatAttrToNodeDef(const ge::Operator &op, const char *name, |
| 120 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 120 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 121 | std::vector<float> list_f; | 121 | std::vector<float> list_f; |
| 122 | ge::graphStatus ret = op.GetAttr(name, list_f); | 122 | ge::graphStatus ret = op.GetAttr(name, list_f); |
| 123 | if (ret != ge::GRAPH_SUCCESS) { | 123 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -138,7 +138,7 @@ int32_t AddListFloatAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | int32_t AddBoolAttrToNodeDef(const ge::Operator &op, const char *name, | 140 | int32_t AddBoolAttrToNodeDef(const ge::Operator &op, const char *name, |
| 141 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 141 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 142 | bool b = false; | 142 | bool b = false; |
| 143 | ge::graphStatus ret = op.GetAttr(name, b); | 143 | ge::graphStatus ret = op.GetAttr(name, b); |
| 144 | if (ret != ge::GRAPH_SUCCESS) { | 144 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -152,7 +152,7 @@ int32_t AddBoolAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | int32_t AddListBoolAttrToNodeDef(const ge::Operator &op, const char *name, | 154 | int32_t AddListBoolAttrToNodeDef(const ge::Operator &op, const char *name, |
| 155 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 155 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 156 | std::vector<bool> list_b; | 156 | std::vector<bool> list_b; |
| 157 | ge::graphStatus ret = op.GetAttr(name, list_b); | 157 | ge::graphStatus ret = op.GetAttr(name, list_b); |
| 158 | if (ret != ge::GRAPH_SUCCESS) { | 158 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -173,7 +173,7 @@ int32_t AddListBoolAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | int32_t AddIntAttrToNodeDef(const ge::Operator &op, const char *name, | 175 | int32_t AddIntAttrToNodeDef(const ge::Operator &op, const char *name, |
| 176 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 176 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 177 | int64_t i = 0; | 177 | int64_t i = 0; |
| 178 | ge::graphStatus ret = op.GetAttr(name, i); | 178 | ge::graphStatus ret = op.GetAttr(name, i); |
| 179 | if (ret != ge::GRAPH_SUCCESS) { | 179 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -187,7 +187,7 @@ int32_t AddIntAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | int32_t AddListIntAttrToNodeDef(const ge::Operator &op, const char *name, | 189 | int32_t AddListIntAttrToNodeDef(const ge::Operator &op, const char *name, |
| 190 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 190 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 191 | std::vector<int64_t> list_i; | 191 | std::vector<int64_t> list_i; |
| 192 | ge::graphStatus ret = op.GetAttr(name, list_i); | 192 | ge::graphStatus ret = op.GetAttr(name, list_i); |
| 193 | if (ret != ge::GRAPH_SUCCESS) { | 193 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -208,7 +208,7 @@ int32_t AddListIntAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | int32_t AddListListIntAttrToNodeDef(const ge::Operator &op, const char *name, | 210 | int32_t AddListListIntAttrToNodeDef(const ge::Operator &op, const char *name, |
| 211 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 211 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 212 | std::vector<std::vector<int64_t>> list_i; | 212 | std::vector<std::vector<int64_t>> list_i; |
| 213 | ge::graphStatus ret = op.GetAttr(name, list_i); | 213 | ge::graphStatus ret = op.GetAttr(name, list_i); |
| 214 | if (ret != ge::GRAPH_SUCCESS) { | 214 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -233,7 +233,7 @@ int32_t AddListListIntAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | int32_t AddDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, | 235 | int32_t AddDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, |
| 236 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 236 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 237 | ge::DataType data_type = ge::DT_UNDEFINED; | 237 | ge::DataType data_type = ge::DT_UNDEFINED; |
| 238 | ge::graphStatus ret = op.GetAttr(name, data_type); | 238 | ge::graphStatus ret = op.GetAttr(name, data_type); |
| 239 | if (ret != ge::GRAPH_SUCCESS) { | 239 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -247,7 +247,7 @@ int32_t AddDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | int32_t AddListDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, | 249 | int32_t AddListDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, |
| 250 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 250 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 251 | std::vector<ge::DataType> list_type; | 251 | std::vector<ge::DataType> list_type; |
| 252 | ge::graphStatus ret = op.GetAttr(name, list_type); | 252 | ge::graphStatus ret = op.GetAttr(name, list_type); |
| 253 | if (ret != ge::GRAPH_SUCCESS) { | 253 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -268,7 +268,7 @@ int32_t AddListDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | int32_t AddTensorAttrToNodeDef(const ge::Operator &op, const char *name, | 270 | int32_t AddTensorAttrToNodeDef(const ge::Operator &op, const char *name, |
| 271 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 271 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 272 | ge::Tensor ge_tensor; | 272 | ge::Tensor ge_tensor; |
| 273 | ge::graphStatus ret = op.GetAttr(name, ge_tensor); | 273 | ge::graphStatus ret = op.GetAttr(name, ge_tensor); |
| 274 | if (ret != ge::GRAPH_SUCCESS) { | 274 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -304,7 +304,7 @@ int32_t AddTensorAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | int32_t AddListTensorAttrToNodeDef(const ge::Operator &op, const char *name, | 306 | int32_t AddListTensorAttrToNodeDef(const ge::Operator &op, const char *name, |
| 307 | - aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { | 307 | + [[maybe_unused]] aicpuops::NodeDef node_def, aicpuops::AttrValue &attr_value) { |
| 308 | std::vector<ge::Tensor> ge_list_tensor; | 308 | std::vector<ge::Tensor> ge_list_tensor; |
| 309 | ge::graphStatus ret = op.GetAttr(name, ge_list_tensor); | 309 | ge::graphStatus ret = op.GetAttr(name, ge_list_tensor); |
| 310 | if (ret != ge::GRAPH_SUCCESS) { | 310 | if (ret != ge::GRAPH_SUCCESS) { |
| @@ -108,7 +108,7 @@ ge::Status CpuKernelBuilder::CalcOpRunningParam(const ge::Node &node) const | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | ge::Status CpuKernelBuilder::BuildMemCopyInfo( | 110 | ge::Status CpuKernelBuilder::BuildMemCopyInfo( |
| 111 | - const ge::OpDescPtr &op_desc_ptr, const ge::RunContext &run_context, | 111 | + const ge::OpDescPtr &op_desc_ptr, [[maybe_unused]] const ge::RunContext &run_context, |
| 112 | domi::KernelDef *&kernel_def) const { | 112 | domi::KernelDef *&kernel_def) const { |
| 113 | kernel_def->set_kernel_ext_info_size(0); | 113 | kernel_def->set_kernel_ext_info_size(0); |
| 114 | 114 | ||
| @@ -28,7 +28,7 @@ BaseEnginePtr HostCpuEngine::Instance() { | |||
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | ge::Status HostCpuEngine::Initialize( | 30 | ge::Status HostCpuEngine::Initialize( |
| 31 | - const std::map<std::string, std::string> &options) { | 31 | + [[maybe_unused]] const std::map<std::string, std::string> &options) { |
| 32 | if (ops_kernel_info_store_ == nullptr) { | 32 | if (ops_kernel_info_store_ == nullptr) { |
| 33 | ops_kernel_info_store_ = | 33 | ops_kernel_info_store_ = |
| 34 | std::make_shared<AicpuOpsKernelInfoStore>(kHostCpuEngine); | 34 | std::make_shared<AicpuOpsKernelInfoStore>(kHostCpuEngine); |
| @@ -858,7 +858,7 @@ void LableExceptionAbortAttr(const ge::OpDescPtr &op_desc, const std::string &no | |||
| 858 | } | 858 | } |
| 859 | } | 859 | } |
| 860 | 860 | ||
| 861 | -const bool IsExceptionAbortOp(const std::string &op_type) { | 861 | +bool IsExceptionAbortOp(const std::string &op_type) { |
| 862 | const std::vector<std::string> op_list = { | 862 | const std::vector<std::string> op_list = { |
| 863 | "IteratorGetNext", "DynamicGetNext" | 863 | "IteratorGetNext", "DynamicGetNext" |
| 864 | }; | 864 | }; |
| @@ -113,7 +113,8 @@ Status UserSemanticInferencePass::FusionForPyPTO(const ge::NodePtr &pyptoNode) c | |||
| 113 | return SUCCESS; | 113 | return SUCCESS; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | -Status UserSemanticInferencePass::Fusion(ge::ComputeGraph& graph, Mapping& mapping, vector<ge::NodePtr> &fusionNodes) { | 116 | +Status UserSemanticInferencePass::Fusion([[maybe_unused]] ge::ComputeGraph& graph, Mapping& mapping, |
| 117 | + [[maybe_unused]] vector<ge::NodePtr> &fusionNodes) { | ||
| 117 | ge::NodePtr pyptoNode = GetNodeFromMapping(PATTERN_PYPTO, mapping); | 118 | ge::NodePtr pyptoNode = GetNodeFromMapping(PATTERN_PYPTO, mapping); |
| 118 | if (pyptoNode != nullptr) { | 119 | if (pyptoNode != nullptr) { |
| 119 | return FusionForPyPTO(pyptoNode); | 120 | return FusionForPyPTO(pyptoNode); |
| @@ -3100,7 +3100,8 @@ bool TbeOpStoreAdapter::JudgeBuiltInOppKernelInstalled() const { | |||
| 3100 | return IsOppKernelInstalled(false, static_cast<int64_t>(EN_IMPL_HW_TBE)); | 3100 | return IsOppKernelInstalled(false, static_cast<int64_t>(EN_IMPL_HW_TBE)); |
| 3101 | } | 3101 | } |
| 3102 | 3102 | ||
| 3103 | -bool TbeOpStoreAdapter::IsNeedSkipOpJudge(const ge::NodePtr &node, const OpKernelInfoPtr &op_kernel_info_ptr) const { | 3103 | +bool TbeOpStoreAdapter::IsNeedSkipOpJudge(const ge::NodePtr &node, |
| 3104 | + [[maybe_unused]] const OpKernelInfoPtr &op_kernel_info_ptr) const { | ||
| 3104 | FE_CHECK(node == nullptr, FE_LOGE("Node is nullptr!"), return false); | 3105 | FE_CHECK(node == nullptr, FE_LOGE("Node is nullptr!"), return false); |
| 3105 | ge::OpDescPtr op_desc_ptr = node->GetOpDesc(); | 3106 | ge::OpDescPtr op_desc_ptr = node->GetOpDesc(); |
| 3106 | FE_CHECK(op_desc_ptr == nullptr, FE_LOGE("Op desc is nullptr!"), return false); | 3107 | FE_CHECK(op_desc_ptr == nullptr, FE_LOGE("Op desc is nullptr!"), return false); |
| @@ -152,7 +152,7 @@ bool TbeJsonFileParse::SetRelatedNodesStr(const string &attr_name, const string | |||
| 152 | return ret; | 152 | return ret; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | -bool TbeJsonFileParse::ClearRelatedNodesStr(const string &attr_name) { | 155 | +bool TbeJsonFileParse::ClearRelatedNodesStr([[maybe_unused]] const string &attr_name) { |
| 156 | bool ret = op_desc_->DelAttr(GetAttrPrefix() + ATTR_NAME_KERNEL_LIST_FIRST_NAME); | 156 | bool ret = op_desc_->DelAttr(GetAttrPrefix() + ATTR_NAME_KERNEL_LIST_FIRST_NAME); |
| 157 | if (ffts_related_thread_nodes_ != nullptr) { | 157 | if (ffts_related_thread_nodes_ != nullptr) { |
| 158 | for (auto &ele : *ffts_related_thread_nodes_) { | 158 | for (auto &ele : *ffts_related_thread_nodes_) { |
| @@ -476,7 +476,7 @@ bool FEOpsKernelInfoStore::CheckAccuracySupported(const ge::OpDescPtr &op_desc_p | |||
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | bool FEOpsKernelInfoStore::CheckSupported(const ge::NodePtr &node, std::string &un_supported_reason, | 478 | bool FEOpsKernelInfoStore::CheckSupported(const ge::NodePtr &node, std::string &un_supported_reason, |
| 479 | - ge::CheckSupportFlag &flag) const { | 479 | + [[maybe_unused]] ge::CheckSupportFlag &flag) const { |
| 480 | bool bres = false; | 480 | bool bres = false; |
| 481 | try { | 481 | try { |
| 482 | bres = CheckSupported(node, un_supported_reason); | 482 | bres = CheckSupported(node, un_supported_reason); |
| @@ -28,7 +28,6 @@ target_compile_options(compress PRIVATE | |||
| 28 | $<$<STREQUAL:${PRODUCT_SIDE},host>:-fexceptions> | 28 | $<$<STREQUAL:${PRODUCT_SIDE},host>:-fexceptions> |
| 29 | -fno-common | 29 | -fno-common |
| 30 | -fno-strict-aliasing | 30 | -fno-strict-aliasing |
| 31 | - -O2 -D_FORTIFY_SOURCE | ||
| 32 | ) | 31 | ) |
| 33 | 32 | ||
| 34 | target_link_libraries(compress | 33 | target_link_libraries(compress |
| @@ -92,7 +91,6 @@ target_compile_options(compressweight PRIVATE | |||
| 92 | $<$<STREQUAL:${PRODUCT_SIDE},host>:-fexceptions> | 91 | $<$<STREQUAL:${PRODUCT_SIDE},host>:-fexceptions> |
| 93 | -fno-common | 92 | -fno-common |
| 94 | -fno-strict-aliasing | 93 | -fno-strict-aliasing |
| 95 | - -O2 -D_FORTIFY_SOURCE | ||
| 96 | ) | 94 | ) |
| 97 | 95 | ||
| 98 | target_link_libraries(compressweight PRIVATE | 96 | target_link_libraries(compressweight PRIVATE |
| @@ -26,23 +26,23 @@ | |||
| 26 | 26 | ||
| 27 | namespace { | 27 | namespace { |
| 28 | struct CompressParametersConv2d { | 28 | struct CompressParametersConv2d { |
| 29 | - uint64_t weightSizeTotal; | 29 | + uint64_t weightSizeTotal = 0; |
| 30 | - size_t weightK; | 30 | + size_t weightK = 0U; |
| 31 | - size_t weightN; | 31 | + size_t weightN = 0U; |
| 32 | - size_t weightCo0; | 32 | + size_t weightCo0 = 0U; |
| 33 | - size_t weightCo1; | 33 | + size_t weightCo1 = 0U; |
| 34 | - size_t kbFrac; | 34 | + size_t kbFrac = 0U; |
| 35 | - size_t nbFrac; | 35 | + size_t nbFrac = 0U; |
| 36 | - size_t nRemainders; | 36 | + size_t nRemainders = 0U; |
| 37 | - size_t wDtypeSize; | 37 | + size_t wDtypeSize = 0U; |
| 38 | - size_t totalCompressedLength; | 38 | + size_t totalCompressedLength = 0U; |
| 39 | - size_t dataBase; | 39 | + size_t dataBase = 0U; |
| 40 | - size_t indexBase; | 40 | + size_t indexBase = 0U; |
| 41 | - size_t tailBlockWeightSize; | 41 | + size_t tailBlockWeightSize = 0U; |
| 42 | - size_t tailBlockSize; | 42 | + size_t tailBlockSize = 0U; |
| 43 | - size_t blockSize; | 43 | + size_t blockSize = 0U; |
| 44 | - size_t firstWeightSize; | 44 | + size_t firstWeightSize = 0U; |
| 45 | - size_t indexUnitSize; | 45 | + size_t indexUnitSize = 0U; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | const int INDEX_SIZE_COMPACT_MODE = 8; | 48 | const int INDEX_SIZE_COMPACT_MODE = 8; |
| @@ -148,7 +148,8 @@ void GenerateExtraInfoForFusionOpContext(const std::vector<ge::Node *> &oriNodes | |||
| 148 | }); | 148 | }); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | -void GenerateExtraInfoForContext(const TbeOpInfo &opInfo, const ge::OpDescPtr &opDescPtr, PyObject *pyContextDict) | 151 | +void GenerateExtraInfoForContext([[maybe_unused]] const TbeOpInfo &opInfo, const ge::OpDescPtr &opDescPtr, |
| 152 | + PyObject *pyContextDict) | ||
| 152 | { | 153 | { |
| 153 | std::string custAicNum; | 154 | std::string custAicNum; |
| 154 | ge::AttrUtils::GetStr(opDescPtr, kAicCntKeyOp, custAicNum); | 155 | ge::AttrUtils::GetStr(opDescPtr, kAicCntKeyOp, custAicNum); |
| @@ -24,6 +24,7 @@ target_link_libraries(dflow_wrapper PRIVATE | |||
| 24 | $<BUILD_INTERFACE:metadef_headers> | 24 | $<BUILD_INTERFACE:metadef_headers> |
| 25 | $<BUILD_INTERFACE:parser_headers> | 25 | $<BUILD_INTERFACE:parser_headers> |
| 26 | $<BUILD_INTERFACE:air_headers> | 26 | $<BUILD_INTERFACE:air_headers> |
| 27 | + $<BUILD_INTERFACE:pybind_options> | ||
| 27 | unified_dlog | 28 | unified_dlog |
| 28 | flow_graph | 29 | flow_graph |
| 29 | ge_runner_v2 | 30 | ge_runner_v2 |
| @@ -42,7 +43,6 @@ target_compile_definitions(dflow_wrapper PRIVATE | |||
| 42 | ) | 43 | ) |
| 43 | 44 | ||
| 44 | target_compile_options(dflow_wrapper PRIVATE | 45 | target_compile_options(dflow_wrapper PRIVATE |
| 45 | - -O2 | ||
| 46 | -Xlinker -export-dynamic | 46 | -Xlinker -export-dynamic |
| 47 | ) | 47 | ) |
| 48 | 48 | ||
| @@ -67,6 +67,7 @@ target_link_libraries(data_wrapper PRIVATE | |||
| 67 | $<BUILD_INTERFACE:intf_pub> | 67 | $<BUILD_INTERFACE:intf_pub> |
| 68 | $<BUILD_INTERFACE:udf_headers> | 68 | $<BUILD_INTERFACE:udf_headers> |
| 69 | $<BUILD_INTERFACE:metadef_headers> | 69 | $<BUILD_INTERFACE:metadef_headers> |
| 70 | + $<BUILD_INTERFACE:pybind_options> | ||
| 70 | ) | 71 | ) |
| 71 | 72 | ||
| 72 | set_target_properties(data_wrapper | 73 | set_target_properties(data_wrapper |
| @@ -75,7 +76,6 @@ set_target_properties(data_wrapper | |||
| 75 | ) | 76 | ) |
| 76 | 77 | ||
| 77 | target_compile_options(data_wrapper PRIVATE | 78 | target_compile_options(data_wrapper PRIVATE |
| 78 | - -O2 | ||
| 79 | -Xlinker -export-dynamic | 79 | -Xlinker -export-dynamic |
| 80 | ) | 80 | ) |
| 81 | 81 | ||
| @@ -22,6 +22,7 @@ target_link_libraries(flowfunc_wrapper PRIVATE | |||
| 22 | $<BUILD_INTERFACE:udf_headers> | 22 | $<BUILD_INTERFACE:udf_headers> |
| 23 | $<BUILD_INTERFACE:slog_headers> | 23 | $<BUILD_INTERFACE:slog_headers> |
| 24 | $<BUILD_INTERFACE:metadef_headers> | 24 | $<BUILD_INTERFACE:metadef_headers> |
| 25 | + $<BUILD_INTERFACE:pybind_options> | ||
| 25 | flow_func | 26 | flow_func |
| 26 | unified_dlog | 27 | unified_dlog |
| 27 | ) | 28 | ) |
| @@ -36,7 +37,6 @@ target_compile_definitions(flowfunc_wrapper PRIVATE | |||
| 36 | ) | 37 | ) |
| 37 | 38 | ||
| 38 | target_compile_options(flowfunc_wrapper PRIVATE | 39 | target_compile_options(flowfunc_wrapper PRIVATE |
| 39 | - -O2 | ||
| 40 | -Xlinker -export-dynamic | 40 | -Xlinker -export-dynamic |
| 41 | ) | 41 | ) |
| 42 | 42 | ||
| @@ -176,19 +176,19 @@ py::memoryview ToReadonlyMemoryView(const FlowFunc::Tensor &tensor) { | |||
| 176 | 176 | ||
| 177 | class PyFlowFuncLogger : public FlowFunc::FlowFuncLogger { | 177 | class PyFlowFuncLogger : public FlowFunc::FlowFuncLogger { |
| 178 | public: | 178 | public: |
| 179 | - bool IsLogEnable(FlowFunc::FlowFuncLogLevel level) override { | 179 | + bool IsLogEnable([[maybe_unused]] FlowFunc::FlowFuncLogLevel level) override { |
| 180 | PYBIND11_OVERRIDE_PURE(bool, FlowFunc::FlowFuncLogger, IsLogEnable, ); | 180 | PYBIND11_OVERRIDE_PURE(bool, FlowFunc::FlowFuncLogger, IsLogEnable, ); |
| 181 | } | 181 | } |
| 182 | - void Error(const char *fmt, ...) override { | 182 | + void Error([[maybe_unused]] const char *fmt, ...) override { |
| 183 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Error, ); | 183 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Error, ); |
| 184 | } | 184 | } |
| 185 | - void Warn(const char *fmt, ...) override { | 185 | + void Warn([[maybe_unused]] const char *fmt, ...) override { |
| 186 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Warn, ); | 186 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Warn, ); |
| 187 | } | 187 | } |
| 188 | - void Info(const char *fmt, ...) override { | 188 | + void Info([[maybe_unused]] const char *fmt, ...) override { |
| 189 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Info, ); | 189 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Info, ); |
| 190 | } | 190 | } |
| 191 | - void Debug(const char *fmt, ...) override { | 191 | + void Debug([[maybe_unused]] const char *fmt, ...) override { |
| 192 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Debug, ); | 192 | PYBIND11_OVERRIDE_PURE(void, FlowFunc::FlowFuncLogger, Debug, ); |
| 193 | } | 193 | } |
| 194 | void ErrorLog(const char *location_message, const char *user_message) const { | 194 | void ErrorLog(const char *location_message, const char *user_message) const { |
| @@ -271,7 +271,7 @@ class PyFlowMsg : public FlowFunc::FlowMsg { | |||
| 271 | 271 | ||
| 272 | class PyFlowMsgQueue : public FlowFunc::FlowMsgQueue { | 272 | class PyFlowMsgQueue : public FlowFunc::FlowMsgQueue { |
| 273 | public: | 273 | public: |
| 274 | - int32_t Dequeue(std::shared_ptr<FlowFunc::FlowMsg> &flow_msg, int32_t timeout) override { | 274 | + int32_t Dequeue(std::shared_ptr<FlowFunc::FlowMsg> &flow_msg, [[maybe_unused]] int32_t timeout) override { |
| 275 | (void)flow_msg; | 275 | (void)flow_msg; |
| 276 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::FlowMsgQueue, Dequeue, ); | 276 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::FlowMsgQueue, Dequeue, ); |
| 277 | } | 277 | } |
| @@ -307,7 +307,7 @@ class PyTensor : public FlowFunc::Tensor { | |||
| 307 | PYBIND11_OVERRIDE_PURE(int64_t, FlowFunc::Tensor, GetElementCnt, ); | 307 | PYBIND11_OVERRIDE_PURE(int64_t, FlowFunc::Tensor, GetElementCnt, ); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | - int32_t Reshape(const std::vector<int64_t> &shape) override { | 310 | + int32_t Reshape([[maybe_unused]] const std::vector<int64_t> &shape) override { |
| 311 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::Tensor, Reshape, ); | 311 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::Tensor, Reshape, ); |
| 312 | } | 312 | } |
| 313 | }; | 313 | }; |
| @@ -349,16 +349,15 @@ class PyMetaParams : public FlowFunc::MetaParams { | |||
| 349 | 349 | ||
| 350 | class PyMetaRunContext : public FlowFunc::MetaRunContext { | 350 | class PyMetaRunContext : public FlowFunc::MetaRunContext { |
| 351 | public: | 351 | public: |
| 352 | - std::shared_ptr<FlowFunc::FlowMsg> AllocTensorMsg(const std::vector<int64_t> &shape, | 352 | + std::shared_ptr<FlowFunc::FlowMsg> AllocTensorMsg([[maybe_unused]] const std::vector<int64_t> &shape, |
| 353 | FlowFunc::TensorDataType data_type) override { | 353 | FlowFunc::TensorDataType data_type) override { |
| 354 | (void)data_type; | 354 | (void)data_type; |
| 355 | PYBIND11_OVERRIDE_PURE(std::shared_ptr<FlowFunc::FlowMsg>, FlowFunc::MetaRunContext, AllocTensorMsg, ); | 355 | PYBIND11_OVERRIDE_PURE(std::shared_ptr<FlowFunc::FlowMsg>, FlowFunc::MetaRunContext, AllocTensorMsg, ); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | - std::shared_ptr<FlowFunc::FlowMsg> AllocTensorMsgWithAlign(const std::vector<int64_t> &shape, | 358 | + std::shared_ptr<FlowFunc::FlowMsg> AllocTensorMsgWithAlign([[maybe_unused]] const std::vector<int64_t> &shape, |
| 359 | - FlowFunc::TensorDataType data_type, | 359 | + [[maybe_unused]] FlowFunc::TensorDataType data_type, |
| 360 | - uint32_t align) override { | 360 | + [[maybe_unused]] uint32_t align) override { |
| 361 | - (void)data_type; | ||
| 362 | PYBIND11_OVERRIDE_PURE(std::shared_ptr<FlowFunc::FlowMsg>, FlowFunc::MetaRunContext, AllocTensorMsg, ); | 361 | PYBIND11_OVERRIDE_PURE(std::shared_ptr<FlowFunc::FlowMsg>, FlowFunc::MetaRunContext, AllocTensorMsg, ); |
| 363 | } | 362 | } |
| 364 | 363 | ||
| @@ -390,14 +389,16 @@ class PyMetaRunContext : public FlowFunc::MetaRunContext { | |||
| 390 | } | 389 | } |
| 391 | 390 | ||
| 392 | int32_t RunFlowModel(const char *model_key, const std::vector<std::shared_ptr<FlowFunc::FlowMsg>> &input_msgs, | 391 | int32_t RunFlowModel(const char *model_key, const std::vector<std::shared_ptr<FlowFunc::FlowMsg>> &input_msgs, |
| 393 | - std::vector<std::shared_ptr<FlowFunc::FlowMsg>> &output_msgs, int32_t timeout) override { | 392 | + std::vector<std::shared_ptr<FlowFunc::FlowMsg>> &output_msgs, |
| 393 | + [[maybe_unused]] int32_t timeout) override { | ||
| 394 | (void)model_key; | 394 | (void)model_key; |
| 395 | (void)input_msgs; | 395 | (void)input_msgs; |
| 396 | (void)output_msgs; | 396 | (void)output_msgs; |
| 397 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::MetaRunContext, RunFlowModel, ); | 397 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::MetaRunContext, RunFlowModel, ); |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | - int32_t GetUserData(void *data, size_t size, size_t offset = 0U) const override { | 400 | + int32_t GetUserData([[maybe_unused]] void *data, [[maybe_unused]] size_t size, |
| 401 | + [[maybe_unused]] size_t offset = 0U) const override { | ||
| 401 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::MetaRunContext, GetUserData); | 402 | PYBIND11_OVERRIDE_PURE(int32_t, FlowFunc::MetaRunContext, GetUserData); |
| 402 | } | 403 | } |
| 403 | }; | 404 | }; |
| @@ -127,6 +127,7 @@ target_compile_options(stub_lowering PRIVATE | |||
| 127 | -fno-common | 127 | -fno-common |
| 128 | -Os | 128 | -Os |
| 129 | -Werror=return-type | 129 | -Werror=return-type |
| 130 | + -Wno-unused-parameter | ||
| 130 | ) | 131 | ) |
| 131 | 132 | ||
| 132 | target_link_libraries(stub_lowering | 133 | target_link_libraries(stub_lowering |
| @@ -151,6 +152,7 @@ if (NOT ENABLE_OPEN_SRC) | |||
| 151 | target_compile_options(stub_lowering_static PRIVATE | 152 | target_compile_options(stub_lowering_static PRIVATE |
| 152 | -ffunction-sections | 153 | -ffunction-sections |
| 153 | -fdata-sections | 154 | -fdata-sections |
| 155 | + -Wno-unused-parameter | ||
| 154 | ) | 156 | ) |
| 155 | set_target_properties(stub_lowering_static PROPERTIES | 157 | set_target_properties(stub_lowering_static PROPERTIES |
| 156 | OUTPUT_NAME lowering | 158 | OUTPUT_NAME lowering |
| @@ -403,6 +403,7 @@ target_compile_options(atc_stub_graph PRIVATE | |||
| 403 | -fno-common | 403 | -fno-common |
| 404 | -Os | 404 | -Os |
| 405 | -Werror=return-type | 405 | -Werror=return-type |
| 406 | + -Wno-unused-parameter | ||
| 406 | ) | 407 | ) |
| 407 | 408 | ||
| 408 | target_link_libraries(atc_stub_graph | 409 | target_link_libraries(atc_stub_graph |
| @@ -448,6 +449,7 @@ add_dependencies(fwk_stub_graph graph_stub) | |||
| 448 | target_compile_options(fwk_stub_graph PRIVATE | 449 | target_compile_options(fwk_stub_graph PRIVATE |
| 449 | -Wfloat-equal | 450 | -Wfloat-equal |
| 450 | -fno-common | 451 | -fno-common |
| 452 | + -Wno-unused-parameter | ||
| 451 | ) | 453 | ) |
| 452 | 454 | ||
| 453 | target_include_directories(fwk_stub_graph PRIVATE | 455 | target_include_directories(fwk_stub_graph PRIVATE |
| @@ -5,7 +5,7 @@ add_library(aihac_ir SHARED | |||
| 5 | core/ascendc_ir.cc | 5 | core/ascendc_ir.cc |
| 6 | ${UTILS_SRCS} | 6 | ${UTILS_SRCS} |
| 7 | ) | 7 | ) |
| 8 | -target_compile_options(aihac_ir PRIVATE -DNO_METADEF_ABI_COMPATIABLE -O2 -Werror) | 8 | +target_compile_options(aihac_ir PRIVATE -DNO_METADEF_ABI_COMPATIABLE) |
| 9 | 9 | ||
| 10 | target_compile_options(aihac_ir PRIVATE | 10 | target_compile_options(aihac_ir PRIVATE |
| 11 | $<$<OR:$<STREQUAL:${PRODUCT_SIDE},host>,$<STREQUAL:${ENABLE_OPEN_SRC},True>>:-fexceptions> | 11 | $<$<OR:$<STREQUAL:${PRODUCT_SIDE},host>,$<STREQUAL:${ENABLE_OPEN_SRC},True>>:-fexceptions> |
| @@ -11,7 +11,7 @@ add_library(aihac_symbolizer SHARED | |||
| 11 | attr_group_symbolic_desc_attr.cc | 11 | attr_group_symbolic_desc_attr.cc |
| 12 | guard_dfx_context.cc | 12 | guard_dfx_context.cc |
| 13 | ) | 13 | ) |
| 14 | -target_compile_options(aihac_symbolizer PRIVATE -DNO_METADEF_ABI_COMPATIABLE -O2 -Werror) | 14 | +target_compile_options(aihac_symbolizer PRIVATE -DNO_METADEF_ABI_COMPATIABLE) |
| 15 | 15 | ||
| 16 | target_compile_options(aihac_symbolizer PRIVATE | 16 | target_compile_options(aihac_symbolizer PRIVATE |
| 17 | $<$<OR:$<STREQUAL:${PRODUCT_SIDE},host>,$<STREQUAL:${ENABLE_OPEN_SRC},True>>:-fexceptions> | 17 | $<$<OR:$<STREQUAL:${PRODUCT_SIDE},host>,$<STREQUAL:${ENABLE_OPEN_SRC},True>>:-fexceptions> |
| @@ -172,6 +172,7 @@ target_compile_options(stub_op_common PRIVATE | |||
| 172 | -Wfloat-equal | 172 | -Wfloat-equal |
| 173 | -fno-common | 173 | -fno-common |
| 174 | -Werror=return-type | 174 | -Werror=return-type |
| 175 | + -Wno-unused-parameter | ||
| 175 | ) | 176 | ) |
| 176 | 177 | ||
| 177 | target_link_libraries(stub_op_common | 178 | target_link_libraries(stub_op_common |
| @@ -346,6 +346,7 @@ target_compile_options(stub_register PRIVATE | |||
| 346 | -fno-common | 346 | -fno-common |
| 347 | -Os | 347 | -Os |
| 348 | -Werror=return-type | 348 | -Werror=return-type |
| 349 | + -Wno-unused-parameter | ||
| 349 | ) | 350 | ) |
| 350 | 351 | ||
| 351 | target_link_libraries(stub_register | 352 | target_link_libraries(stub_register |
| @@ -375,7 +376,7 @@ if (NOT ENABLE_OPEN_SRC) | |||
| 375 | 376 | ||
| 376 | add_dependencies(stub_register_static metadef_protos register_stub) | 377 | add_dependencies(stub_register_static metadef_protos register_stub) |
| 377 | 378 | ||
| 378 | - target_compile_options(stub_register_static PRIVATE -ffunction-sections -fdata-sections) | 379 | + target_compile_options(stub_register_static PRIVATE -ffunction-sections -fdata-sections -Wno-unused-parameter) |
| 379 | 380 | ||
| 380 | set_target_properties(stub_register_static PROPERTIES | 381 | set_target_properties(stub_register_static PROPERTIES |
| 381 | OUTPUT_NAME register | 382 | OUTPUT_NAME register |
| @@ -62,20 +62,8 @@ target_include_directories(metadef_headers INTERFACE | |||
| 62 | # ---------------------end----------------------- | 62 | # ---------------------end----------------------- |
| 63 | ) | 63 | ) |
| 64 | 64 | ||
| 65 | -# 开发环境支持run包后可删除 | ||
| 66 | -if (ENABLE_OPEN_SRC) | ||
| 67 | - target_include_directories(metadef_headers INTERFACE | ||
| 68 | - $<BUILD_INTERFACE:${AIR_CODE_DIR}/base/metadef/pkg_inc> | ||
| 69 | - $<BUILD_INTERFACE:${AIR_CODE_DIR}/base/metadef/pkg_inc/graph> | ||
| 70 | - $<BUILD_INTERFACE:${AIR_CODE_DIR}/base/metadef/pkg_inc/base> | ||
| 71 | - $<BUILD_INTERFACE:${AIR_CODE_DIR}/base/metadef/pkg_inc/common> | ||
| 72 | - $<BUILD_INTERFACE:${AIR_CODE_DIR}/base/metadef/pkg_inc/graph/utils> | ||
| 73 | - $<BUILD_INTERFACE:${AIR_CODE_DIR}/base/metadef/pkg_inc/common/ge_common> | ||
| 74 | - ) | ||
| 75 | -endif () | ||
| 76 | - | ||
| 77 | message(STATUS "inc gaph_metadef") | 65 | message(STATUS "inc gaph_metadef") |
| 78 | -#恢复原有metadef头文件,减少依赖组件的修改 | 66 | +set(SRC_GRAPH_DIR ${ASCEND_INSTALL_PATH}/include/graph) |
| 79 | 67 | ||
| 80 | if (EXISTS "${ASCEND_INSTALL_PATH}/include/graph") | 68 | if (EXISTS "${ASCEND_INSTALL_PATH}/include/graph") |
| 81 | set(SRC_GRAPH_DIR ${ASCEND_INSTALL_PATH}/include/graph) | 69 | set(SRC_GRAPH_DIR ${ASCEND_INSTALL_PATH}/include/graph) |
| @@ -127,6 +127,7 @@ target_compile_options(fmk_parser_stub PRIVATE | |||
| 127 | -Wextra | 127 | -Wextra |
| 128 | -Wfloat-equal | 128 | -Wfloat-equal |
| 129 | -Werror=return-type | 129 | -Werror=return-type |
| 130 | + -Wno-unused-parameter | ||
| 130 | ) | 131 | ) |
| 131 | 132 | ||
| 132 | target_compile_definitions(fmk_parser_stub PRIVATE | 133 | target_compile_definitions(fmk_parser_stub PRIVATE |
| @@ -92,6 +92,7 @@ add_library(fmk_onnx_parser_stub SHARED | |||
| 92 | target_compile_options(fmk_onnx_parser_stub PRIVATE | 92 | target_compile_options(fmk_onnx_parser_stub PRIVATE |
| 93 | -O2 | 93 | -O2 |
| 94 | -fno-common | 94 | -fno-common |
| 95 | + -Wno-unused-parameter | ||
| 95 | ) | 96 | ) |
| 96 | 97 | ||
| 97 | target_compile_definitions(fmk_onnx_parser_stub PRIVATE | 98 | target_compile_definitions(fmk_onnx_parser_stub PRIVATE |
| @@ -91,6 +91,7 @@ target_link_libraries(gert_stub PRIVATE | |||
| 91 | target_compile_options(gert_stub PRIVATE | 91 | target_compile_options(gert_stub PRIVATE |
| 92 | -fvisibility=hidden -Os -fno-common -Wfloat-equal | 92 | -fvisibility=hidden -Os -fno-common -Wfloat-equal |
| 93 | -Werror=return-type | 93 | -Werror=return-type |
| 94 | + -Wno-unused-parameter | ||
| 94 | ) | 95 | ) |
| 95 | 96 | ||
| 96 | set_target_properties(gert_stub PROPERTIES | 97 | set_target_properties(gert_stub PROPERTIES |
| @@ -560,6 +560,7 @@ add_dependencies(hybrid_executor_stub | |||
| 560 | target_compile_options(hybrid_executor_stub PRIVATE | 560 | target_compile_options(hybrid_executor_stub PRIVATE |
| 561 | -fno-common -Wfloat-equal -fvisibility=default -Os | 561 | -fno-common -Wfloat-equal -fvisibility=default -Os |
| 562 | -Werror=return-type | 562 | -Werror=return-type |
| 563 | + -Wno-unused-parameter | ||
| 563 | ) | 564 | ) |
| 564 | 565 | ||
| 565 | target_compile_definitions(hybrid_executor_stub PRIVATE | 566 | target_compile_definitions(hybrid_executor_stub PRIVATE |
| @@ -12,6 +12,7 @@ set(METADEF_DIR ${AIR_CODE_DIR}/base/metadef) | |||
| 12 | set(GE_METADEF_TEST_DIR ${AIR_CODE_DIR}/tests/graph_metadef) | 12 | set(GE_METADEF_TEST_DIR ${AIR_CODE_DIR}/tests/graph_metadef) |
| 13 | set(AIR_COMMON_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION} -fno-access-control) | 13 | set(AIR_COMMON_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION} -fno-access-control) |
| 14 | 14 | ||
| 15 | +include(cmake/intf_llt_pub.cmake) | ||
| 15 | include(dflow/udf/cmake/third_party/boost.cmake) | 16 | include(dflow/udf/cmake/third_party/boost.cmake) |
| 16 | include(dflow/udf/cmake/third_party/mockcpp.cmake) | 17 | include(dflow/udf/cmake/third_party/mockcpp.cmake) |
| 17 | add_subdirectory(depends/slog) | 18 | add_subdirectory(depends/slog) |
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | project(tests CXX C) | 11 | project(tests CXX C) |
| 12 | 12 | ||
| 13 | +include(../cmake/intf_llt_pub.cmake) | ||
| 13 | add_subdirectory(depends) | 14 | add_subdirectory(depends) |
| 14 | 15 | ||
| 15 | if (ENABLE_ACL_COV OR ENABLE_ACL_UT) | 16 | if (ENABLE_ACL_COV OR ENABLE_ACL_UT) |
| @@ -39,7 +39,7 @@ target_include_directories(acl_stub PRIVATE | |||
| 39 | ) | 39 | ) |
| 40 | 40 | ||
| 41 | target_link_libraries(acl_stub PRIVATE | 41 | target_link_libraries(acl_stub PRIVATE |
| 42 | - $<BUILD_INTERFACE:intf_pub> | 42 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 43 | c_sec | 43 | c_sec |
| 44 | GTest::gtest | 44 | GTest::gtest |
| 45 | GTest::gtest_main | 45 | GTest::gtest_main |
| @@ -41,7 +41,7 @@ target_include_directories(ge_stub PRIVATE | |||
| 41 | ) | 41 | ) |
| 42 | 42 | ||
| 43 | target_link_libraries(ge_stub PRIVATE | 43 | target_link_libraries(ge_stub PRIVATE |
| 44 | - $<BUILD_INTERFACE:intf_pub> | 44 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 45 | c_sec | 45 | c_sec |
| 46 | json | 46 | json |
| 47 | GTest::gtest | 47 | GTest::gtest |
| @@ -38,7 +38,7 @@ target_include_directories(profiling_stub PRIVATE | |||
| 38 | ) | 38 | ) |
| 39 | 39 | ||
| 40 | target_link_libraries(profiling_stub PRIVATE | 40 | target_link_libraries(profiling_stub PRIVATE |
| 41 | - $<BUILD_INTERFACE:intf_pub> | 41 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 42 | c_sec | 42 | c_sec |
| 43 | GTest::gtest | 43 | GTest::gtest |
| 44 | GTest::gtest_main | 44 | GTest::gtest_main |
| @@ -39,7 +39,7 @@ target_include_directories(runtime_stub PRIVATE | |||
| 39 | ) | 39 | ) |
| 40 | 40 | ||
| 41 | target_link_libraries(runtime_stub PRIVATE | 41 | target_link_libraries(runtime_stub PRIVATE |
| 42 | - $<BUILD_INTERFACE:intf_pub> | 42 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 43 | c_sec | 43 | c_sec |
| 44 | GTest::gtest | 44 | GTest::gtest |
| 45 | GTest::gtest_main | 45 | GTest::gtest_main |
| @@ -40,7 +40,7 @@ target_include_directories(slog_stub PRIVATE | |||
| 40 | ) | 40 | ) |
| 41 | 41 | ||
| 42 | target_link_libraries(slog_stub PRIVATE | 42 | target_link_libraries(slog_stub PRIVATE |
| 43 | - $<BUILD_INTERFACE:intf_pub> | 43 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 44 | c_sec | 44 | c_sec |
| 45 | GTest::gtest | 45 | GTest::gtest |
| 46 | GTest::gtest_main | 46 | GTest::gtest_main |
| @@ -40,7 +40,7 @@ target_include_directories(toolchain_stub PRIVATE | |||
| 40 | ) | 40 | ) |
| 41 | 41 | ||
| 42 | target_link_libraries(toolchain_stub PRIVATE | 42 | target_link_libraries(toolchain_stub PRIVATE |
| 43 | - $<BUILD_INTERFACE:intf_pub> | 43 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 44 | c_sec | 44 | c_sec |
| 45 | json | 45 | json |
| 46 | GTest::gtest | 46 | GTest::gtest |
| @@ -141,7 +141,7 @@ target_compile_options(ut_acl_model_src PRIVATE | |||
| 141 | ) | 141 | ) |
| 142 | 142 | ||
| 143 | target_link_libraries(ut_acl_model_src PRIVATE | 143 | target_link_libraries(ut_acl_model_src PRIVATE |
| 144 | - $<BUILD_INTERFACE:intf_pub> | 144 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 145 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address | 145 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address |
| 146 | c_sec | 146 | c_sec |
| 147 | json | 147 | json |
| @@ -188,7 +188,7 @@ target_compile_options(ut_acl_cblas_src PRIVATE | |||
| 188 | ) | 188 | ) |
| 189 | 189 | ||
| 190 | target_link_libraries(ut_acl_cblas_src PRIVATE | 190 | target_link_libraries(ut_acl_cblas_src PRIVATE |
| 191 | - $<BUILD_INTERFACE:intf_pub> | 191 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 192 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address | 192 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address |
| 193 | ut_acl_model_src | 193 | ut_acl_model_src |
| 194 | c_sec | 194 | c_sec |
| @@ -239,7 +239,7 @@ target_compile_options(ut_acl_op_exec_src PRIVATE | |||
| 239 | ) | 239 | ) |
| 240 | 240 | ||
| 241 | target_link_libraries(ut_acl_op_exec_src PRIVATE | 241 | target_link_libraries(ut_acl_op_exec_src PRIVATE |
| 242 | - $<BUILD_INTERFACE:intf_pub> | 242 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 243 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address | 243 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address |
| 244 | ut_acl_model_src | 244 | ut_acl_model_src |
| 245 | c_sec | 245 | c_sec |
| @@ -291,7 +291,7 @@ target_compile_options(ut_acl_op_compiler_src PRIVATE | |||
| 291 | ) | 291 | ) |
| 292 | 292 | ||
| 293 | target_link_libraries(ut_acl_op_compiler_src PRIVATE | 293 | target_link_libraries(ut_acl_op_compiler_src PRIVATE |
| 294 | - $<BUILD_INTERFACE:intf_pub> | 294 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 295 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address | 295 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address |
| 296 | ut_acl_op_exec_src | 296 | ut_acl_op_exec_src |
| 297 | c_sec | 297 | c_sec |
| @@ -346,7 +346,7 @@ target_compile_definitions(acl_utest PRIVATE | |||
| 346 | ) | 346 | ) |
| 347 | 347 | ||
| 348 | target_link_libraries(acl_utest PRIVATE | 348 | target_link_libraries(acl_utest PRIVATE |
| 349 | - $<BUILD_INTERFACE:intf_pub> | 349 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 350 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address | 350 | -fsanitize=address -fsanitize=leak -fsanitize-recover=address |
| 351 | -Wl,--whole-archive | 351 | -Wl,--whole-archive |
| 352 | c_sec | 352 | c_sec |
| @@ -181,7 +181,7 @@ if (ENABLE_OPEN_SRC) | |||
| 181 | ) | 181 | ) |
| 182 | else () | 182 | else () |
| 183 | target_link_libraries(ascgen_common PUBLIC | 183 | target_link_libraries(ascgen_common PUBLIC |
| 184 | - $<BUILD_INTERFACE:intf_pub_cxx17> | 184 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 185 | $<BUILD_INTERFACE:mmpa_headers> | 185 | $<BUILD_INTERFACE:mmpa_headers> |
| 186 | $<BUILD_INTERFACE:msprof_headers> | 186 | $<BUILD_INTERFACE:msprof_headers> |
| 187 | $<BUILD_INTERFACE:runtime_headers> | 187 | $<BUILD_INTERFACE:runtime_headers> |
| @@ -18,7 +18,7 @@ target_include_directories(common_stub PUBLIC | |||
| 18 | 18 | ||
| 19 | target_link_libraries(common_stub | 19 | target_link_libraries(common_stub |
| 20 | PRIVATE | 20 | PRIVATE |
| 21 | - intf_pub | 21 | + intf_llt_pub |
| 22 | metadef_headers | 22 | metadef_headers |
| 23 | PUBLIC | 23 | PUBLIC |
| 24 | ascend_protobuf | 24 | ascend_protobuf |
| @@ -17,7 +17,7 @@ target_compile_definitions(autofuse_runtime_stub PRIVATE | |||
| 17 | target_include_directories(autofuse_runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src) | 17 | target_include_directories(autofuse_runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src) |
| 18 | target_link_libraries(autofuse_runtime_stub | 18 | target_link_libraries(autofuse_runtime_stub |
| 19 | PRIVATE | 19 | PRIVATE |
| 20 | - intf_pub | 20 | + intf_llt_pub |
| 21 | c_sec | 21 | c_sec |
| 22 | PUBLIC | 22 | PUBLIC |
| 23 | runtime_headers | 23 | runtime_headers |
| @@ -20,7 +20,7 @@ target_include_directories(asc_slog_stub PRIVATE | |||
| 20 | 20 | ||
| 21 | target_link_libraries(asc_slog_stub | 21 | target_link_libraries(asc_slog_stub |
| 22 | PRIVATE | 22 | PRIVATE |
| 23 | - intf_pub | 23 | + intf_llt_pub |
| 24 | PUBLIC | 24 | PUBLIC |
| 25 | unified_dlog_headers | 25 | unified_dlog_headers |
| 26 | ) | 26 | ) |
| @@ -21,7 +21,7 @@ target_compile_options(atrace_stub PRIVATE | |||
| 21 | 21 | ||
| 22 | target_link_libraries(atrace_stub | 22 | target_link_libraries(atrace_stub |
| 23 | PRIVATE | 23 | PRIVATE |
| 24 | - intf_pub | 24 | + intf_llt_pub |
| 25 | c_sec | 25 | c_sec |
| 26 | PUBLIC | 26 | PUBLIC |
| 27 | atrace_headers | 27 | atrace_headers |
| @@ -23,7 +23,7 @@ target_compile_options(autofuse_eager_graph_builder | |||
| 23 | ) | 23 | ) |
| 24 | 24 | ||
| 25 | target_link_libraries(autofuse_eager_graph_builder PRIVATE | 25 | target_link_libraries(autofuse_eager_graph_builder PRIVATE |
| 26 | - intf_pub | 26 | + intf_llt_pub |
| 27 | slog_headers | 27 | slog_headers |
| 28 | mmpa_headers | 28 | mmpa_headers |
| 29 | metadef_headers | 29 | metadef_headers |
| @@ -19,4 +19,4 @@ target_include_directories(easy_asc_graph | |||
| 19 | PUBLIC ${CMAKE_BINARY_DIR}/ascir_builtin_ops | 19 | PUBLIC ${CMAKE_BINARY_DIR}/ascir_builtin_ops |
| 20 | ) | 20 | ) |
| 21 | 21 | ||
| 22 | -target_link_libraries(easy_asc_graph PUBLIC intf_pub_cxx17 ascir graph graph_base) | 22 | +target_link_libraries(easy_asc_graph PUBLIC intf_llt_pub ascir graph graph_base) |
| @@ -17,4 +17,4 @@ target_include_directories(easy_graph_b | |||
| 17 | PRIVATE src # 私有包含目录 | 17 | PRIVATE src # 私有包含目录 |
| 18 | ) | 18 | ) |
| 19 | # 添加其他依赖库(如果有) | 19 | # 添加其他依赖库(如果有) |
| 20 | -target_link_libraries(easy_graph_b PUBLIC intf_pub_cxx17) | 20 | +target_link_libraries(easy_graph_b PUBLIC intf_llt_pub) |
| @@ -18,7 +18,7 @@ target_include_directories(ge_graph_dsl_b | |||
| 18 | 18 | ||
| 19 | target_compile_options(ge_graph_dsl_b PRIVATE -g) | 19 | target_compile_options(ge_graph_dsl_b PRIVATE -g) |
| 20 | 20 | ||
| 21 | -target_link_libraries(ge_graph_dsl_b PUBLIC intf_pub) | 21 | +target_link_libraries(ge_graph_dsl_b PUBLIC intf_llt_pub) |
| 22 | 22 | ||
| 23 | set_target_properties(ge_graph_dsl_b PROPERTIES CXX_STANDARD 17) | 23 | set_target_properties(ge_graph_dsl_b PROPERTIES CXX_STANDARD 17) |
| 24 | target_link_libraries(ge_graph_dsl_b PUBLIC ge_graph_dsl_inc_b easy_graph_b graph graph_base) | 24 | target_link_libraries(ge_graph_dsl_b PUBLIC ge_graph_dsl_inc_b easy_graph_b graph graph_base) |
| @@ -65,8 +65,6 @@ find_package(ascend_protobuf_static MODULE REQUIRED) | |||
| 65 | find_package(unified_dlog MODULE REQUIRED) | 65 | find_package(unified_dlog MODULE REQUIRED) |
| 66 | find_package(mmpa MODULE REQUIRED) | 66 | find_package(mmpa MODULE REQUIRED) |
| 67 | find_package(atrace MODULE REQUIRED) | 67 | find_package(atrace MODULE REQUIRED) |
| 68 | -include(${GE_METADEF_DIR}/cmake/intf_pub_linux.cmake) | ||
| 69 | -include(${GE_METADEF_DIR}/cmake/test_funcs.cmake) | ||
| 70 | add_subdirectory("${TOP_DIR}/tests/depends/slog" "slog_build") | 68 | add_subdirectory("${TOP_DIR}/tests/depends/slog" "slog_build") |
| 71 | add_subdirectory("${TOP_DIR}/tests/depends/trace" "trace_build") | 69 | add_subdirectory("${TOP_DIR}/tests/depends/trace" "trace_build") |
| 72 | 70 | ||
| @@ -14,7 +14,7 @@ file(GLOB_RECURSE BENCHMARK_SRCS CONFIGURE_DEPENDS "*.cc") | |||
| 14 | 14 | ||
| 15 | add_executable(ge_runtime_benchmark ${BENCHMARK_SRCS} ${FAKER_SRCS}) | 15 | add_executable(ge_runtime_benchmark ${BENCHMARK_SRCS} ${FAKER_SRCS}) |
| 16 | 16 | ||
| 17 | -target_link_libraries(ge_runtime_benchmark PUBLIC intf_pub) | 17 | +target_link_libraries(ge_runtime_benchmark PUBLIC intf_llt_pub) |
| 18 | 18 | ||
| 19 | target_include_directories(ge_runtime_benchmark PRIVATE | 19 | target_include_directories(ge_runtime_benchmark PRIVATE |
| 20 | ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v2 | 20 | ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v2 |
| @@ -12,7 +12,7 @@ file(GLOB_RECURSE BIN_SRCS CONFIGURE_DEPENDS "kernel/*.cc") | |||
| 12 | 12 | ||
| 13 | add_executable(ge_runtime_bin ${BIN_SRCS} ${FAKER_SRCS}) | 13 | add_executable(ge_runtime_bin ${BIN_SRCS} ${FAKER_SRCS}) |
| 14 | 14 | ||
| 15 | -target_link_libraries(ge_runtime_bin PUBLIC intf_pub) | 15 | +target_link_libraries(ge_runtime_bin PUBLIC intf_llt_pub) |
| 16 | 16 | ||
| 17 | target_link_libraries(ge_runtime_bin PUBLIC ge_runtime_v2 ge_graph_dsl ge_runtime_stub) | 17 | target_link_libraries(ge_runtime_bin PUBLIC ge_runtime_v2 ge_graph_dsl ge_runtime_stub) |
| 18 | 18 | ||
| @@ -10,32 +10,39 @@ | |||
| 10 | add_library(intf_llt_pub INTERFACE) | 10 | add_library(intf_llt_pub INTERFACE) |
| 11 | 11 | ||
| 12 | target_include_directories(intf_llt_pub INTERFACE | 12 | target_include_directories(intf_llt_pub INTERFACE |
| 13 | -) | 13 | + ) |
| 14 | 14 | ||
| 15 | target_compile_definitions(intf_llt_pub INTERFACE | 15 | target_compile_definitions(intf_llt_pub INTERFACE |
| 16 | CFG_BUILD_DEBUG | 16 | CFG_BUILD_DEBUG |
| 17 | _GLIBCXX_USE_CXX11_ABI=0 | 17 | _GLIBCXX_USE_CXX11_ABI=0 |
| 18 | -) | 18 | + FUNC_VISIBILITY |
| 19 | + FMK_SUPPORT_DUMP | ||
| 20 | + FWK_SUPPORT_TRAINING_TRACE | ||
| 21 | + ) | ||
| 19 | 22 | ||
| 20 | target_compile_options(intf_llt_pub INTERFACE | 23 | target_compile_options(intf_llt_pub INTERFACE |
| 21 | -g | 24 | -g |
| 25 | + -O0 | ||
| 22 | -w | 26 | -w |
| 23 | $<$<COMPILE_LANGUAGE:CXX>:-std=c++17> | 27 | $<$<COMPILE_LANGUAGE:CXX>:-std=c++17> |
| 24 | - $<$<BOOL:${ENABLE_ASAN}>:-fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=leak> | 28 | + $<$<BOOL:${ENABLE_ASAN}>: |
| 29 | + -Wno-maybe-uninitialized -fsanitize=address -fsanitize=leak -fsanitize-recover=address,all | ||
| 30 | + -fno-stack-protector -fno-omit-frame-pointer -g> | ||
| 25 | -fPIC | 31 | -fPIC |
| 26 | -pipe | 32 | -pipe |
| 27 | -) | 33 | + -fno-access-control |
| 34 | + ) | ||
| 28 | 35 | ||
| 29 | target_link_options(intf_llt_pub INTERFACE | 36 | target_link_options(intf_llt_pub INTERFACE |
| 30 | - $<$<BOOL:${ENABLE_ASAN}>:-fsanitize=address -fsanitize=undefined -fsanitize=leak> | 37 | + $<$<BOOL:${ENABLE_ASAN}>:-fsanitize=address -fsanitize=leak -fsanitize-recover=address> |
| 31 | -) | 38 | + ) |
| 32 | 39 | ||
| 33 | target_link_directories(intf_llt_pub INTERFACE | 40 | target_link_directories(intf_llt_pub INTERFACE |
| 34 | -) | 41 | + ) |
| 35 | 42 | ||
| 36 | target_link_libraries(intf_llt_pub INTERFACE | 43 | target_link_libraries(intf_llt_pub INTERFACE |
| 37 | - GTest::gtest | ||
| 38 | -lpthread | 44 | -lpthread |
| 39 | - mockcpp_static | 45 | + -ldl |
| 40 | -) | 46 | + -lrt |
| 47 | + ) | ||
| 41 | 48 | ||
| @@ -60,7 +60,7 @@ target_link_options(ascir_builtin_ops_stub PRIVATE | |||
| 60 | -Wl,--exclude-libs,All | 60 | -Wl,--exclude-libs,All |
| 61 | ) | 61 | ) |
| 62 | 62 | ||
| 63 | -target_link_libraries(ascir_builtin_ops_stub PRIVATE intf_pub metadef_headers unified_dlog ascend_protobuf) | 63 | +target_link_libraries(ascir_builtin_ops_stub PRIVATE intf_llt_pub metadef_headers unified_dlog ascend_protobuf) |
| 64 | 64 | ||
| 65 | set(ops_header_dir ${CMAKE_BINARY_DIR}/graph_metadef/graph/ascendc_ir/generator/) | 65 | set(ops_header_dir ${CMAKE_BINARY_DIR}/graph_metadef/graph/ascendc_ir/generator/) |
| 66 | 66 | ||
| @@ -109,7 +109,7 @@ target_include_directories(aihacb_autofusion_stub PRIVATE | |||
| 109 | ) | 109 | ) |
| 110 | 110 | ||
| 111 | target_link_libraries(aihacb_autofusion_stub PRIVATE | 111 | target_link_libraries(aihacb_autofusion_stub PRIVATE |
| 112 | - intf_pub | 112 | + intf_llt_pub |
| 113 | metadef_headers | 113 | metadef_headers |
| 114 | slog_headers | 114 | slog_headers |
| 115 | mmpa_headers | 115 | mmpa_headers |
| @@ -19,6 +19,6 @@ add_library(mdat SHARED | |||
| 19 | ) | 19 | ) |
| 20 | 20 | ||
| 21 | target_link_libraries(mdat PRIVATE | 21 | target_link_libraries(mdat PRIVATE |
| 22 | - intf_pub | 22 | + intf_llt_pub |
| 23 | metadef_headers | 23 | metadef_headers |
| 24 | ) | 24 | ) |
| @@ -19,7 +19,7 @@ target_include_directories(ascendcl_stub PRIVATE | |||
| 19 | ${AIR_CODE_DIR}/base/metadef/pkg_inc) | 19 | ${AIR_CODE_DIR}/base/metadef/pkg_inc) |
| 20 | target_link_libraries(ascendcl_stub | 20 | target_link_libraries(ascendcl_stub |
| 21 | PRIVATE | 21 | PRIVATE |
| 22 | - intf_pub | 22 | + intf_llt_pub |
| 23 | c_sec | 23 | c_sec |
| 24 | cce_headers | 24 | cce_headers |
| 25 | msprof_headers | 25 | msprof_headers |
| @@ -11,7 +11,7 @@ | |||
| 11 | add_library(error_manager_stub SHARED src/error_manager_stub.cc) | 11 | add_library(error_manager_stub SHARED src/error_manager_stub.cc) |
| 12 | target_link_libraries(error_manager_stub | 12 | target_link_libraries(error_manager_stub |
| 13 | PRIVATE | 13 | PRIVATE |
| 14 | - intf_pub | 14 | + intf_llt_pub |
| 15 | c_sec | 15 | c_sec |
| 16 | PUBLIC | 16 | PUBLIC |
| 17 | metadef_headers | 17 | metadef_headers |
| @@ -23,7 +23,7 @@ target_include_directories(graphtuner_executor PRIVATE | |||
| 23 | ) | 23 | ) |
| 24 | target_link_libraries(graphtuner_executor | 24 | target_link_libraries(graphtuner_executor |
| 25 | PRIVATE | 25 | PRIVATE |
| 26 | - intf_pub | 26 | + intf_llt_pub |
| 27 | metadef_headers | 27 | metadef_headers |
| 28 | c_sec_headers | 28 | c_sec_headers |
| 29 | slog_headers | 29 | slog_headers |
| @@ -21,7 +21,7 @@ target_link_options(hccl_stub PRIVATE | |||
| 21 | 21 | ||
| 22 | target_link_libraries(hccl_stub | 22 | target_link_libraries(hccl_stub |
| 23 | PRIVATE | 23 | PRIVATE |
| 24 | - intf_pub | 24 | + intf_llt_pub |
| 25 | slog_headers | 25 | slog_headers |
| 26 | cce_headers | 26 | cce_headers |
| 27 | runtime_headers | 27 | runtime_headers |
| @@ -75,7 +75,7 @@ target_link_libraries(llm_engine_base PRIVATE | |||
| 75 | air_headers | 75 | air_headers |
| 76 | slog_headers | 76 | slog_headers |
| 77 | metadef_headers | 77 | metadef_headers |
| 78 | - intf_pub | 78 | + intf_llt_pub |
| 79 | llm_mmpa_stub | 79 | llm_mmpa_stub |
| 80 | mmpa | 80 | mmpa |
| 81 | slog_stub | 81 | slog_stub |
| @@ -21,7 +21,7 @@ target_include_directories(mmpa_stub PRIVATE | |||
| 21 | ) | 21 | ) |
| 22 | target_link_libraries(mmpa_stub | 22 | target_link_libraries(mmpa_stub |
| 23 | PRIVATE | 23 | PRIVATE |
| 24 | - intf_pub | 24 | + intf_llt_pub |
| 25 | metadef_headers | 25 | metadef_headers |
| 26 | runtime_headers | 26 | runtime_headers |
| 27 | msprof_headers | 27 | msprof_headers |
| @@ -28,7 +28,7 @@ target_compile_definitions(gert_op_impl PRIVATE | |||
| 28 | ) | 28 | ) |
| 29 | target_link_libraries(gert_op_impl | 29 | target_link_libraries(gert_op_impl |
| 30 | PRIVATE | 30 | PRIVATE |
| 31 | - intf_pub | 31 | + intf_llt_pub |
| 32 | metadef_headers | 32 | metadef_headers |
| 33 | slog_headers | 33 | slog_headers |
| 34 | c_sec_headers | 34 | c_sec_headers |
| @@ -65,7 +65,7 @@ target_compile_definitions(gert_op_impl2 PRIVATE | |||
| 65 | ) | 65 | ) |
| 66 | target_link_libraries(gert_op_impl2 | 66 | target_link_libraries(gert_op_impl2 |
| 67 | PRIVATE | 67 | PRIVATE |
| 68 | - intf_pub | 68 | + intf_llt_pub |
| 69 | metadef_headers | 69 | metadef_headers |
| 70 | slog_headers | 70 | slog_headers |
| 71 | c_sec_headers | 71 | c_sec_headers |
| @@ -95,7 +95,7 @@ target_compile_definitions(autofuse_stub PRIVATE | |||
| 95 | ) | 95 | ) |
| 96 | target_link_libraries(autofuse_stub | 96 | target_link_libraries(autofuse_stub |
| 97 | PRIVATE | 97 | PRIVATE |
| 98 | - intf_pub | 98 | + intf_llt_pub |
| 99 | metadef_headers | 99 | metadef_headers |
| 100 | c_sec_headers | 100 | c_sec_headers |
| 101 | c_sec | 101 | c_sec |
| @@ -116,7 +116,7 @@ target_compile_definitions(slice_autofuse_stub PRIVATE | |||
| 116 | ) | 116 | ) |
| 117 | target_link_libraries(slice_autofuse_stub | 117 | target_link_libraries(slice_autofuse_stub |
| 118 | PRIVATE | 118 | PRIVATE |
| 119 | - intf_pub | 119 | + intf_llt_pub |
| 120 | metadef_headers | 120 | metadef_headers |
| 121 | c_sec_headers | 121 | c_sec_headers |
| 122 | c_sec | 122 | c_sec |
| @@ -144,7 +144,7 @@ target_compile_definitions(gert_op_impl_static PRIVATE | |||
| 144 | ) | 144 | ) |
| 145 | target_link_libraries(gert_op_impl_static | 145 | target_link_libraries(gert_op_impl_static |
| 146 | PRIVATE | 146 | PRIVATE |
| 147 | - intf_pub | 147 | + intf_llt_pub |
| 148 | metadef_headers | 148 | metadef_headers |
| 149 | slog_headers | 149 | slog_headers |
| 150 | c_sec_headers | 150 | c_sec_headers |
| @@ -19,7 +19,7 @@ if(NOT TARGET platform) | |||
| 19 | add_library(platform SHARED ${SRC_FILES}) | 19 | add_library(platform SHARED ${SRC_FILES}) |
| 20 | target_link_libraries(platform | 20 | target_link_libraries(platform |
| 21 | PRIVATE | 21 | PRIVATE |
| 22 | - intf_pub | 22 | + intf_llt_pub |
| 23 | ) | 23 | ) |
| 24 | target_compile_options(platform PRIVATE -g) | 24 | target_compile_options(platform PRIVATE -g) |
| 25 | endif() | 25 | endif() |
| @@ -27,7 +27,7 @@ target_compile_definitions(profiler_stub PRIVATE | |||
| 27 | 27 | ||
| 28 | target_link_libraries(profiler_stub | 28 | target_link_libraries(profiler_stub |
| 29 | PRIVATE | 29 | PRIVATE |
| 30 | - intf_pub | 30 | + intf_llt_pub |
| 31 | runtime_headers | 31 | runtime_headers |
| 32 | c_sec | 32 | c_sec |
| 33 | ascend_protobuf | 33 | ascend_protobuf |
| @@ -47,7 +47,7 @@ target_link_libraries(llm_wrapper PRIVATE | |||
| 47 | json | 47 | json |
| 48 | runtime_stub | 48 | runtime_stub |
| 49 | mmpa_stub2 | 49 | mmpa_stub2 |
| 50 | - intf_pub | 50 | + intf_llt_pub |
| 51 | ascendcl_stub | 51 | ascendcl_stub |
| 52 | llm_engine_base | 52 | llm_engine_base |
| 53 | -Wl,--no-as-needed | 53 | -Wl,--no-as-needed |
| @@ -16,7 +16,7 @@ target_compile_definitions(runtime_stub PRIVATE | |||
| 16 | target_include_directories(runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src) | 16 | target_include_directories(runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src) |
| 17 | target_link_libraries(runtime_stub | 17 | target_link_libraries(runtime_stub |
| 18 | PRIVATE | 18 | PRIVATE |
| 19 | - intf_pub | 19 | + intf_llt_pub |
| 20 | c_sec | 20 | c_sec |
| 21 | cce_headers | 21 | cce_headers |
| 22 | msprof_headers | 22 | msprof_headers |
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | + | ||
| 18 | 19 | ||
| 19 | 20 | ||
| 20 | 21 | ||
| @@ -14,14 +14,14 @@ file(GLOB_RECURSE ASCENDALOG_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src | |||
| 14 | 14 | ||
| 15 | add_library(slog_common SHARED ${SLOG_SRC_FILES}) | 15 | add_library(slog_common SHARED ${SLOG_SRC_FILES}) |
| 16 | target_compile_options(slog_common PRIVATE -g -O0) | 16 | target_compile_options(slog_common PRIVATE -g -O0) |
| 17 | -target_link_libraries(slog_common PRIVATE intf_pub | 17 | +target_link_libraries(slog_common PRIVATE intf_llt_pub |
| 18 | PUBLIC slog_headers | 18 | PUBLIC slog_headers |
| 19 | ) | 19 | ) |
| 20 | 20 | ||
| 21 | add_library(ascendalog SHARED ${ASCENDALOG_SRC_FILES}) | 21 | add_library(ascendalog SHARED ${ASCENDALOG_SRC_FILES}) |
| 22 | target_compile_definitions(ascendalog PRIVATE LOG_CPP) | 22 | target_compile_definitions(ascendalog PRIVATE LOG_CPP) |
| 23 | target_compile_options(ascendalog PRIVATE -g -O0) | 23 | target_compile_options(ascendalog PRIVATE -g -O0) |
| 24 | -target_link_libraries(ascendalog PRIVATE intf_pub | 24 | +target_link_libraries(ascendalog PRIVATE intf_llt_pub |
| 25 | PUBLIC slog_headers | 25 | PUBLIC slog_headers |
| 26 | slog_common | 26 | slog_common |
| 27 | ) | 27 | ) |
| @@ -48,7 +48,7 @@ target_link_options(ut_flow_graph PRIVATE | |||
| 48 | ) | 48 | ) |
| 49 | 49 | ||
| 50 | target_link_libraries(ut_flow_graph PRIVATE | 50 | target_link_libraries(ut_flow_graph PRIVATE |
| 51 | - intf_pub | 51 | + intf_llt_pub |
| 52 | -lgcov | 52 | -lgcov |
| 53 | metadef_headers | 53 | metadef_headers |
| 54 | ascend_protobuf | 54 | ascend_protobuf |
| @@ -59,7 +59,7 @@ target_link_libraries(llm_engine_test | |||
| 59 | runtime_stub | 59 | runtime_stub |
| 60 | mmpa_stub2 | 60 | mmpa_stub2 |
| 61 | ascendcl_stub | 61 | ascendcl_stub |
| 62 | - intf_pub | 62 | + intf_llt_pub |
| 63 | llm_engine_base | 63 | llm_engine_base |
| 64 | llm_engine | 64 | llm_engine |
| 65 | ascend_dump | 65 | ascend_dump |
| @@ -107,7 +107,7 @@ target_link_libraries(ut_llm_engine_utest | |||
| 107 | json | 107 | json |
| 108 | runtime_stub | 108 | runtime_stub |
| 109 | mmpa_stub2 | 109 | mmpa_stub2 |
| 110 | - intf_pub | 110 | + intf_llt_pub |
| 111 | ascendcl_stub | 111 | ascendcl_stub |
| 112 | llm_engine_base | 112 | llm_engine_base |
| 113 | llm_engine | 113 | llm_engine |
| @@ -40,7 +40,7 @@ target_compile_options(df_st_stubs PRIVATE | |||
| 40 | -Wall -Wfloat-equal -Werror | 40 | -Wall -Wfloat-equal -Werror |
| 41 | ) | 41 | ) |
| 42 | 42 | ||
| 43 | -target_link_libraries(df_st_stubs PUBLIC intf_pub ge_running_env GTest::gtest GTest::gmock ascend_protobuf metadef_headers) | 43 | +target_link_libraries(df_st_stubs PUBLIC intf_llt_pub ge_running_env GTest::gtest GTest::gmock ascend_protobuf metadef_headers) |
| 44 | 44 | ||
| 45 | add_library(df_memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c) | 45 | add_library(df_memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c) |
| 46 | -target_link_libraries(df_memset_stubs PUBLIC intf_pub) | 46 | +target_link_libraries(df_memset_stubs PUBLIC intf_llt_pub) |
| @@ -173,7 +173,7 @@ target_link_options(ut_libge_helper_utest PRIVATE | |||
| 173 | ) | 173 | ) |
| 174 | 174 | ||
| 175 | target_link_libraries(ut_libge_helper_utest | 175 | target_link_libraries(ut_libge_helper_utest |
| 176 | - intf_pub | 176 | + intf_llt_pub |
| 177 | metadef_headers | 177 | metadef_headers |
| 178 | ascendcl_stub | 178 | ascendcl_stub |
| 179 | datagw_headers | 179 | datagw_headers |
| @@ -8,6 +8,5 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ----------------------------------------------------------------------------------------------------------- | 9 | # ----------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | -include(cmake/intf.cmake) | ||
| 12 | add_subdirectory(ut) | 11 | add_subdirectory(ut) |
| 13 | add_subdirectory(st) | 12 | add_subdirectory(st) |
| @@ -60,6 +60,7 @@ target_link_libraries(st_built_in_flow_func PRIVATE | |||
| 60 | -rdynamic | 60 | -rdynamic |
| 61 | built_in_flowfunc | 61 | built_in_flowfunc |
| 62 | intf_llt_pub | 62 | intf_llt_pub |
| 63 | + mockcpp_static | ||
| 63 | -rdynamic | 64 | -rdynamic |
| 64 | $<BUILD_INTERFACE:intf_llt_pub> | 65 | $<BUILD_INTERFACE:intf_llt_pub> |
| 65 | $<BUILD_INTERFACE:slog_headers> | 66 | $<BUILD_INTERFACE:slog_headers> |
| @@ -74,6 +74,7 @@ target_link_libraries(st_flow_func_executor PRIVATE | |||
| 74 | reader_writer | 74 | reader_writer |
| 75 | udf_profiling | 75 | udf_profiling |
| 76 | -rdynamic | 76 | -rdynamic |
| 77 | + mockcpp_static | ||
| 77 | $<BUILD_INTERFACE:intf_llt_pub> | 78 | $<BUILD_INTERFACE:intf_llt_pub> |
| 78 | $<BUILD_INTERFACE:slog_headers> | 79 | $<BUILD_INTERFACE:slog_headers> |
| 79 | $<BUILD_INTERFACE:mmpa_headers> | 80 | $<BUILD_INTERFACE:mmpa_headers> |
| @@ -56,6 +56,7 @@ target_link_libraries(ut_built_in_flow_func PRIVATE | |||
| 56 | ascend_protobuf | 56 | ascend_protobuf |
| 57 | udf_dump | 57 | udf_dump |
| 58 | udf_static | 58 | udf_static |
| 59 | + mockcpp_static | ||
| 59 | mmpa | 60 | mmpa |
| 60 | -rdynamic | 61 | -rdynamic |
| 61 | built_in_flowfunc | 62 | built_in_flowfunc |
| @@ -77,6 +77,7 @@ target_link_libraries(ut_flow_func_executor PRIVATE | |||
| 77 | udf_dump | 77 | udf_dump |
| 78 | udf_profiling | 78 | udf_profiling |
| 79 | -rdynamic | 79 | -rdynamic |
| 80 | + mockcpp_static | ||
| 80 | $<BUILD_INTERFACE:intf_llt_pub> | 81 | $<BUILD_INTERFACE:intf_llt_pub> |
| 81 | $<BUILD_INTERFACE:slog_headers> | 82 | $<BUILD_INTERFACE:slog_headers> |
| 82 | $<BUILD_INTERFACE:mmpa_headers> | 83 | $<BUILD_INTERFACE:mmpa_headers> |
| @@ -247,7 +247,7 @@ target_link_directories(host_engine_stest PRIVATE | |||
| 247 | ) | 247 | ) |
| 248 | 248 | ||
| 249 | target_link_libraries(tf_engine_stest PRIVATE | 249 | target_link_libraries(tf_engine_stest PRIVATE |
| 250 | - intf_pub | 250 | + intf_llt_pub |
| 251 | msprof_headers | 251 | msprof_headers |
| 252 | air_headers | 252 | air_headers |
| 253 | datagw_headers | 253 | datagw_headers |
| @@ -290,7 +290,7 @@ target_compile_definitions(cpu_engine_stest PRIVATE | |||
| 290 | 290 | ||
| 291 | if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC) | 291 | if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC) |
| 292 | target_link_libraries(cpu_engine_stest PRIVATE | 292 | target_link_libraries(cpu_engine_stest PRIVATE |
| 293 | - intf_pub | 293 | + intf_llt_pub |
| 294 | msprof_headers | 294 | msprof_headers |
| 295 | air_headers | 295 | air_headers |
| 296 | datagw_headers | 296 | datagw_headers |
| @@ -322,7 +322,7 @@ if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC) | |||
| 322 | ) | 322 | ) |
| 323 | else () | 323 | else () |
| 324 | target_link_libraries(cpu_engine_stest PRIVATE | 324 | target_link_libraries(cpu_engine_stest PRIVATE |
| 325 | - intf_pub | 325 | + intf_llt_pub |
| 326 | msprof_headers | 326 | msprof_headers |
| 327 | air_headers | 327 | air_headers |
| 328 | datagw_headers | 328 | datagw_headers |
| @@ -365,7 +365,7 @@ target_compile_definitions(host_engine_stest PRIVATE | |||
| 365 | ) | 365 | ) |
| 366 | 366 | ||
| 367 | target_link_libraries(host_engine_stest PRIVATE | 367 | target_link_libraries(host_engine_stest PRIVATE |
| 368 | - intf_pub | 368 | + intf_llt_pub |
| 369 | msprof_headers | 369 | msprof_headers |
| 370 | air_headers | 370 | air_headers |
| 371 | datagw_headers | 371 | datagw_headers |
| @@ -50,7 +50,7 @@ target_compile_options(stub_for_aicpu PRIVATE | |||
| 50 | ) | 50 | ) |
| 51 | 51 | ||
| 52 | target_link_libraries(stub_for_aicpu PRIVATE | 52 | target_link_libraries(stub_for_aicpu PRIVATE |
| 53 | - intf_pub | 53 | + intf_llt_pub |
| 54 | metadef_headers | 54 | metadef_headers |
| 55 | air_headers | 55 | air_headers |
| 56 | msprof_headers | 56 | msprof_headers |
| @@ -21,7 +21,7 @@ target_link_libraries(runtime_aicpu_stub | |||
| 21 | c_sec | 21 | c_sec |
| 22 | -ldl | 22 | -ldl |
| 23 | -lrt | 23 | -lrt |
| 24 | - intf_pub | 24 | + intf_llt_pub |
| 25 | cce_headers | 25 | cce_headers |
| 26 | msprof_headers | 26 | msprof_headers |
| 27 | PUBLIC | 27 | PUBLIC |
| @@ -27,7 +27,7 @@ target_include_directories(slog_aicpu_stub PRIVATE | |||
| 27 | 27 | ||
| 28 | target_link_libraries(slog_aicpu_stub | 28 | target_link_libraries(slog_aicpu_stub |
| 29 | PRIVATE | 29 | PRIVATE |
| 30 | - intf_pub | 30 | + intf_llt_pub |
| 31 | PUBLIC | 31 | PUBLIC |
| 32 | unified_dlog_headers | 32 | unified_dlog_headers |
| 33 | ) | 33 | ) |
| @@ -268,7 +268,7 @@ target_link_directories(host_engine_utest PRIVATE | |||
| 268 | ) | 268 | ) |
| 269 | 269 | ||
| 270 | target_link_libraries(tf_engine_utest PRIVATE | 270 | target_link_libraries(tf_engine_utest PRIVATE |
| 271 | - intf_pub | 271 | + intf_llt_pub |
| 272 | msprof_headers | 272 | msprof_headers |
| 273 | air_headers | 273 | air_headers |
| 274 | datagw_headers | 274 | datagw_headers |
| @@ -301,7 +301,7 @@ target_link_libraries(tf_engine_utest PRIVATE | |||
| 301 | 301 | ||
| 302 | if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC) | 302 | if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC) |
| 303 | target_link_libraries(cpu_engine_utest PRIVATE | 303 | target_link_libraries(cpu_engine_utest PRIVATE |
| 304 | - intf_pub | 304 | + intf_llt_pub |
| 305 | msprof_headers | 305 | msprof_headers |
| 306 | air_headers | 306 | air_headers |
| 307 | datagw_headers | 307 | datagw_headers |
| @@ -333,7 +333,7 @@ if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC) | |||
| 333 | ) | 333 | ) |
| 334 | else () | 334 | else () |
| 335 | target_link_libraries(cpu_engine_utest PRIVATE | 335 | target_link_libraries(cpu_engine_utest PRIVATE |
| 336 | - intf_pub | 336 | + intf_llt_pub |
| 337 | msprof_headers | 337 | msprof_headers |
| 338 | air_headers | 338 | air_headers |
| 339 | datagw_headers | 339 | datagw_headers |
| @@ -365,7 +365,7 @@ else () | |||
| 365 | endif () | 365 | endif () |
| 366 | 366 | ||
| 367 | target_link_libraries(host_engine_utest PRIVATE | 367 | target_link_libraries(host_engine_utest PRIVATE |
| 368 | - intf_pub | 368 | + intf_llt_pub |
| 369 | msprof_headers | 369 | msprof_headers |
| 370 | air_headers | 370 | air_headers |
| 371 | datagw_headers | 371 | datagw_headers |
| @@ -98,7 +98,7 @@ target_link_directories(dvpp_engine_utest PRIVATE | |||
| 98 | ) | 98 | ) |
| 99 | 99 | ||
| 100 | target_link_libraries(dvpp_engine_utest PRIVATE | 100 | target_link_libraries(dvpp_engine_utest PRIVATE |
| 101 | - intf_pub | 101 | + intf_llt_pub |
| 102 | runtime_headers | 102 | runtime_headers |
| 103 | msprof_headers | 103 | msprof_headers |
| 104 | cce_headers | 104 | cce_headers |
| @@ -123,7 +123,7 @@ target_link_directories(ffts_st PRIVATE | |||
| 123 | ) | 123 | ) |
| 124 | 124 | ||
| 125 | target_link_libraries(ffts_st PRIVATE | 125 | target_link_libraries(ffts_st PRIVATE |
| 126 | - intf_pub | 126 | + intf_llt_pub |
| 127 | slog_headers | 127 | slog_headers |
| 128 | msprof_headers | 128 | msprof_headers |
| 129 | runtime_headers | 129 | runtime_headers |
| @@ -137,7 +137,7 @@ target_link_directories(ffts_ut PRIVATE | |||
| 137 | ) | 137 | ) |
| 138 | 138 | ||
| 139 | target_link_libraries(ffts_ut PRIVATE | 139 | target_link_libraries(ffts_ut PRIVATE |
| 140 | - intf_pub | 140 | + intf_llt_pub |
| 141 | slog_headers | 141 | slog_headers |
| 142 | msprof_headers | 142 | msprof_headers |
| 143 | runtime_headers | 143 | runtime_headers |
| @@ -194,7 +194,7 @@ find_library(REGISTER_LIB NAMES libregister.so PATH_SUFFIXES lib64) | |||
| 194 | find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build) | 194 | find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build) |
| 195 | 195 | ||
| 196 | target_link_libraries(hcce_st_llt PRIVATE | 196 | target_link_libraries(hcce_st_llt PRIVATE |
| 197 | - intf_pub | 197 | + intf_llt_pub |
| 198 | runtime | 198 | runtime |
| 199 | msprof_headers | 199 | msprof_headers |
| 200 | -Wl,--as-needed | 200 | -Wl,--as-needed |
| @@ -219,7 +219,7 @@ target_link_libraries(hcce_st_llt PRIVATE | |||
| 219 | ) | 219 | ) |
| 220 | 220 | ||
| 221 | target_link_libraries(hccl_engine_stest PRIVATE | 221 | target_link_libraries(hccl_engine_stest PRIVATE |
| 222 | - intf_pub | 222 | + intf_llt_pub |
| 223 | runtime | 223 | runtime |
| 224 | msprof_headers | 224 | msprof_headers |
| 225 | -Wl,--as-needed | 225 | -Wl,--as-needed |
| @@ -195,7 +195,7 @@ find_library(REGISTER_LIB NAMES libregister.so PATH_SUFFIXES lib64) | |||
| 195 | find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build) | 195 | find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build) |
| 196 | 196 | ||
| 197 | target_link_libraries(hcce_ut_llt PRIVATE | 197 | target_link_libraries(hcce_ut_llt PRIVATE |
| 198 | - intf_pub | 198 | + intf_llt_pub |
| 199 | runtime | 199 | runtime |
| 200 | msprof_headers | 200 | msprof_headers |
| 201 | -Wl,--as-needed | 201 | -Wl,--as-needed |
| @@ -220,7 +220,7 @@ target_link_libraries(hcce_ut_llt PRIVATE | |||
| 220 | ) | 220 | ) |
| 221 | 221 | ||
| 222 | target_link_libraries(hccl_engine_utest PRIVATE | 222 | target_link_libraries(hccl_engine_utest PRIVATE |
| 223 | - intf_pub | 223 | + intf_llt_pub |
| 224 | runtime | 224 | runtime |
| 225 | msprof_headers | 225 | msprof_headers |
| 226 | -Wl,--as-needed | 226 | -Wl,--as-needed |
| @@ -64,7 +64,7 @@ target_link_directories(fe_benchmark PRIVATE | |||
| 64 | ) | 64 | ) |
| 65 | 65 | ||
| 66 | target_link_libraries(fe_benchmark PRIVATE | 66 | target_link_libraries(fe_benchmark PRIVATE |
| 67 | - intf_pub | 67 | + intf_llt_pub |
| 68 | benchmark::benchmark | 68 | benchmark::benchmark |
| 69 | msprof_headers | 69 | msprof_headers |
| 70 | runtime_headers | 70 | runtime_headers |
| @@ -35,7 +35,7 @@ target_compile_options(cann_kb_stub PRIVATE | |||
| 35 | 35 | ||
| 36 | target_link_libraries(cann_kb_stub | 36 | target_link_libraries(cann_kb_stub |
| 37 | PRIVATE | 37 | PRIVATE |
| 38 | - intf_pub | 38 | + intf_llt_pub |
| 39 | c_sec | 39 | c_sec |
| 40 | air_headers | 40 | air_headers |
| 41 | metadef_headers) | 41 | metadef_headers) |
| @@ -25,7 +25,7 @@ target_compile_options(graph_tuner_stub PRIVATE | |||
| 25 | 25 | ||
| 26 | target_link_libraries(graph_tuner_stub | 26 | target_link_libraries(graph_tuner_stub |
| 27 | PRIVATE | 27 | PRIVATE |
| 28 | - intf_pub | 28 | + intf_llt_pub |
| 29 | msprof_headers | 29 | msprof_headers |
| 30 | metadef_headers | 30 | metadef_headers |
| 31 | air_headers | 31 | air_headers |
| @@ -20,7 +20,7 @@ add_library(mmpa_stub SHARED ${SRCS}) | |||
| 20 | 20 | ||
| 21 | target_link_libraries(mmpa_stub | 21 | target_link_libraries(mmpa_stub |
| 22 | PRIVATE | 22 | PRIVATE |
| 23 | - intf_pub | 23 | + intf_llt_pub |
| 24 | msprof_headers | 24 | msprof_headers |
| 25 | runtime_headers | 25 | runtime_headers |
| 26 | metadef_headers | 26 | metadef_headers |
| @@ -56,7 +56,7 @@ target_compile_options(op_tiling_rt2_stub PRIVATE | |||
| 56 | -Dgoogle=ascend_private) | 56 | -Dgoogle=ascend_private) |
| 57 | 57 | ||
| 58 | target_link_libraries(op_tiling_rt2_stub PRIVATE | 58 | target_link_libraries(op_tiling_rt2_stub PRIVATE |
| 59 | - intf_pub | 59 | + intf_llt_pub |
| 60 | slog_headers | 60 | slog_headers |
| 61 | msprof_headers | 61 | msprof_headers |
| 62 | mmpa_headers | 62 | mmpa_headers |
| @@ -28,7 +28,7 @@ target_compile_options(runtime_stub_fe PRIVATE | |||
| 28 | 28 | ||
| 29 | target_link_libraries(runtime_stub_fe | 29 | target_link_libraries(runtime_stub_fe |
| 30 | PRIVATE | 30 | PRIVATE |
| 31 | - intf_pub | 31 | + intf_llt_pub |
| 32 | msprof_headers | 32 | msprof_headers |
| 33 | c_sec | 33 | c_sec |
| 34 | PUBLIC | 34 | PUBLIC |
| @@ -23,7 +23,7 @@ file(GLOB_RECURSE SOURCES | |||
| 23 | 23 | ||
| 24 | add_library(ge_graph_dsl STATIC ${SOURCES}) | 24 | add_library(ge_graph_dsl STATIC ${SOURCES}) |
| 25 | 25 | ||
| 26 | -target_link_libraries(ge_graph_dsl PUBLIC slog_headers ge_graph_dsl_inc easy_graph graph graph_base intf_pub) | 26 | +target_link_libraries(ge_graph_dsl PUBLIC slog_headers ge_graph_dsl_inc easy_graph graph graph_base intf_llt_pub) |
| 27 | 27 | ||
| 28 | target_include_directories(ge_graph_dsl PRIVATE | 28 | target_include_directories(ge_graph_dsl PRIVATE |
| 29 | ${ASCEND_INSTALL_PATH}/include | 29 | ${ASCEND_INSTALL_PATH}/include |
| @@ -46,7 +46,7 @@ add_library(slog_stub SHARED | |||
| 46 | 46 | ||
| 47 | target_link_libraries(slog_stub | 47 | target_link_libraries(slog_stub |
| 48 | PRIVATE | 48 | PRIVATE |
| 49 | - intf_pub | 49 | + intf_llt_pub |
| 50 | PUBLIC | 50 | PUBLIC |
| 51 | unified_dlog_headers | 51 | unified_dlog_headers |
| 52 | ) | 52 | ) |
| @@ -79,7 +79,7 @@ target_compile_options(te_fusion_stub PRIVATE | |||
| 79 | 79 | ||
| 80 | target_link_libraries(te_fusion_stub | 80 | target_link_libraries(te_fusion_stub |
| 81 | PRIVATE | 81 | PRIVATE |
| 82 | - intf_pub | 82 | + intf_llt_pub |
| 83 | msprof_headers | 83 | msprof_headers |
| 84 | runtime_headers | 84 | runtime_headers |
| 85 | metadef_headers | 85 | metadef_headers |
| @@ -9,7 +9,7 @@ target_compile_options(atrace_stub PRIVATE | |||
| 9 | 9 | ||
| 10 | target_link_libraries(atrace_stub | 10 | target_link_libraries(atrace_stub |
| 11 | PRIVATE | 11 | PRIVATE |
| 12 | - intf_pub | 12 | + intf_llt_pub |
| 13 | c_sec | 13 | c_sec |
| 14 | PUBLIC | 14 | PUBLIC |
| 15 | atrace_headers | 15 | atrace_headers |
| @@ -41,7 +41,7 @@ target_link_directories(fe_env_mocker PRIVATE | |||
| 41 | ) | 41 | ) |
| 42 | 42 | ||
| 43 | target_link_libraries(fe_env_mocker PUBLIC | 43 | target_link_libraries(fe_env_mocker PUBLIC |
| 44 | - intf_pub | 44 | + intf_llt_pub |
| 45 | msprof_headers | 45 | msprof_headers |
| 46 | runtime_headers | 46 | runtime_headers |
| 47 | c_sec | 47 | c_sec |
| @@ -264,5 +264,5 @@ target_link_libraries(fe_st PRIVATE | |||
| 264 | slog_stub | 264 | slog_stub |
| 265 | unified_dlog | 265 | unified_dlog |
| 266 | cann_kb_stub | 266 | cann_kb_stub |
| 267 | - intf_pub | 267 | + intf_llt_pub |
| 268 | ) | 268 | ) |
| @@ -126,4 +126,4 @@ target_link_libraries(fe_st_whole_process PRIVATE | |||
| 126 | mmpa_stub | 126 | mmpa_stub |
| 127 | slog_stub | 127 | slog_stub |
| 128 | fe_env_mocker | 128 | fe_env_mocker |
| 129 | - intf_pub) | 129 | + intf_llt_pub) |
| @@ -268,6 +268,6 @@ target_link_libraries(fe_ut PRIVATE | |||
| 268 | cann_kb_stub | 268 | cann_kb_stub |
| 269 | easy_graph | 269 | easy_graph |
| 270 | ge_graph_dsl | 270 | ge_graph_dsl |
| 271 | - intf_pub | 271 | + intf_llt_pub |
| 272 | GTest::gmock | 272 | GTest::gmock |
| 273 | mockcpp_static) | 273 | mockcpp_static) |
| @@ -162,7 +162,7 @@ target_link_options(rts_engine_utest PRIVATE | |||
| 162 | ) | 162 | ) |
| 163 | 163 | ||
| 164 | target_link_libraries(rts_engine_utest PRIVATE | 164 | target_link_libraries(rts_engine_utest PRIVATE |
| 165 | - $<BUILD_INTERFACE:intf_pub> | 165 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 166 | $<BUILD_INTERFACE:mmpa_headers> | 166 | $<BUILD_INTERFACE:mmpa_headers> |
| 167 | $<BUILD_INTERFACE:msprof_headers> | 167 | $<BUILD_INTERFACE:msprof_headers> |
| 168 | $<BUILD_INTERFACE:slog_headers> | 168 | $<BUILD_INTERFACE:slog_headers> |
| @@ -176,7 +176,7 @@ target_link_libraries(rts_engine_utest PRIVATE | |||
| 176 | runtime | 176 | runtime |
| 177 | -Wl,--as-needed | 177 | -Wl,--as-needed |
| 178 | cce_headers | 178 | cce_headers |
| 179 | - intf_pub | 179 | + intf_llt_pub |
| 180 | runtime_headers | 180 | runtime_headers |
| 181 | msprof_headers | 181 | msprof_headers |
| 182 | GTest::gtest | 182 | GTest::gtest |
| @@ -81,7 +81,7 @@ target_compile_options(helper_runtime PRIVATE | |||
| 81 | ) | 81 | ) |
| 82 | 82 | ||
| 83 | target_link_libraries(helper_runtime PUBLIC | 83 | target_link_libraries(helper_runtime PUBLIC |
| 84 | - intf_pub | 84 | + intf_llt_pub |
| 85 | mmpa_headers | 85 | mmpa_headers |
| 86 | slog_headers | 86 | slog_headers |
| 87 | metadef_headers | 87 | metadef_headers |
| @@ -152,7 +152,7 @@ target_compile_options(helper_runtime_no_grpc PRIVATE | |||
| 152 | ) | 152 | ) |
| 153 | 153 | ||
| 154 | target_link_libraries(helper_runtime_no_grpc PUBLIC | 154 | target_link_libraries(helper_runtime_no_grpc PUBLIC |
| 155 | - intf_pub | 155 | + intf_llt_pub |
| 156 | mmpa_headers | 156 | mmpa_headers |
| 157 | slog_headers | 157 | slog_headers |
| 158 | metadef_headers | 158 | metadef_headers |
| @@ -12,7 +12,7 @@ file(GLOB_RECURSE EASY_GRAPH_SRCS src/*.cc) | |||
| 12 | 12 | ||
| 13 | add_library(easy_graph STATIC ${EASY_GRAPH_SRCS}) | 13 | add_library(easy_graph STATIC ${EASY_GRAPH_SRCS}) |
| 14 | 14 | ||
| 15 | -target_link_libraries(easy_graph PUBLIC intf_pub) | 15 | +target_link_libraries(easy_graph PUBLIC intf_llt_pub) |
| 16 | 16 | ||
| 17 | target_include_directories(easy_graph PUBLIC include | 17 | target_include_directories(easy_graph PUBLIC include |
| 18 | PRIVATE src) | 18 | PRIVATE src) |
| @@ -16,5 +16,5 @@ target_include_directories(ge_graph_dsl | |||
| 16 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${AIR_CODE_DIR}/inc | 16 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${AIR_CODE_DIR}/inc |
| 17 | ) | 17 | ) |
| 18 | 18 | ||
| 19 | -target_link_libraries(ge_graph_dsl PUBLIC intf_pub opp_registry metadef ge_graph_dsl_inc | 19 | +target_link_libraries(ge_graph_dsl PUBLIC intf_llt_pub opp_registry metadef ge_graph_dsl_inc |
| 20 | easy_graph aihac_symbolizer json ascend_protobuf graph graph_base) | 20 | easy_graph aihac_symbolizer json ascend_protobuf graph graph_base) |
| @@ -25,7 +25,7 @@ target_link_options(ge_graph_dsl_test PRIVATE | |||
| 25 | -Wl,-rpath,${CMAKE_CURRENT_LIST_DIR} | 25 | -Wl,-rpath,${CMAKE_CURRENT_LIST_DIR} |
| 26 | ) | 26 | ) |
| 27 | 27 | ||
| 28 | -target_link_libraries(ge_graph_dsl_test PUBLIC intf_pub GTest::gtest ge_graph_dsl) | 28 | +target_link_libraries(ge_graph_dsl_test PUBLIC intf_llt_pub GTest::gtest ge_graph_dsl) |
| 29 | 29 | ||
| 30 | add_test(NAME ge_graph_dsl_test COMMAND ge_graph_dsl_test --gtest_output=xml:${CMAKE_INSTALL_PREFIX}/report/st/ge_graph_dsl_test.xml) | 30 | add_test(NAME ge_graph_dsl_test COMMAND ge_graph_dsl_test --gtest_output=xml:${CMAKE_INSTALL_PREFIX}/report/st/ge_graph_dsl_test.xml) |
| 31 | set_tests_properties(ge_graph_dsl_test PROPERTIES LABELS "st;st_hetero;ge_graph_dsl_test") | 31 | set_tests_properties(ge_graph_dsl_test PROPERTIES LABELS "st;st_hetero;ge_graph_dsl_test") |
| @@ -36,7 +36,7 @@ target_compile_options(ge_running_env PRIVATE | |||
| 36 | ) | 36 | ) |
| 37 | 37 | ||
| 38 | target_link_libraries(ge_running_env PUBLIC | 38 | target_link_libraries(ge_running_env PUBLIC |
| 39 | - intf_pub | 39 | + intf_llt_pub |
| 40 | metadef_headers | 40 | metadef_headers |
| 41 | runtime_headers | 41 | runtime_headers |
| 42 | cce_headers | 42 | cce_headers |
| @@ -25,7 +25,7 @@ target_compile_options(ge_running_env_test PRIVATE | |||
| 25 | -DFUNC_VISIBILITY | 25 | -DFUNC_VISIBILITY |
| 26 | ) | 26 | ) |
| 27 | 27 | ||
| 28 | -target_link_libraries(ge_running_env_test PUBLIC intf_pub GTest::gtest ge_running_env ge_common_base | 28 | +target_link_libraries(ge_running_env_test PUBLIC intf_llt_pub GTest::gtest ge_running_env ge_common_base |
| 29 | ge_compiler | 29 | ge_compiler |
| 30 | ge_runner | 30 | ge_runner |
| 31 | flow_graph ascendcl_stub | 31 | flow_graph ascendcl_stub |
| @@ -37,7 +37,7 @@ target_include_directories(ge_runtime_stub PUBLIC | |||
| 37 | ) | 37 | ) |
| 38 | 38 | ||
| 39 | target_link_libraries(ge_runtime_stub PRIVATE | 39 | target_link_libraries(ge_runtime_stub PRIVATE |
| 40 | - intf_pub | 40 | + intf_llt_pub |
| 41 | msprof_headers | 41 | msprof_headers |
| 42 | runtime_headers | 42 | runtime_headers |
| 43 | opp_registry | 43 | opp_registry |
| @@ -24,7 +24,7 @@ target_compile_options(ge_runtime_stub_test PRIVATE | |||
| 24 | -g | 24 | -g |
| 25 | ) | 25 | ) |
| 26 | 26 | ||
| 27 | -target_link_libraries(ge_runtime_stub_test PUBLIC intf_pub GTest::gtest GTest::gtest_main ge_runtime_stub gert) | 27 | +target_link_libraries(ge_runtime_stub_test PUBLIC intf_llt_pub GTest::gtest GTest::gtest_main ge_runtime_stub gert) |
| 28 | 28 | ||
| 29 | include(CTest) | 29 | include(CTest) |
| 30 | enable_testing() | 30 | enable_testing() |
| @@ -27,7 +27,7 @@ target_compile_options(hybrid_model_async_exec_test PUBLIC -g | |||
| 27 | -fno-access-control | 27 | -fno-access-control |
| 28 | ) | 28 | ) |
| 29 | target_link_libraries(hybrid_model_async_exec_test PUBLIC | 29 | target_link_libraries(hybrid_model_async_exec_test PUBLIC |
| 30 | - intf_pub | 30 | + intf_llt_pub |
| 31 | flow_graph | 31 | flow_graph |
| 32 | -Wl,-z,muldefs | 32 | -Wl,-z,muldefs |
| 33 | -Wl,--whole-archive | 33 | -Wl,--whole-archive |
| @@ -35,7 +35,7 @@ target_compile_options(st_stubs PRIVATE | |||
| 35 | -fno-access-control | 35 | -fno-access-control |
| 36 | ) | 36 | ) |
| 37 | 37 | ||
| 38 | -target_link_libraries(st_stubs PUBLIC intf_pub ge_graph_dsl ge_running_env GTest::gtest GTest::gmock GTest::gmock_main datagw_headers) | 38 | +target_link_libraries(st_stubs PUBLIC intf_llt_pub ge_graph_dsl ge_running_env GTest::gtest GTest::gmock GTest::gmock_main datagw_headers) |
| 39 | 39 | ||
| 40 | add_library(memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c) | 40 | add_library(memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c) |
| 41 | target_link_libraries(memset_stubs PRIVATE intf_pub) | 41 | target_link_libraries(memset_stubs PRIVATE intf_pub) |
| @@ -116,8 +116,6 @@ target_compile_definitions(graph_engine_test PRIVATE | |||
| 116 | ) | 116 | ) |
| 117 | 117 | ||
| 118 | target_compile_options(graph_engine_test PRIVATE | 118 | target_compile_options(graph_engine_test PRIVATE |
| 119 | - -g -O0 | ||
| 120 | - -fno-access-control | ||
| 121 | -Wno-write-strings | 119 | -Wno-write-strings |
| 122 | -Wno-deprecated-declarations | 120 | -Wno-deprecated-declarations |
| 123 | -Wall -Wfloat-equal -Werror | 121 | -Wall -Wfloat-equal -Werror |
| @@ -226,7 +224,7 @@ target_include_directories(graph_engine_compile_test PRIVATE | |||
| 226 | ) | 224 | ) |
| 227 | 225 | ||
| 228 | target_link_libraries(graph_engine_compile_test | 226 | target_link_libraries(graph_engine_compile_test |
| 229 | - intf_pub | 227 | + intf_llt_pub |
| 230 | -Wl,-z,muldefs | 228 | -Wl,-z,muldefs |
| 231 | ge_compiler | 229 | ge_compiler |
| 232 | ge_runner | 230 | ge_runner |
| @@ -64,7 +64,7 @@ target_link_libraries(autofuse_test PRIVATE | |||
| 64 | GTest::gmock | 64 | GTest::gmock |
| 65 | GTest::gmock_main | 65 | GTest::gmock_main |
| 66 | es_ge_test | 66 | es_ge_test |
| 67 | - intf_pub | 67 | + intf_llt_pub |
| 68 | -Wl,--whole-archive | 68 | -Wl,--whole-archive |
| 69 | rt2_registry_static | 69 | rt2_registry_static |
| 70 | -Wl,--no-whole-archive | 70 | -Wl,--no-whole-archive |
| @@ -36,7 +36,7 @@ target_include_directories(st_dvpp_runtime2_test PRIVATE | |||
| 36 | ) | 36 | ) |
| 37 | 37 | ||
| 38 | target_link_libraries(st_dvpp_runtime2_test PRIVATE | 38 | target_link_libraries(st_dvpp_runtime2_test PRIVATE |
| 39 | - intf_pub | 39 | + intf_llt_pub |
| 40 | ascend_dump | 40 | ascend_dump |
| 41 | gert | 41 | gert |
| 42 | -Wl,--whole-archive | 42 | -Wl,--whole-archive |
| @@ -52,7 +52,7 @@ target_link_options(ut_libgraph PRIVATE | |||
| 52 | 52 | ||
| 53 | target_link_libraries(ut_libgraph | 53 | target_link_libraries(ut_libgraph |
| 54 | -Wl,-z,muldefs | 54 | -Wl,-z,muldefs |
| 55 | - intf_pub | 55 | + intf_llt_pub |
| 56 | metadef_headers | 56 | metadef_headers |
| 57 | GTest::gtest | 57 | GTest::gtest |
| 58 | GTest::gtest_main | 58 | GTest::gtest_main |
| @@ -632,7 +632,7 @@ target_link_options(ge_ut_common PRIVATE | |||
| 632 | ) | 632 | ) |
| 633 | 633 | ||
| 634 | target_link_libraries(ge_ut_common PRIVATE | 634 | target_link_libraries(ge_ut_common PRIVATE |
| 635 | - intf_pub | 635 | + intf_llt_pub |
| 636 | metadef_headers | 636 | metadef_headers |
| 637 | datagw_headers | 637 | datagw_headers |
| 638 | adump_headers | 638 | adump_headers |
| @@ -691,7 +691,7 @@ target_link_options(ut_libge_multiparts_utest PRIVATE | |||
| 691 | ) | 691 | ) |
| 692 | 692 | ||
| 693 | target_link_libraries(ut_libge_multiparts_utest | 693 | target_link_libraries(ut_libge_multiparts_utest |
| 694 | - intf_pub | 694 | + intf_llt_pub |
| 695 | metadef_headers | 695 | metadef_headers |
| 696 | ascendcl_stub | 696 | ascendcl_stub |
| 697 | -Wl,-z,muldefs | 697 | -Wl,-z,muldefs |
| @@ -765,7 +765,7 @@ target_link_options(ut_libge_symbol_infer_utest PRIVATE | |||
| 765 | ) | 765 | ) |
| 766 | 766 | ||
| 767 | target_link_libraries(ut_libge_symbol_infer_utest | 767 | target_link_libraries(ut_libge_symbol_infer_utest |
| 768 | - intf_pub | 768 | + intf_llt_pub |
| 769 | -Wl,-z,muldefs | 769 | -Wl,-z,muldefs |
| 770 | symengine | 770 | symengine |
| 771 | lowering | 771 | lowering |
| @@ -819,7 +819,7 @@ target_link_options(ut_libge_common_utest PRIVATE | |||
| 819 | ) | 819 | ) |
| 820 | 820 | ||
| 821 | target_link_libraries(ut_libge_common_utest | 821 | target_link_libraries(ut_libge_common_utest |
| 822 | - intf_pub | 822 | + intf_llt_pub |
| 823 | metadef_headers | 823 | metadef_headers |
| 824 | ascendcl_stub | 824 | ascendcl_stub |
| 825 | symengine | 825 | symengine |
| @@ -894,7 +894,7 @@ target_link_options(ut_libge_others_utest PRIVATE | |||
| 894 | ) | 894 | ) |
| 895 | 895 | ||
| 896 | target_link_libraries(ut_libge_others_utest | 896 | target_link_libraries(ut_libge_others_utest |
| 897 | - intf_pub | 897 | + intf_llt_pub |
| 898 | metadef_headers | 898 | metadef_headers |
| 899 | ascendcl_stub | 899 | ascendcl_stub |
| 900 | ${AIR_COMMON_LINK_OPTION} | 900 | ${AIR_COMMON_LINK_OPTION} |
| @@ -947,7 +947,7 @@ target_link_options(ut_libge_label_maker_utest PRIVATE | |||
| 947 | 947 | ||
| 948 | # TODO:ge_ut_common need shrink; it has too many depends so | 948 | # TODO:ge_ut_common need shrink; it has too many depends so |
| 949 | target_link_libraries(ut_libge_label_maker_utest | 949 | target_link_libraries(ut_libge_label_maker_utest |
| 950 | - intf_pub | 950 | + intf_llt_pub |
| 951 | metadef_headers | 951 | metadef_headers |
| 952 | ascendcl_stub | 952 | ascendcl_stub |
| 953 | ge_common | 953 | ge_common |
| @@ -998,7 +998,7 @@ target_include_directories(ut_libge_kernel_utest PRIVATE | |||
| 998 | ) | 998 | ) |
| 999 | 999 | ||
| 1000 | target_link_libraries(ut_libge_kernel_utest | 1000 | target_link_libraries(ut_libge_kernel_utest |
| 1001 | - intf_pub | 1001 | + intf_llt_pub |
| 1002 | metadef_headers | 1002 | metadef_headers |
| 1003 | -Wl,--whole-archive | 1003 | -Wl,--whole-archive |
| 1004 | ascendcl_stub | 1004 | ascendcl_stub |
| @@ -1059,7 +1059,7 @@ target_link_options(ut_libge_distinct_load_utest PRIVATE | |||
| 1059 | ) | 1059 | ) |
| 1060 | 1060 | ||
| 1061 | target_link_libraries(ut_libge_distinct_load_utest | 1061 | target_link_libraries(ut_libge_distinct_load_utest |
| 1062 | - intf_pub | 1062 | + intf_llt_pub |
| 1063 | metadef_headers | 1063 | metadef_headers |
| 1064 | ascendcl_stub | 1064 | ascendcl_stub |
| 1065 | datagw_headers | 1065 | datagw_headers |
| @@ -1112,7 +1112,7 @@ target_link_options(ge_manual_test PRIVATE | |||
| 1112 | ) | 1112 | ) |
| 1113 | 1113 | ||
| 1114 | target_link_libraries(ge_manual_test | 1114 | target_link_libraries(ge_manual_test |
| 1115 | - intf_pub | 1115 | + intf_llt_pub |
| 1116 | metadef_headers | 1116 | metadef_headers |
| 1117 | ascendcl_stub | 1117 | ascendcl_stub |
| 1118 | ge_compiler | 1118 | ge_compiler |
| @@ -1164,7 +1164,7 @@ target_link_options(ut_jit_execution PRIVATE | |||
| 1164 | ) | 1164 | ) |
| 1165 | 1165 | ||
| 1166 | target_link_libraries(ut_jit_execution | 1166 | target_link_libraries(ut_jit_execution |
| 1167 | - intf_pub | 1167 | + intf_llt_pub |
| 1168 | metadef_headers | 1168 | metadef_headers |
| 1169 | ascendcl_stub | 1169 | ascendcl_stub |
| 1170 | ${AIR_COMMON_LINK_OPTION} | 1170 | ${AIR_COMMON_LINK_OPTION} |
| @@ -1220,7 +1220,7 @@ target_link_options(ut_eager_style_builder PRIVATE | |||
| 1220 | ) | 1220 | ) |
| 1221 | 1221 | ||
| 1222 | target_link_libraries(ut_eager_style_builder | 1222 | target_link_libraries(ut_eager_style_builder |
| 1223 | - intf_pub | 1223 | + intf_llt_pub |
| 1224 | -Wl,-z,muldefs | 1224 | -Wl,-z,muldefs |
| 1225 | metadef_headers | 1225 | metadef_headers |
| 1226 | es_generator_inner_headers | 1226 | es_generator_inner_headers |
| @@ -22,7 +22,7 @@ add_library(stub_geir_ops SHARED | |||
| 22 | target_compile_options(stub_geir_ops PRIVATE) | 22 | target_compile_options(stub_geir_ops PRIVATE) |
| 23 | target_link_libraries(stub_geir_ops | 23 | target_link_libraries(stub_geir_ops |
| 24 | PRIVATE | 24 | PRIVATE |
| 25 | - intf_pub | 25 | + intf_llt_pub |
| 26 | graph | 26 | graph |
| 27 | graph_base | 27 | graph_base |
| 28 | error_manager | 28 | error_manager |
| @@ -58,7 +58,7 @@ target_link_libraries(ut_graph_construction | |||
| 58 | es_ut_test | 58 | es_ut_test |
| 59 | graph_base | 59 | graph_base |
| 60 | graph | 60 | graph |
| 61 | - intf_pub | 61 | + intf_llt_pub |
| 62 | ascend_protobuf | 62 | ascend_protobuf |
| 63 | c_sec | 63 | c_sec |
| 64 | aihac_symbolizer | 64 | aihac_symbolizer |
| @@ -69,7 +69,7 @@ target_link_options(ut_fast_runtime2_test PRIVATE | |||
| 69 | ) | 69 | ) |
| 70 | 70 | ||
| 71 | target_link_libraries(ut_fast_runtime2_test PRIVATE | 71 | target_link_libraries(ut_fast_runtime2_test PRIVATE |
| 72 | - intf_pub | 72 | + intf_llt_pub |
| 73 | ${AIR_COMMON_LINK_OPTION} | 73 | ${AIR_COMMON_LINK_OPTION} |
| 74 | -Wl,--whole-archive | 74 | -Wl,--whole-archive |
| 75 | rt2_registry_static | 75 | rt2_registry_static |
| @@ -21,7 +21,6 @@ target_compile_options(ut_dvpp_runtime2_test PRIVATE | |||
| 21 | ${AIR_COMMON_COMPILE_OPTION} | 21 | ${AIR_COMMON_COMPILE_OPTION} |
| 22 | -Wno-deprecated-declarations | 22 | -Wno-deprecated-declarations |
| 23 | -Wall -Wfloat-equal -Werror | 23 | -Wall -Wfloat-equal -Werror |
| 24 | - --coverage -fprofile-arcs -ftest-coverage | ||
| 25 | ) | 24 | ) |
| 26 | 25 | ||
| 27 | target_compile_definitions(ut_dvpp_runtime2_test PRIVATE | 26 | target_compile_definitions(ut_dvpp_runtime2_test PRIVATE |
| @@ -36,8 +35,7 @@ target_include_directories(ut_dvpp_runtime2_test PRIVATE | |||
| 36 | ) | 35 | ) |
| 37 | 36 | ||
| 38 | target_link_libraries(ut_dvpp_runtime2_test PRIVATE | 37 | target_link_libraries(ut_dvpp_runtime2_test PRIVATE |
| 39 | - intf_pub | 38 | + intf_llt_pub |
| 40 | - ${AIR_COMMON_LINK_OPTION} | ||
| 41 | -Wl,--whole-archive | 39 | -Wl,--whole-archive |
| 42 | -Wl,--no-whole-archive | 40 | -Wl,--no-whole-archive |
| 43 | GTest::gtest | 41 | GTest::gtest |
| @@ -12,7 +12,7 @@ file(GLOB_RECURSE EXE_GRAPH_SRCS CONFIGURE_DEPENDS "*.cc") | |||
| 12 | 12 | ||
| 13 | add_executable(exec_graph_benchmark ${EXE_GRAPH_SRCS}) | 13 | add_executable(exec_graph_benchmark ${EXE_GRAPH_SRCS}) |
| 14 | 14 | ||
| 15 | -target_link_libraries(exec_graph_benchmark PRIVATE intf_pub) | 15 | +target_link_libraries(exec_graph_benchmark PRIVATE intf_llt_pub) |
| 16 | 16 | ||
| 17 | target_include_directories(exec_graph_benchmark PRIVATE | 17 | target_include_directories(exec_graph_benchmark PRIVATE |
| 18 | ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v2 | 18 | ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v2 |
| @@ -36,7 +36,7 @@ set_target_properties(fast_graph_benchmark PROPERTIES CXX_STANDARD 17) | |||
| 36 | target_compile_options(fast_graph_benchmark PRIVATE -O2 -std=c++17) | 36 | target_compile_options(fast_graph_benchmark PRIVATE -O2 -std=c++17) |
| 37 | 37 | ||
| 38 | target_link_libraries(fast_graph_benchmark PRIVATE benchmark::benchmark | 38 | target_link_libraries(fast_graph_benchmark PRIVATE benchmark::benchmark |
| 39 | - intf_pub | 39 | + intf_llt_pub |
| 40 | metadef_headers | 40 | metadef_headers |
| 41 | -Wl,--no-as-needed | 41 | -Wl,--no-as-needed |
| 42 | graph | 42 | graph |
| @@ -182,7 +182,7 @@ RETURN_STATEMENTS = { | |||
| 182 | 'std::unordered_map<std::string, OpTilingFuncInfo>& OpTilingFuncRegistry::': | 182 | 'std::unordered_map<std::string, OpTilingFuncInfo>& OpTilingFuncRegistry::': |
| 183 | ' static std::unordered_map<std::string, OpTilingFuncInfo> op_func_map;\n return op_func_map;', | 183 | ' static std::unordered_map<std::string, OpTilingFuncInfo> op_func_map;\n return op_func_map;', |
| 184 | 'void* OpRunInfo::': ' return nullptr;', | 184 | 'void* OpRunInfo::': ' return nullptr;', |
| 185 | - 'ge::AscendString& OpCompileInfo::': ' return ge::AscendString();', | 185 | + 'ge::AscendString& OpCompileInfo::': ' static ge::AscendString compile_info;\n return compile_info;', |
| 186 | 'std::unordered_map<std::string, OpTilingFuncV2>& OpTilingRegistryInterf_V2::': | 186 | 'std::unordered_map<std::string, OpTilingFuncV2>& OpTilingRegistryInterf_V2::': |
| 187 | ' static std::unordered_map<std::string, OpTilingFuncV2> interf;\n return interf;', | 187 | ' static std::unordered_map<std::string, OpTilingFuncV2> interf;\n return interf;', |
| 188 | 'OpTilingFunc& OpTilingFuncInfo::': ' return this->tiling_func_;', | 188 | 'OpTilingFunc& OpTilingFuncInfo::': ' return this->tiling_func_;', |
| @@ -206,7 +206,7 @@ RETURN_STATEMENTS = { | |||
| 206 | 'Promote& PromoteImpl::': ' return obj;', | 206 | 'Promote& PromoteImpl::': ' return obj;', |
| 207 | 'std::pair<GNodePtr, int32_t> GNode::': | 207 | 'std::pair<GNodePtr, int32_t> GNode::': |
| 208 | ' const std::pair<GNodePtr, int32_t> gnode_idx = {nullptr, 0xFF};\n return gnode_idx;', | 208 | ' const std::pair<GNodePtr, int32_t> gnode_idx = {nullptr, 0xFF};\n return gnode_idx;', |
| 209 | - 'std::vector<int64_t>& OpRunInfo::': ' std::vector<int64_t> vec;\n return vec;', | 209 | + 'std::vector<int64_t>& OpRunInfo::': ' static std::vector<int64_t> vec;\n return vec;', |
| 210 | 'std::vector<const char *>': ' return {};', | 210 | 'std::vector<const char *>': ' return {};', |
| 211 | 'std::vector<FieldInfo>': ' return {};', | 211 | 'std::vector<FieldInfo>': ' return {};', |
| 212 | 'std::vector<GNodePtr>': ' return {};', | 212 | 'std::vector<GNodePtr>': ' return {};', |
| @@ -218,7 +218,8 @@ RETURN_STATEMENTS = { | |||
| 218 | 'std::vector<ge::GeTensorDesc>': ' return {};', | 218 | 'std::vector<ge::GeTensorDesc>': ' return {};', |
| 219 | 'std::vector<GNode>': ' return {};', | 219 | 'std::vector<GNode>': ' return {};', |
| 220 | 'std::vector<GraphPtr>': ' return {};', | 220 | 'std::vector<GraphPtr>': ' return {};', |
| 221 | - 'std::vector<std::vector<ShapeAndType>>&': ' return {};', | 221 | + 'std::vector<std::vector<ShapeAndType>>&': |
| 222 | + ' static std::vector<std::vector<ShapeAndType>> sat;\n return sat;', | ||
| 222 | 'std::vector<std::pair<int64_t, int64_t>>': ' return {};', | 223 | 'std::vector<std::pair<int64_t, int64_t>>': ' return {};', |
| 223 | 'OpsProtoManager* OpsProtoManager::': ' static OpsProtoManager instance;\n return &instance;', | 224 | 'OpsProtoManager* OpsProtoManager::': ' static OpsProtoManager instance;\n return &instance;', |
| 224 | 'Operator': ' return Operator();', | 225 | 'Operator': ' return Operator();', |
| @@ -238,7 +239,7 @@ RETURN_STATEMENTS = { | |||
| 238 | 'RuntimeAttrs*': ' return nullptr;', | 239 | 'RuntimeAttrs*': ' return nullptr;', |
| 239 | 'DeviceTilingContextBuilder& DeviceTilingContextBuilder::': ' return *this;', | 240 | 'DeviceTilingContextBuilder& DeviceTilingContextBuilder::': ' return *this;', |
| 240 | 'OpDescPtr': ' return nullptr;', | 241 | 'OpDescPtr': ' return nullptr;', |
| 241 | - 'std::set<ge::AscendString>&': ' return {};', | 242 | + 'std::set<ge::AscendString>&': ' static std::set<ge::AscendString> as;\n return as;', |
| 242 | 'ResourceContext*': ' return nullptr;', | 243 | 'ResourceContext*': ' return nullptr;', |
| 243 | 'std::unique_ptr<InferenceContext>': ' return nullptr;', | 244 | 'std::unique_ptr<InferenceContext>': ' return nullptr;', |
| 244 | 'Shape ShapeAndType::': ' return Shape();', | 245 | 'Shape ShapeAndType::': ' return Shape();', |
| @@ -275,7 +276,7 @@ RETURN_STATEMENTS = { | |||
| 275 | 'ProtoAttrMap& GeTensorDesc::MutableAttrMap': ' static ProtoAttrMap attr;\n return attr;', | 276 | 'ProtoAttrMap& GeTensorDesc::MutableAttrMap': ' static ProtoAttrMap attr;\n return attr;', |
| 276 | 'ConstProtoAttrMap& GeTensorDesc::GetAttrMap': ' static ProtoAttrMap attr;\n return attr;', | 277 | 'ConstProtoAttrMap& GeTensorDesc::GetAttrMap': ' static ProtoAttrMap attr;\n return attr;', |
| 277 | 'std::uint8_t*': ' return nullptr;', | 278 | 'std::uint8_t*': ' return nullptr;', |
| 278 | - 'std::shared_ptr<AlignedPtr>&': ' return nullptr;', | 279 | + 'std::shared_ptr<AlignedPtr>&': ' static std::shared_ptr<AlignedPtr> ap = nullptr; return ap;', |
| 279 | 'TensorData& TensorData::operator=': ' return *this;', | 280 | 'TensorData& TensorData::operator=': ' return *this;', |
| 280 | 'GeTensorDesc& GeTensor::': ' static GeTensorDesc desc;\n return desc;', | 281 | 'GeTensorDesc& GeTensor::': ' static GeTensorDesc desc;\n return desc;', |
| 281 | 'std::shared_ptr<AlignedPtr> GeTensor::': ' return nullptr;', | 282 | 'std::shared_ptr<AlignedPtr> GeTensor::': ' return nullptr;', |
| @@ -52,7 +52,7 @@ add_dependencies(ut_ascendc_ir aihacb_autofusion_stub) | |||
| 52 | 52 | ||
| 53 | # intf_pub包含stdc++11 当前需要按照更高版本来编译ut | 53 | # intf_pub包含stdc++11 当前需要按照更高版本来编译ut |
| 54 | target_link_libraries(ut_ascendc_ir PRIVATE | 54 | target_link_libraries(ut_ascendc_ir PRIVATE |
| 55 | - intf_pub metadef_headers | 55 | + intf_llt_pub metadef_headers |
| 56 | -Wl,--no-as-needed | 56 | -Wl,--no-as-needed |
| 57 | platform | 57 | platform |
| 58 | metadef | 58 | metadef |
| @@ -42,7 +42,7 @@ target_link_options(ut_exe_graph PRIVATE | |||
| 42 | ) | 42 | ) |
| 43 | 43 | ||
| 44 | target_link_libraries(ut_exe_graph PRIVATE | 44 | target_link_libraries(ut_exe_graph PRIVATE |
| 45 | - intf_pub | 45 | + intf_llt_pub |
| 46 | -Wl,--no-as-needed | 46 | -Wl,--no-as-needed |
| 47 | slog_headers | 47 | slog_headers |
| 48 | platform | 48 | platform |
| @@ -42,7 +42,7 @@ target_compile_definitions(ut_graph PRIVATE | |||
| 42 | ) | 42 | ) |
| 43 | 43 | ||
| 44 | target_link_libraries(ut_graph PRIVATE | 44 | target_link_libraries(ut_graph PRIVATE |
| 45 | - intf_pub | 45 | + intf_llt_pub |
| 46 | -Wl,-z,muldefs | 46 | -Wl,-z,muldefs |
| 47 | -Wl,--no-as-needed | 47 | -Wl,--no-as-needed |
| 48 | platform | 48 | platform |
| @@ -46,7 +46,7 @@ target_link_options(ut_register PRIVATE | |||
| 46 | ) | 46 | ) |
| 47 | 47 | ||
| 48 | target_link_libraries(ut_register | 48 | target_link_libraries(ut_register |
| 49 | - intf_pub | 49 | + intf_llt_pub |
| 50 | metadef_headers | 50 | metadef_headers |
| 51 | runtime_headers | 51 | runtime_headers |
| 52 | slog_headers | 52 | slog_headers |
| @@ -56,7 +56,7 @@ target_compile_options(attr_util_stub PRIVATE | |||
| 56 | ) | 56 | ) |
| 57 | 57 | ||
| 58 | target_link_libraries(attr_util_stub PRIVATE | 58 | target_link_libraries(attr_util_stub PRIVATE |
| 59 | - intf_pub | 59 | + intf_llt_pub |
| 60 | metadef_headers | 60 | metadef_headers |
| 61 | air_headers | 61 | air_headers |
| 62 | slog_headers | 62 | slog_headers |
| @@ -15,7 +15,7 @@ file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR} | |||
| 15 | add_library(parser_mmpa_stub SHARED ${SRCS}) | 15 | add_library(parser_mmpa_stub SHARED ${SRCS}) |
| 16 | target_link_libraries(parser_mmpa_stub | 16 | target_link_libraries(parser_mmpa_stub |
| 17 | PRIVATE | 17 | PRIVATE |
| 18 | - intf_pub | 18 | + intf_llt_pub |
| 19 | metadef_headers | 19 | metadef_headers |
| 20 | -Wl,--no-as-needed | 20 | -Wl,--no-as-needed |
| 21 | ascend_protobuf | 21 | ascend_protobuf |
| @@ -49,7 +49,7 @@ target_compile_definitions(st_parser PRIVATE | |||
| 49 | ) | 49 | ) |
| 50 | 50 | ||
| 51 | target_link_libraries(st_parser PRIVATE | 51 | target_link_libraries(st_parser PRIVATE |
| 52 | - intf_pub | 52 | + intf_llt_pub |
| 53 | metadef_headers | 53 | metadef_headers |
| 54 | air_headers | 54 | air_headers |
| 55 | slog_headers | 55 | slog_headers |
| @@ -56,7 +56,7 @@ target_compile_definitions(ut_parser PRIVATE | |||
| 56 | ) | 56 | ) |
| 57 | 57 | ||
| 58 | target_link_libraries(ut_parser | 58 | target_link_libraries(ut_parser |
| 59 | - intf_pub | 59 | + intf_llt_pub |
| 60 | metadef_headers | 60 | metadef_headers |
| 61 | air_headers | 61 | air_headers |
| 62 | slog_headers | 62 | slog_headers |
| @@ -29,7 +29,7 @@ target_compile_definitions(c_base_static PRIVATE | |||
| 29 | 29 | ||
| 30 | target_link_libraries(c_base_static | 30 | target_link_libraries(c_base_static |
| 31 | PRIVATE | 31 | PRIVATE |
| 32 | - $<BUILD_INTERFACE:intf_pub> | 32 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 33 | c_sec_headers | 33 | c_sec_headers |
| 34 | ) | 34 | ) |
| 35 | 35 | ||
| @@ -67,7 +67,7 @@ add_library(c_json_static STATIC | |||
| 67 | 67 | ||
| 68 | target_link_libraries(c_json_static | 68 | target_link_libraries(c_json_static |
| 69 | PRIVATE | 69 | PRIVATE |
| 70 | - $<BUILD_INTERFACE:intf_pub> | 70 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 71 | c_sec_headers | 71 | c_sec_headers |
| 72 | ) | 72 | ) |
| 73 | 73 | ||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | project(ut_ascendcl_c_utest) | 11 | project(ut_ascendcl_c_utest) |
| 12 | set(CMAKE_CXX_STANDARD 11) | 12 | set(CMAKE_CXX_STANDARD 11) |
| 13 | +include(${AIR_CODE_DIR}/tests/cmake/intf_llt_pub.cmake) | ||
| 13 | 14 | ||
| 14 | set(UT_FILES | 15 | set(UT_FILES |
| 15 | "main.cc" | 16 | "main.cc" |
| @@ -60,8 +61,6 @@ target_include_directories(ut_ascendcl_c_utest PRIVATE | |||
| 60 | ) | 61 | ) |
| 61 | 62 | ||
| 62 | target_compile_options(ut_ascendcl_c_utest PRIVATE | 63 | target_compile_options(ut_ascendcl_c_utest PRIVATE |
| 63 | - -fsanitize=address -fsanitize=leak | ||
| 64 | - -g --coverage -fprofile-arcs -ftest-coverage | ||
| 65 | -Wall -Wextra -Wfloat-equal | 64 | -Wall -Wextra -Wfloat-equal |
| 66 | # -Werror | 65 | # -Werror |
| 67 | ) | 66 | ) |
| @@ -75,8 +74,7 @@ target_compile_definitions(ut_ascendcl_c_utest PRIVATE | |||
| 75 | ) | 74 | ) |
| 76 | 75 | ||
| 77 | target_link_libraries(ut_ascendcl_c_utest PRIVATE | 76 | target_link_libraries(ut_ascendcl_c_utest PRIVATE |
| 78 | - -fsanitize=address -fsanitize=leak | 77 | + $<BUILD_INTERFACE:intf_llt_pub> |
| 79 | - $<BUILD_INTERFACE:intf_pub> | ||
| 80 | msprof_headers | 78 | msprof_headers |
| 81 | runtime_headers | 79 | runtime_headers |
| 82 | c_sec | 80 | c_sec |
| @@ -84,8 +82,4 @@ target_link_libraries(ut_ascendcl_c_utest PRIVATE | |||
| 84 | GTest::gtest_main | 82 | GTest::gtest_main |
| 85 | GTest::gmock | 83 | GTest::gmock |
| 86 | GTest::gmock_main | 84 | GTest::gmock_main |
| 87 | - -lrt | ||
| 88 | - -ldl | ||
| 89 | - -lpthread | ||
| 90 | - -lgcov | ||
| 91 | ) | 85 | ) |