已合并
【fix】: Unified compilation options #1108
tangqunzhang创建于 3月12日
【fix】: Unified compilation options #1108
已合并
tangqunzhang创建于 3月12日
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=261 _FORTIFY_SOURCE=2
62)62)
63 63 
64+target_compile_options(stub_acl_cblas PRIVATE
65+ -Wno-unused-parameter
66+)
67+ 
64set_target_properties(stub_acl_cblas68set_target_properties(stub_acl_cblas
65 PROPERTIES69 PROPERTIES
66 OUTPUT_NAME acl_cblas70 OUTPUT_NAME acl_cblas
@@ -94,6 +98,10 @@ set_target_properties(stub_acl_op_compiler
94 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/stub98 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+ 
97target_link_libraries(stub_acl_op_compiler PRIVATE105target_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
117target_compile_definitions(stub_acl_op_executor PRIVATE125target_compile_definitions(stub_acl_op_executor PRIVATE
118 _FORTIFY_SOURCE=2126 _FORTIFY_SOURCE=2
119)127)
128+ 
129+target_compile_options(stub_acl_op_executor PRIVATE
130+ -Wno-unused-parameter
131+)
132+ 
120set_target_properties(stub_acl_op_executor133set_target_properties(stub_acl_op_executor
121 PROPERTIES134 PROPERTIES
122 OUTPUT_NAME acl_op_executor135 OUTPUT_NAME acl_op_executor
@@ -146,6 +159,11 @@ target_include_directories(stub_acl_mdl PRIVATE
146target_compile_definitions(stub_acl_mdl PRIVATE159target_compile_definitions(stub_acl_mdl PRIVATE
147 _FORTIFY_SOURCE=2160 _FORTIFY_SOURCE=2
148)161)
162+ 
163+target_compile_options(stub_acl_mdl PRIVATE
164+ -Wno-unused-parameter
165+)
166+ 
149set_target_properties(stub_acl_mdl167set_target_properties(stub_acl_mdl
150 PROPERTIES168 PROPERTIES
151 OUTPUT_NAME acl_mdl169 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 {
21using FileNameFilterFn = bool(const std::string &fileName);21using FileNameFilterFn = bool(const std::string &fileName);
22 22 
23aclError ListFiles(23aclError 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_utils25} // namespace file_utils
26} // namespace acl26} // 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 alog32 alog
32 flow_graph33 flow_graph
33 llm_engine34 llm_engine
@@ -38,6 +38,7 @@ add_dependencies(atc_stub_ge_compiler ge_stub)
38target_compile_options(atc_stub_ge_compiler PRIVATE38target_compile_options(atc_stub_ge_compiler PRIVATE
39 -fno-common39 -fno-common
40 -Werror=return-type40 -Werror=return-type
41+ -Wno-unused-parameter
41)42)
42 43 
43target_link_libraries(atc_stub_ge_compiler PRIVATE44target_link_libraries(atc_stub_ge_compiler PRIVATE
@@ -68,6 +69,7 @@ add_dependencies(fwk_stub_ge_runner_v2 ge_stub)
68target_compile_options(fwk_stub_ge_runner_v2 PRIVATE69target_compile_options(fwk_stub_ge_runner_v2 PRIVATE
69 -fno-common70 -fno-common
70 -Werror=return-type71 -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)
102target_compile_options(fwk_stub_ge_runner PRIVATE104target_compile_options(fwk_stub_ge_runner PRIVATE
103 -fno-common105 -fno-common
104 -Werror=return-type106 -Werror=return-type
107+ -Wno-unused-parameter
105)108)
106 109 
107 110 
@@ -596,6 +596,7 @@ target_compile_definitions(ge_common_stub PRIVATE
596target_compile_options(ge_common_stub PRIVATE596target_compile_options(ge_common_stub PRIVATE
597 -fvisibility=default -O2 -fno-common -Wfloat-equal597 -fvisibility=default -O2 -fno-common -Wfloat-equal
598 -Werror=return-type598 -Werror=return-type
599+ -Wno-unused-parameter
599)600)
600 601 
601target_include_directories(ge_common_stub PRIVATE602target_include_directories(ge_common_stub PRIVATE
@@ -10,33 +10,9 @@
10 10 
11if (CMAKE_BUILD_TYPE MATCHES GCOV)11if (CMAKE_BUILD_TYPE MATCHES GCOV)
12 message("GCOV test mode")12 message("GCOV test mode")
13- set(AIR_COMMON_COMPILE_OPTION13+ 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()
40elseif(CMAKE_BUILD_TYPE MATCHES DT)16elseif(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 ##########
17add_library(intf_pub_base INTERFACE)17add_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+ 
19target_compile_options(intf_pub_base INTERFACE25target_compile_options(intf_pub_base INTERFACE
20- -Wall26+ ${OPTIMIZE_OPTION}
21- -fPIC27+ -Werror -fno-common -Wextra -Wfloat-equal -Wall -fPIC
22 -fstack-protector-strong28 -fstack-protector-strong
23 -D_FORTIFY_SOURCE=229 -D_FORTIFY_SOURCE=2
24 $<$<CONFIG:Debug>:-g>30 $<$<CONFIG:Debug>:-g>
25- $<$<BOOL:${ENABLE_ASAN}>:-Wno-maybe-uninitialized -fsanitize=address -fsanitize=leak31+ $<$<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 
30target_compile_definitions(intf_pub_base INTERFACE42target_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 ##########
117find_program(CCACHE_FOUND ccache)137find_program(CCACHE_FOUND ccache)
118if (CCACHE_FOUND)138if (CCACHE_FOUND)
@@ -105,6 +105,7 @@ target_compile_options(aicpu_engine_common PRIVATE
105 -Werror=format105 -Werror=format
106 -Wextra106 -Wextra
107 -Wfloat-equal107 -Wfloat-equal
108+ -Wno-pmf-conversions
108)109)
109 110 
110target_link_options(aicpu_engine_common PRIVATE111target_link_options(aicpu_engine_common PRIVATE
@@ -42,7 +42,7 @@ const std::string kOpsParallel = "aicpu_ops_parallel";
42 42 
43namespace aicpu {43namespace aicpu {
44ge::Status AicpuGraphOptimizer::Initialize(const map<string, string> &options,44ge::Status AicpuGraphOptimizer::Initialize(const map<string, string> &options,
45- ge::OptimizeUtility *const optimize_utility) {45+ [[maybe_unused]] ge::OptimizeUtility *const optimize_utility) {
46 // initial optimizers46 // 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 success45 * @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 success66 * @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 type188 * @param inputs_type vector store input type
189 * @param outputs_type vector store output type189 * @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 
29namespace aicpu {29namespace 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 file32 // 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 
70int32_t AddStringAttrToNodeDef(const ge::Operator &op, const char *name,70int32_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 
84int32_t AddListStringAttrToNodeDef(const ge::Operator &op, const char *name,84int32_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 
105int32_t AddFloatAttrToNodeDef(const ge::Operator &op, const char *name,105int32_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 
119int32_t AddListFloatAttrToNodeDef(const ge::Operator &op, const char *name,119int32_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 
140int32_t AddBoolAttrToNodeDef(const ge::Operator &op, const char *name,140int32_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 
154int32_t AddListBoolAttrToNodeDef(const ge::Operator &op, const char *name,154int32_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 
175int32_t AddIntAttrToNodeDef(const ge::Operator &op, const char *name,175int32_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 
189int32_t AddListIntAttrToNodeDef(const ge::Operator &op, const char *name,189int32_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 
210int32_t AddListListIntAttrToNodeDef(const ge::Operator &op, const char *name,210int32_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 
235int32_t AddDataTypeAttrToNodeDef(const ge::Operator &op, const char *name,235int32_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 
249int32_t AddListDataTypeAttrToNodeDef(const ge::Operator &op, const char *name,249int32_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 
270int32_t AddTensorAttrToNodeDef(const ge::Operator &op, const char *name,270int32_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 
306int32_t AddListTensorAttrToNodeDef(const ge::Operator &op, const char *name,306int32_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 
110ge::Status CpuKernelBuilder::BuildMemCopyInfo(110ge::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 
30ge::Status HostCpuEngine::Initialize(30ge::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 
478bool FEOpsKernelInfoStore::CheckSupported(const ge::NodePtr &node, std::string &un_supported_reason,478bool 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-common29 -fno-common
30 -fno-strict-aliasing30 -fno-strict-aliasing
31- -O2 -D_FORTIFY_SOURCE
32 )31 )
33 32 
34target_link_libraries(compress33target_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-common92 -fno-common
94 -fno-strict-aliasing93 -fno-strict-aliasing
95- -O2 -D_FORTIFY_SOURCE
96 )94 )
97 95 
98target_link_libraries(compressweight PRIVATE96target_link_libraries(compressweight PRIVATE
@@ -26,23 +26,23 @@
26 26 
27namespace {27namespace {
28struct CompressParametersConv2d {28struct 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 
48const int INDEX_SIZE_COMPACT_MODE = 8;48const 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_dlog28 unified_dlog
28 flow_graph29 flow_graph
29 ge_runner_v230 ge_runner_v2
@@ -42,7 +43,6 @@ target_compile_definitions(dflow_wrapper PRIVATE
42)43)
43 44 
44target_compile_options(dflow_wrapper PRIVATE45target_compile_options(dflow_wrapper PRIVATE
45- -O2
46 -Xlinker -export-dynamic46 -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 
72set_target_properties(data_wrapper73set_target_properties(data_wrapper
@@ -75,7 +76,6 @@ set_target_properties(data_wrapper
75)76)
76 77 
77target_compile_options(data_wrapper PRIVATE78target_compile_options(data_wrapper PRIVATE
78- -O2
79 -Xlinker -export-dynamic79 -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_func26 flow_func
26 unified_dlog27 unified_dlog
27)28)
@@ -36,7 +37,6 @@ target_compile_definitions(flowfunc_wrapper PRIVATE
36)37)
37 38 
38target_compile_options(flowfunc_wrapper PRIVATE39target_compile_options(flowfunc_wrapper PRIVATE
39- -O2
40 -Xlinker -export-dynamic40 -Xlinker -export-dynamic
41)41)
42 42 
@@ -176,19 +176,19 @@ py::memoryview ToReadonlyMemoryView(const FlowFunc::Tensor &tensor) {
176 176 
177class PyFlowFuncLogger : public FlowFunc::FlowFuncLogger {177class 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 
272class PyFlowMsgQueue : public FlowFunc::FlowMsgQueue {272class 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 
350class PyMetaRunContext : public FlowFunc::MetaRunContext {350class 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-common127 -fno-common
128 -Os128 -Os
129 -Werror=return-type129 -Werror=return-type
130+ -Wno-unused-parameter
130)131)
131 132 
132target_link_libraries(stub_lowering133target_link_libraries(stub_lowering
@@ -151,6 +152,7 @@ if (NOT ENABLE_OPEN_SRC)
151 target_compile_options(stub_lowering_static PRIVATE152 target_compile_options(stub_lowering_static PRIVATE
152 -ffunction-sections153 -ffunction-sections
153 -fdata-sections154 -fdata-sections
155+ -Wno-unused-parameter
154 )156 )
155 set_target_properties(stub_lowering_static PROPERTIES157 set_target_properties(stub_lowering_static PROPERTIES
156 OUTPUT_NAME lowering158 OUTPUT_NAME lowering
@@ -403,6 +403,7 @@ target_compile_options(atc_stub_graph PRIVATE
403 -fno-common403 -fno-common
404 -Os404 -Os
405 -Werror=return-type405 -Werror=return-type
406+ -Wno-unused-parameter
406)407)
407 408 
408target_link_libraries(atc_stub_graph409target_link_libraries(atc_stub_graph
@@ -448,6 +449,7 @@ add_dependencies(fwk_stub_graph graph_stub)
448target_compile_options(fwk_stub_graph PRIVATE449target_compile_options(fwk_stub_graph PRIVATE
449 -Wfloat-equal450 -Wfloat-equal
450 -fno-common451 -fno-common
452+ -Wno-unused-parameter
451)453)
452 454 
453target_include_directories(fwk_stub_graph PRIVATE455target_include_directories(fwk_stub_graph PRIVATE
@@ -5,7 +5,7 @@ add_library(aihac_ir SHARED
5 core/ascendc_ir.cc5 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 
10target_compile_options(aihac_ir PRIVATE10target_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.cc11 attr_group_symbolic_desc_attr.cc
12 guard_dfx_context.cc12 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 
16target_compile_options(aihac_symbolizer PRIVATE16target_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-equal172 -Wfloat-equal
173 -fno-common173 -fno-common
174 -Werror=return-type174 -Werror=return-type
175+ -Wno-unused-parameter
175)176)
176 177 
177target_link_libraries(stub_op_common178target_link_libraries(stub_op_common
@@ -346,6 +346,7 @@ target_compile_options(stub_register PRIVATE
346 -fno-common346 -fno-common
347 -Os347 -Os
348 -Werror=return-type348 -Werror=return-type
349+ -Wno-unused-parameter
349)350)
350 351 
351target_link_libraries(stub_register352target_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 PROPERTIES381 set_target_properties(stub_register_static PROPERTIES
381 OUTPUT_NAME register382 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- 
77message(STATUS "inc gaph_metadef")65message(STATUS "inc gaph_metadef")
78-#恢复原有metadef头文件,减少依赖组件的修改66+set(SRC_GRAPH_DIR ${ASCEND_INSTALL_PATH}/include/graph)
79 67 
80if (EXISTS "${ASCEND_INSTALL_PATH}/include/graph")68if (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 -Wextra127 -Wextra
128 -Wfloat-equal128 -Wfloat-equal
129 -Werror=return-type129 -Werror=return-type
130+ -Wno-unused-parameter
130)131)
131 132 
132target_compile_definitions(fmk_parser_stub PRIVATE133target_compile_definitions(fmk_parser_stub PRIVATE
@@ -92,6 +92,7 @@ add_library(fmk_onnx_parser_stub SHARED
92target_compile_options(fmk_onnx_parser_stub PRIVATE92target_compile_options(fmk_onnx_parser_stub PRIVATE
93 -O293 -O2
94 -fno-common94 -fno-common
95+ -Wno-unused-parameter
95)96)
96 97 
97target_compile_definitions(fmk_onnx_parser_stub PRIVATE98target_compile_definitions(fmk_onnx_parser_stub PRIVATE
@@ -91,6 +91,7 @@ target_link_libraries(gert_stub PRIVATE
91target_compile_options(gert_stub PRIVATE91target_compile_options(gert_stub PRIVATE
92 -fvisibility=hidden -Os -fno-common -Wfloat-equal92 -fvisibility=hidden -Os -fno-common -Wfloat-equal
93 -Werror=return-type93 -Werror=return-type
94+ -Wno-unused-parameter
94)95)
95 96 
96set_target_properties(gert_stub PROPERTIES97set_target_properties(gert_stub PROPERTIES
@@ -560,6 +560,7 @@ add_dependencies(hybrid_executor_stub
560target_compile_options(hybrid_executor_stub PRIVATE560target_compile_options(hybrid_executor_stub PRIVATE
561 -fno-common -Wfloat-equal -fvisibility=default -Os561 -fno-common -Wfloat-equal -fvisibility=default -Os
562 -Werror=return-type562 -Werror=return-type
563+ -Wno-unused-parameter
563)564)
564 565 
565target_compile_definitions(hybrid_executor_stub PRIVATE566target_compile_definitions(hybrid_executor_stub PRIVATE
@@ -12,6 +12,7 @@ set(METADEF_DIR ${AIR_CODE_DIR}/base/metadef)
12set(GE_METADEF_TEST_DIR ${AIR_CODE_DIR}/tests/graph_metadef)12set(GE_METADEF_TEST_DIR ${AIR_CODE_DIR}/tests/graph_metadef)
13set(AIR_COMMON_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION} -fno-access-control)13set(AIR_COMMON_COMPILE_OPTION ${AIR_COMMON_COMPILE_OPTION} -fno-access-control)
14 14 
15+include(cmake/intf_llt_pub.cmake)
15include(dflow/udf/cmake/third_party/boost.cmake)16include(dflow/udf/cmake/third_party/boost.cmake)
16include(dflow/udf/cmake/third_party/mockcpp.cmake)17include(dflow/udf/cmake/third_party/mockcpp.cmake)
17add_subdirectory(depends/slog)18add_subdirectory(depends/slog)
@@ -10,6 +10,7 @@
10 10 
11project(tests CXX C)11project(tests CXX C)
12 12 
13+include(../cmake/intf_llt_pub.cmake)
13add_subdirectory(depends)14add_subdirectory(depends)
14 15 
15if (ENABLE_ACL_COV OR ENABLE_ACL_UT)16if (ENABLE_ACL_COV OR ENABLE_ACL_UT)
@@ -39,7 +39,7 @@ target_include_directories(acl_stub PRIVATE
39)39)
40 40 
41target_link_libraries(acl_stub PRIVATE41target_link_libraries(acl_stub PRIVATE
42- $<BUILD_INTERFACE:intf_pub>42+ $<BUILD_INTERFACE:intf_llt_pub>
43 c_sec43 c_sec
44 GTest::gtest44 GTest::gtest
45 GTest::gtest_main45 GTest::gtest_main
@@ -41,7 +41,7 @@ target_include_directories(ge_stub PRIVATE
41)41)
42 42 
43target_link_libraries(ge_stub PRIVATE43target_link_libraries(ge_stub PRIVATE
44- $<BUILD_INTERFACE:intf_pub>44+ $<BUILD_INTERFACE:intf_llt_pub>
45 c_sec45 c_sec
46 json46 json
47 GTest::gtest47 GTest::gtest
@@ -38,7 +38,7 @@ target_include_directories(profiling_stub PRIVATE
38)38)
39 39 
40target_link_libraries(profiling_stub PRIVATE40target_link_libraries(profiling_stub PRIVATE
41- $<BUILD_INTERFACE:intf_pub>41+ $<BUILD_INTERFACE:intf_llt_pub>
42 c_sec42 c_sec
43 GTest::gtest43 GTest::gtest
44 GTest::gtest_main44 GTest::gtest_main
@@ -39,7 +39,7 @@ target_include_directories(runtime_stub PRIVATE
39)39)
40 40 
41target_link_libraries(runtime_stub PRIVATE41target_link_libraries(runtime_stub PRIVATE
42- $<BUILD_INTERFACE:intf_pub>42+ $<BUILD_INTERFACE:intf_llt_pub>
43 c_sec43 c_sec
44 GTest::gtest44 GTest::gtest
45 GTest::gtest_main45 GTest::gtest_main
@@ -40,7 +40,7 @@ target_include_directories(slog_stub PRIVATE
40)40)
41 41 
42target_link_libraries(slog_stub PRIVATE42target_link_libraries(slog_stub PRIVATE
43- $<BUILD_INTERFACE:intf_pub>43+ $<BUILD_INTERFACE:intf_llt_pub>
44 c_sec44 c_sec
45 GTest::gtest45 GTest::gtest
46 GTest::gtest_main46 GTest::gtest_main
@@ -40,7 +40,7 @@ target_include_directories(toolchain_stub PRIVATE
40)40)
41 41 
42target_link_libraries(toolchain_stub PRIVATE42target_link_libraries(toolchain_stub PRIVATE
43- $<BUILD_INTERFACE:intf_pub>43+ $<BUILD_INTERFACE:intf_llt_pub>
44 c_sec44 c_sec
45 json45 json
46 GTest::gtest46 GTest::gtest
@@ -141,7 +141,7 @@ target_compile_options(ut_acl_model_src PRIVATE
141)141)
142 142 
143target_link_libraries(ut_acl_model_src PRIVATE143target_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=address145 -fsanitize=address -fsanitize=leak -fsanitize-recover=address
146 c_sec146 c_sec
147 json147 json
@@ -188,7 +188,7 @@ target_compile_options(ut_acl_cblas_src PRIVATE
188)188)
189 189 
190target_link_libraries(ut_acl_cblas_src PRIVATE190target_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=address192 -fsanitize=address -fsanitize=leak -fsanitize-recover=address
193 ut_acl_model_src193 ut_acl_model_src
194 c_sec194 c_sec
@@ -239,7 +239,7 @@ target_compile_options(ut_acl_op_exec_src PRIVATE
239)239)
240 240 
241target_link_libraries(ut_acl_op_exec_src PRIVATE241target_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=address243 -fsanitize=address -fsanitize=leak -fsanitize-recover=address
244 ut_acl_model_src244 ut_acl_model_src
245 c_sec245 c_sec
@@ -291,7 +291,7 @@ target_compile_options(ut_acl_op_compiler_src PRIVATE
291)291)
292 292 
293target_link_libraries(ut_acl_op_compiler_src PRIVATE293target_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=address295 -fsanitize=address -fsanitize=leak -fsanitize-recover=address
296 ut_acl_op_exec_src296 ut_acl_op_exec_src
297 c_sec297 c_sec
@@ -346,7 +346,7 @@ target_compile_definitions(acl_utest PRIVATE
346)346)
347 347 
348target_link_libraries(acl_utest PRIVATE348target_link_libraries(acl_utest PRIVATE
349- $<BUILD_INTERFACE:intf_pub>349+ $<BUILD_INTERFACE:intf_llt_pub>
350 -fsanitize=address -fsanitize=leak -fsanitize-recover=address350 -fsanitize=address -fsanitize=leak -fsanitize-recover=address
351 -Wl,--whole-archive351 -Wl,--whole-archive
352 c_sec352 c_sec
@@ -181,7 +181,7 @@ if (ENABLE_OPEN_SRC)
181 )181 )
182else ()182else ()
183 target_link_libraries(ascgen_common PUBLIC183 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 
19target_link_libraries(common_stub19target_link_libraries(common_stub
20 PRIVATE20 PRIVATE
21- intf_pub21+ intf_llt_pub
22 metadef_headers22 metadef_headers
23 PUBLIC23 PUBLIC
24 ascend_protobuf24 ascend_protobuf
@@ -17,7 +17,7 @@ target_compile_definitions(autofuse_runtime_stub PRIVATE
17target_include_directories(autofuse_runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)17target_include_directories(autofuse_runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)
18target_link_libraries(autofuse_runtime_stub18target_link_libraries(autofuse_runtime_stub
19 PRIVATE19 PRIVATE
20- intf_pub20+ intf_llt_pub
21 c_sec21 c_sec
22 PUBLIC22 PUBLIC
23 runtime_headers23 runtime_headers
@@ -20,7 +20,7 @@ target_include_directories(asc_slog_stub PRIVATE
20 20 
21target_link_libraries(asc_slog_stub21target_link_libraries(asc_slog_stub
22 PRIVATE22 PRIVATE
23- intf_pub23+ intf_llt_pub
24 PUBLIC24 PUBLIC
25 unified_dlog_headers25 unified_dlog_headers
26)26)
@@ -21,7 +21,7 @@ target_compile_options(atrace_stub PRIVATE
21 21 
22target_link_libraries(atrace_stub22target_link_libraries(atrace_stub
23 PRIVATE23 PRIVATE
24- intf_pub24+ intf_llt_pub
25 c_sec25 c_sec
26 PUBLIC26 PUBLIC
27 atrace_headers27 atrace_headers
@@ -23,7 +23,7 @@ target_compile_options(autofuse_eager_graph_builder
23 )23 )
24 24 
25target_link_libraries(autofuse_eager_graph_builder PRIVATE25target_link_libraries(autofuse_eager_graph_builder PRIVATE
26- intf_pub26+ intf_llt_pub
27 slog_headers27 slog_headers
28 mmpa_headers28 mmpa_headers
29 metadef_headers29 metadef_headers
@@ -19,4 +19,4 @@ target_include_directories(easy_asc_graph
19 PUBLIC ${CMAKE_BINARY_DIR}/ascir_builtin_ops19 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 
19target_compile_options(ge_graph_dsl_b PRIVATE -g)19target_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 
23set_target_properties(ge_graph_dsl_b PROPERTIES CXX_STANDARD 17)23set_target_properties(ge_graph_dsl_b PROPERTIES CXX_STANDARD 17)
24target_link_libraries(ge_graph_dsl_b PUBLIC ge_graph_dsl_inc_b easy_graph_b graph graph_base)24target_link_libraries(ge_graph_dsl_b PUBLIC ge_graph_dsl_inc_b easy_graph_b graph graph_base)
@@ -16,7 +16,7 @@ target_include_directories(share_graph
16 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include ${AIR_CODE_DIR}/inc16 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include ${AIR_CODE_DIR}/inc
17)17)
18 18 
19-target_link_libraries(share_graph PUBLIC intf_pub)19+target_link_libraries(share_graph PUBLIC intf_llt_pub)
20 20 
21set_target_properties(share_graph PROPERTIES CXX_STANDARD 17)21set_target_properties(share_graph PROPERTIES CXX_STANDARD 17)
22target_link_libraries(share_graph PUBLIC 22target_link_libraries(share_graph PUBLIC
@@ -65,8 +65,6 @@ find_package(ascend_protobuf_static MODULE REQUIRED)
65find_package(unified_dlog MODULE REQUIRED)65find_package(unified_dlog MODULE REQUIRED)
66find_package(mmpa MODULE REQUIRED)66find_package(mmpa MODULE REQUIRED)
67find_package(atrace MODULE REQUIRED)67find_package(atrace MODULE REQUIRED)
68-include(${GE_METADEF_DIR}/cmake/intf_pub_linux.cmake)
69-include(${GE_METADEF_DIR}/cmake/test_funcs.cmake)
70add_subdirectory("${TOP_DIR}/tests/depends/slog" "slog_build")68add_subdirectory("${TOP_DIR}/tests/depends/slog" "slog_build")
71add_subdirectory("${TOP_DIR}/tests/depends/trace" "trace_build")69add_subdirectory("${TOP_DIR}/tests/depends/trace" "trace_build")
72 70 
@@ -14,7 +14,7 @@ file(GLOB_RECURSE BENCHMARK_SRCS CONFIGURE_DEPENDS "*.cc")
14 14 
15add_executable(ge_runtime_benchmark ${BENCHMARK_SRCS} ${FAKER_SRCS})15add_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 
19target_include_directories(ge_runtime_benchmark PRIVATE19target_include_directories(ge_runtime_benchmark PRIVATE
20 ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v220 ${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 
13add_executable(ge_runtime_bin ${BIN_SRCS} ${FAKER_SRCS})13add_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 
17target_link_libraries(ge_runtime_bin PUBLIC ge_runtime_v2 ge_graph_dsl ge_runtime_stub)17target_link_libraries(ge_runtime_bin PUBLIC ge_runtime_v2 ge_graph_dsl ge_runtime_stub)
18 18 
Rtests/dflow/udf/cmake/intf.cmaketests/cmake/intf_llt_pub.cmake+17-10
@@ -10,32 +10,39 @@
10add_library(intf_llt_pub INTERFACE)10add_library(intf_llt_pub INTERFACE)
11 11 
12target_include_directories(intf_llt_pub INTERFACE12target_include_directories(intf_llt_pub INTERFACE
13-)13+ )
14 14 
15target_compile_definitions(intf_llt_pub INTERFACE15target_compile_definitions(intf_llt_pub INTERFACE
16 CFG_BUILD_DEBUG16 CFG_BUILD_DEBUG
17 _GLIBCXX_USE_CXX11_ABI=017 _GLIBCXX_USE_CXX11_ABI=0
18-)18+ FUNC_VISIBILITY
19+ FMK_SUPPORT_DUMP
20+ FWK_SUPPORT_TRAINING_TRACE
21+ )
19 22 
20target_compile_options(intf_llt_pub INTERFACE23target_compile_options(intf_llt_pub INTERFACE
21 -g24 -g
25+ -O0
22 -w26 -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 -fPIC31 -fPIC
26 -pipe32 -pipe
27-)33+ -fno-access-control
34+ )
28 35 
29target_link_options(intf_llt_pub INTERFACE36target_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 
33target_link_directories(intf_llt_pub INTERFACE40target_link_directories(intf_llt_pub INTERFACE
34-)41+ )
35 42 
36target_link_libraries(intf_llt_pub INTERFACE43target_link_libraries(intf_llt_pub INTERFACE
37- GTest::gtest
38 -lpthread44 -lpthread
39- mockcpp_static45+ -ldl
40-)46+ -lrt
47+ )
41 48 
@@ -60,7 +60,7 @@ target_link_options(ascir_builtin_ops_stub PRIVATE
60 -Wl,--exclude-libs,All60 -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 
65set(ops_header_dir ${CMAKE_BINARY_DIR}/graph_metadef/graph/ascendc_ir/generator/)65set(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 
111target_link_libraries(aihacb_autofusion_stub PRIVATE111target_link_libraries(aihacb_autofusion_stub PRIVATE
112- intf_pub112+ intf_llt_pub
113 metadef_headers113 metadef_headers
114 slog_headers114 slog_headers
115 mmpa_headers115 mmpa_headers
@@ -19,6 +19,6 @@ add_library(mdat SHARED
19)19)
20 20 
21target_link_libraries(mdat PRIVATE21target_link_libraries(mdat PRIVATE
22- intf_pub22+ intf_llt_pub
23 metadef_headers23 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)
20target_link_libraries(ascendcl_stub20target_link_libraries(ascendcl_stub
21 PRIVATE21 PRIVATE
22- intf_pub22+ intf_llt_pub
23 c_sec23 c_sec
24 cce_headers24 cce_headers
25 msprof_headers25 msprof_headers
@@ -11,7 +11,7 @@
11add_library(error_manager_stub SHARED src/error_manager_stub.cc)11add_library(error_manager_stub SHARED src/error_manager_stub.cc)
12target_link_libraries(error_manager_stub12target_link_libraries(error_manager_stub
13 PRIVATE13 PRIVATE
14- intf_pub14+ intf_llt_pub
15 c_sec15 c_sec
16 PUBLIC16 PUBLIC
17 metadef_headers17 metadef_headers
@@ -23,7 +23,7 @@ target_include_directories(graphtuner_executor PRIVATE
23)23)
24target_link_libraries(graphtuner_executor24target_link_libraries(graphtuner_executor
25 PRIVATE25 PRIVATE
26- intf_pub26+ intf_llt_pub
27 metadef_headers27 metadef_headers
28 c_sec_headers28 c_sec_headers
29 slog_headers29 slog_headers
@@ -21,7 +21,7 @@ target_link_options(hccl_stub PRIVATE
21 21 
22target_link_libraries(hccl_stub22target_link_libraries(hccl_stub
23 PRIVATE23 PRIVATE
24- intf_pub24+ intf_llt_pub
25 slog_headers25 slog_headers
26 cce_headers26 cce_headers
27 runtime_headers27 runtime_headers
@@ -75,7 +75,7 @@ target_link_libraries(llm_engine_base PRIVATE
75 air_headers75 air_headers
76 slog_headers76 slog_headers
77 metadef_headers77 metadef_headers
78- intf_pub78+ intf_llt_pub
79 llm_mmpa_stub79 llm_mmpa_stub
80 mmpa80 mmpa
81 slog_stub81 slog_stub
@@ -21,7 +21,7 @@ target_include_directories(mmpa_stub PRIVATE
21)21)
22target_link_libraries(mmpa_stub22target_link_libraries(mmpa_stub
23 PRIVATE23 PRIVATE
24- intf_pub24+ intf_llt_pub
25 metadef_headers25 metadef_headers
26 runtime_headers26 runtime_headers
27 msprof_headers27 msprof_headers
@@ -28,7 +28,7 @@ target_compile_definitions(gert_op_impl PRIVATE
28 )28 )
29target_link_libraries(gert_op_impl29target_link_libraries(gert_op_impl
30 PRIVATE30 PRIVATE
31- intf_pub31+ intf_llt_pub
32 metadef_headers32 metadef_headers
33 slog_headers33 slog_headers
34 c_sec_headers34 c_sec_headers
@@ -65,7 +65,7 @@ target_compile_definitions(gert_op_impl2 PRIVATE
65 )65 )
66target_link_libraries(gert_op_impl266target_link_libraries(gert_op_impl2
67 PRIVATE67 PRIVATE
68- intf_pub68+ intf_llt_pub
69 metadef_headers69 metadef_headers
70 slog_headers70 slog_headers
71 c_sec_headers71 c_sec_headers
@@ -95,7 +95,7 @@ target_compile_definitions(autofuse_stub PRIVATE
95)95)
96target_link_libraries(autofuse_stub96target_link_libraries(autofuse_stub
97 PRIVATE97 PRIVATE
98- intf_pub98+ intf_llt_pub
99 metadef_headers99 metadef_headers
100 c_sec_headers100 c_sec_headers
101 c_sec101 c_sec
@@ -116,7 +116,7 @@ target_compile_definitions(slice_autofuse_stub PRIVATE
116)116)
117target_link_libraries(slice_autofuse_stub117target_link_libraries(slice_autofuse_stub
118 PRIVATE118 PRIVATE
119- intf_pub119+ intf_llt_pub
120 metadef_headers120 metadef_headers
121 c_sec_headers121 c_sec_headers
122 c_sec122 c_sec
@@ -144,7 +144,7 @@ target_compile_definitions(gert_op_impl_static PRIVATE
144 )144 )
145target_link_libraries(gert_op_impl_static145target_link_libraries(gert_op_impl_static
146 PRIVATE146 PRIVATE
147- intf_pub147+ intf_llt_pub
148 metadef_headers148 metadef_headers
149 slog_headers149 slog_headers
150 c_sec_headers150 c_sec_headers
@@ -19,7 +19,7 @@ if(NOT TARGET platform)
19add_library(platform SHARED ${SRC_FILES})19add_library(platform SHARED ${SRC_FILES})
20target_link_libraries(platform20target_link_libraries(platform
21 PRIVATE21 PRIVATE
22- intf_pub22+ intf_llt_pub
23)23)
24target_compile_options(platform PRIVATE -g)24target_compile_options(platform PRIVATE -g)
25endif()25endif()
@@ -27,7 +27,7 @@ target_compile_definitions(profiler_stub PRIVATE
27 27 
28target_link_libraries(profiler_stub28target_link_libraries(profiler_stub
29 PRIVATE29 PRIVATE
30- intf_pub30+ intf_llt_pub
31 runtime_headers31 runtime_headers
32 c_sec32 c_sec
33 ascend_protobuf33 ascend_protobuf
@@ -47,7 +47,7 @@ target_link_libraries(llm_wrapper PRIVATE
47 json47 json
48 runtime_stub48 runtime_stub
49 mmpa_stub249 mmpa_stub2
50- intf_pub50+ intf_llt_pub
51 ascendcl_stub51 ascendcl_stub
52 llm_engine_base52 llm_engine_base
53 -Wl,--no-as-needed53 -Wl,--no-as-needed
@@ -16,7 +16,7 @@ target_compile_definitions(runtime_stub PRIVATE
16target_include_directories(runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)16target_include_directories(runtime_stub PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)
17target_link_libraries(runtime_stub17target_link_libraries(runtime_stub
18 PRIVATE18 PRIVATE
19- intf_pub19+ intf_llt_pub
20 c_sec20 c_sec
21 cce_headers21 cce_headers
22 msprof_headers22 msprof_headers
@@ -15,6 +15,7 @@
15#include <vector>15#include <vector>
16#include <memory>16#include <memory>
17#include <mutex>17#include <mutex>
18+#include <string>
18#include "mmpa/mmpa_api.h"19#include "mmpa/mmpa_api.h"
19#include "runtime/rt.h"20#include "runtime/rt.h"
20#include "runtime/rts/rts_stream.h"21#include "runtime/rts/rts_stream.h"
@@ -14,14 +14,14 @@ file(GLOB_RECURSE ASCENDALOG_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src
14 14 
15add_library(slog_common SHARED ${SLOG_SRC_FILES})15add_library(slog_common SHARED ${SLOG_SRC_FILES})
16target_compile_options(slog_common PRIVATE -g -O0)16target_compile_options(slog_common PRIVATE -g -O0)
17-target_link_libraries(slog_common PRIVATE intf_pub17+target_link_libraries(slog_common PRIVATE intf_llt_pub
18 PUBLIC slog_headers18 PUBLIC slog_headers
19 )19 )
20 20 
21add_library(ascendalog SHARED ${ASCENDALOG_SRC_FILES})21add_library(ascendalog SHARED ${ASCENDALOG_SRC_FILES})
22target_compile_definitions(ascendalog PRIVATE LOG_CPP)22target_compile_definitions(ascendalog PRIVATE LOG_CPP)
23target_compile_options(ascendalog PRIVATE -g -O0)23target_compile_options(ascendalog PRIVATE -g -O0)
24-target_link_libraries(ascendalog PRIVATE intf_pub24+target_link_libraries(ascendalog PRIVATE intf_llt_pub
25 PUBLIC slog_headers25 PUBLIC slog_headers
26 slog_common26 slog_common
27 )27 )
@@ -48,7 +48,7 @@ target_link_options(ut_flow_graph PRIVATE
48)48)
49 49 
50target_link_libraries(ut_flow_graph PRIVATE50target_link_libraries(ut_flow_graph PRIVATE
51- intf_pub51+ intf_llt_pub
52 -lgcov52 -lgcov
53 metadef_headers53 metadef_headers
54 ascend_protobuf54 ascend_protobuf
@@ -59,7 +59,7 @@ target_link_libraries(llm_engine_test
59 runtime_stub59 runtime_stub
60 mmpa_stub260 mmpa_stub2
61 ascendcl_stub61 ascendcl_stub
62- intf_pub62+ intf_llt_pub
63 llm_engine_base63 llm_engine_base
64 llm_engine64 llm_engine
65 ascend_dump65 ascend_dump
@@ -107,7 +107,7 @@ target_link_libraries(ut_llm_engine_utest
107 json107 json
108 runtime_stub108 runtime_stub
109 mmpa_stub2109 mmpa_stub2
110- intf_pub110+ intf_llt_pub
111 ascendcl_stub111 ascendcl_stub
112 llm_engine_base112 llm_engine_base
113 llm_engine113 llm_engine
@@ -40,7 +40,7 @@ target_compile_options(df_st_stubs PRIVATE
40 -Wall -Wfloat-equal -Werror40 -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 
45add_library(df_memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c)45add_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 
175target_link_libraries(ut_libge_helper_utest175target_link_libraries(ut_libge_helper_utest
176- intf_pub176+ intf_llt_pub
177 metadef_headers177 metadef_headers
178 ascendcl_stub178 ascendcl_stub
179 datagw_headers179 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)
12add_subdirectory(ut)11add_subdirectory(ut)
13add_subdirectory(st)12add_subdirectory(st)
@@ -60,6 +60,7 @@ target_link_libraries(st_built_in_flow_func PRIVATE
60 -rdynamic60 -rdynamic
61 built_in_flowfunc61 built_in_flowfunc
62 intf_llt_pub62 intf_llt_pub
63+ mockcpp_static
63 -rdynamic64 -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_writer74 reader_writer
75 udf_profiling75 udf_profiling
76 -rdynamic76 -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_protobuf56 ascend_protobuf
57 udf_dump57 udf_dump
58 udf_static58 udf_static
59+ mockcpp_static
59 mmpa60 mmpa
60 -rdynamic61 -rdynamic
61 built_in_flowfunc62 built_in_flowfunc
@@ -77,6 +77,7 @@ target_link_libraries(ut_flow_func_executor PRIVATE
77 udf_dump77 udf_dump
78 udf_profiling78 udf_profiling
79 -rdynamic79 -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 
249target_link_libraries(tf_engine_stest PRIVATE249target_link_libraries(tf_engine_stest PRIVATE
250- intf_pub250+ intf_llt_pub
251 msprof_headers251 msprof_headers
252 air_headers252 air_headers
253 datagw_headers253 datagw_headers
@@ -290,7 +290,7 @@ target_compile_definitions(cpu_engine_stest PRIVATE
290 290 
291if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC)291if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC)
292 target_link_libraries(cpu_engine_stest PRIVATE292 target_link_libraries(cpu_engine_stest PRIVATE
293- intf_pub293+ intf_llt_pub
294 msprof_headers294 msprof_headers
295 air_headers295 air_headers
296 datagw_headers296 datagw_headers
@@ -322,7 +322,7 @@ if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC)
322 )322 )
323else ()323else ()
324 target_link_libraries(cpu_engine_stest PRIVATE324 target_link_libraries(cpu_engine_stest PRIVATE
325- intf_pub325+ intf_llt_pub
326 msprof_headers326 msprof_headers
327 air_headers327 air_headers
328 datagw_headers328 datagw_headers
@@ -365,7 +365,7 @@ target_compile_definitions(host_engine_stest PRIVATE
365)365)
366 366 
367target_link_libraries(host_engine_stest PRIVATE367target_link_libraries(host_engine_stest PRIVATE
368- intf_pub368+ intf_llt_pub
369 msprof_headers369 msprof_headers
370 air_headers370 air_headers
371 datagw_headers371 datagw_headers
@@ -50,7 +50,7 @@ target_compile_options(stub_for_aicpu PRIVATE
50)50)
51 51 
52target_link_libraries(stub_for_aicpu PRIVATE52target_link_libraries(stub_for_aicpu PRIVATE
53- intf_pub53+ intf_llt_pub
54 metadef_headers54 metadef_headers
55 air_headers55 air_headers
56 msprof_headers56 msprof_headers
@@ -21,7 +21,7 @@ target_link_libraries(runtime_aicpu_stub
21 c_sec21 c_sec
22 -ldl22 -ldl
23 -lrt23 -lrt
24- intf_pub24+ intf_llt_pub
25 cce_headers25 cce_headers
26 msprof_headers26 msprof_headers
27 PUBLIC27 PUBLIC
@@ -27,7 +27,7 @@ target_include_directories(slog_aicpu_stub PRIVATE
27 27 
28target_link_libraries(slog_aicpu_stub28target_link_libraries(slog_aicpu_stub
29 PRIVATE29 PRIVATE
30- intf_pub30+ intf_llt_pub
31 PUBLIC31 PUBLIC
32 unified_dlog_headers32 unified_dlog_headers
33)33)
@@ -268,7 +268,7 @@ target_link_directories(host_engine_utest PRIVATE
268)268)
269 269 
270target_link_libraries(tf_engine_utest PRIVATE270target_link_libraries(tf_engine_utest PRIVATE
271- intf_pub271+ intf_llt_pub
272 msprof_headers272 msprof_headers
273 air_headers273 air_headers
274 datagw_headers274 datagw_headers
@@ -301,7 +301,7 @@ target_link_libraries(tf_engine_utest PRIVATE
301 301 
302if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC)302if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC)
303 target_link_libraries(cpu_engine_utest PRIVATE303 target_link_libraries(cpu_engine_utest PRIVATE
304- intf_pub304+ intf_llt_pub
305 msprof_headers305 msprof_headers
306 air_headers306 air_headers
307 datagw_headers307 datagw_headers
@@ -333,7 +333,7 @@ if (BUILD_OPEN_PROJECT OR ENABLE_OPEN_SRC)
333 )333 )
334else ()334else ()
335 target_link_libraries(cpu_engine_utest PRIVATE335 target_link_libraries(cpu_engine_utest PRIVATE
336- intf_pub336+ intf_llt_pub
337 msprof_headers337 msprof_headers
338 air_headers338 air_headers
339 datagw_headers339 datagw_headers
@@ -365,7 +365,7 @@ else ()
365endif ()365endif ()
366 366 
367target_link_libraries(host_engine_utest PRIVATE367target_link_libraries(host_engine_utest PRIVATE
368- intf_pub368+ intf_llt_pub
369 msprof_headers369 msprof_headers
370 air_headers370 air_headers
371 datagw_headers371 datagw_headers
@@ -98,7 +98,7 @@ target_link_directories(dvpp_engine_utest PRIVATE
98)98)
99 99 
100target_link_libraries(dvpp_engine_utest PRIVATE100target_link_libraries(dvpp_engine_utest PRIVATE
101- intf_pub101+ intf_llt_pub
102 runtime_headers102 runtime_headers
103 msprof_headers103 msprof_headers
104 cce_headers104 cce_headers
@@ -123,7 +123,7 @@ target_link_directories(ffts_st PRIVATE
123)123)
124 124 
125target_link_libraries(ffts_st PRIVATE125target_link_libraries(ffts_st PRIVATE
126- intf_pub126+ intf_llt_pub
127 slog_headers127 slog_headers
128 msprof_headers128 msprof_headers
129 runtime_headers129 runtime_headers
@@ -137,7 +137,7 @@ target_link_directories(ffts_ut PRIVATE
137)137)
138 138 
139target_link_libraries(ffts_ut PRIVATE139target_link_libraries(ffts_ut PRIVATE
140- intf_pub140+ intf_llt_pub
141 slog_headers141 slog_headers
142 msprof_headers142 msprof_headers
143 runtime_headers143 runtime_headers
@@ -194,7 +194,7 @@ find_library(REGISTER_LIB NAMES libregister.so PATH_SUFFIXES lib64)
194find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build)194find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build)
195 195 
196target_link_libraries(hcce_st_llt PRIVATE196target_link_libraries(hcce_st_llt PRIVATE
197- intf_pub197+ intf_llt_pub
198 runtime198 runtime
199 msprof_headers199 msprof_headers
200 -Wl,--as-needed200 -Wl,--as-needed
@@ -219,7 +219,7 @@ target_link_libraries(hcce_st_llt PRIVATE
219)219)
220 220 
221target_link_libraries(hccl_engine_stest PRIVATE221target_link_libraries(hccl_engine_stest PRIVATE
222- intf_pub222+ intf_llt_pub
223 runtime223 runtime
224 msprof_headers224 msprof_headers
225 -Wl,--as-needed225 -Wl,--as-needed
@@ -195,7 +195,7 @@ find_library(REGISTER_LIB NAMES libregister.so PATH_SUFFIXES lib64)
195find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build)195find_library(LIBRARY_MOCKCPP libmockcpp.a ${AIR_CODE_DIR}/tests/engines/hccl_engine/third_party/mockcpp/mockcpp-2.7/build)
196 196 
197target_link_libraries(hcce_ut_llt PRIVATE197target_link_libraries(hcce_ut_llt PRIVATE
198- intf_pub198+ intf_llt_pub
199 runtime199 runtime
200 msprof_headers200 msprof_headers
201 -Wl,--as-needed201 -Wl,--as-needed
@@ -220,7 +220,7 @@ target_link_libraries(hcce_ut_llt PRIVATE
220)220)
221 221 
222target_link_libraries(hccl_engine_utest PRIVATE222target_link_libraries(hccl_engine_utest PRIVATE
223- intf_pub223+ intf_llt_pub
224 runtime224 runtime
225 msprof_headers225 msprof_headers
226 -Wl,--as-needed226 -Wl,--as-needed
@@ -64,7 +64,7 @@ target_link_directories(fe_benchmark PRIVATE
64)64)
65 65 
66target_link_libraries(fe_benchmark PRIVATE66target_link_libraries(fe_benchmark PRIVATE
67- intf_pub67+ intf_llt_pub
68 benchmark::benchmark68 benchmark::benchmark
69 msprof_headers69 msprof_headers
70 runtime_headers70 runtime_headers
@@ -35,7 +35,7 @@ target_compile_options(cann_kb_stub PRIVATE
35 35 
36target_link_libraries(cann_kb_stub36target_link_libraries(cann_kb_stub
37 PRIVATE37 PRIVATE
38- intf_pub38+ intf_llt_pub
39 c_sec39 c_sec
40 air_headers40 air_headers
41 metadef_headers)41 metadef_headers)
@@ -25,7 +25,7 @@ target_compile_options(graph_tuner_stub PRIVATE
25 25 
26target_link_libraries(graph_tuner_stub26target_link_libraries(graph_tuner_stub
27 PRIVATE27 PRIVATE
28- intf_pub28+ intf_llt_pub
29 msprof_headers29 msprof_headers
30 metadef_headers30 metadef_headers
31 air_headers31 air_headers
@@ -20,7 +20,7 @@ add_library(mmpa_stub SHARED ${SRCS})
20 20 
21target_link_libraries(mmpa_stub21target_link_libraries(mmpa_stub
22 PRIVATE22 PRIVATE
23- intf_pub23+ intf_llt_pub
24 msprof_headers24 msprof_headers
25 runtime_headers25 runtime_headers
26 metadef_headers26 metadef_headers
@@ -56,7 +56,7 @@ target_compile_options(op_tiling_rt2_stub PRIVATE
56 -Dgoogle=ascend_private)56 -Dgoogle=ascend_private)
57 57 
58target_link_libraries(op_tiling_rt2_stub PRIVATE 58target_link_libraries(op_tiling_rt2_stub PRIVATE
59- intf_pub59+ intf_llt_pub
60 slog_headers60 slog_headers
61 msprof_headers61 msprof_headers
62 mmpa_headers62 mmpa_headers
@@ -28,7 +28,7 @@ target_compile_options(runtime_stub_fe PRIVATE
28 28 
29target_link_libraries(runtime_stub_fe 29target_link_libraries(runtime_stub_fe
30 PRIVATE30 PRIVATE
31- intf_pub31+ intf_llt_pub
32 msprof_headers32 msprof_headers
33 c_sec33 c_sec
34 PUBLIC34 PUBLIC
@@ -23,7 +23,7 @@ file(GLOB_RECURSE SOURCES
23 23 
24add_library(ge_graph_dsl STATIC ${SOURCES})24add_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 
28target_include_directories(ge_graph_dsl PRIVATE28target_include_directories(ge_graph_dsl PRIVATE
29 ${ASCEND_INSTALL_PATH}/include29 ${ASCEND_INSTALL_PATH}/include
@@ -46,7 +46,7 @@ add_library(slog_stub SHARED
46 46 
47target_link_libraries(slog_stub47target_link_libraries(slog_stub
48 PRIVATE48 PRIVATE
49- intf_pub49+ intf_llt_pub
50 PUBLIC50 PUBLIC
51 unified_dlog_headers51 unified_dlog_headers
52 )52 )
@@ -79,7 +79,7 @@ target_compile_options(te_fusion_stub PRIVATE
79 79 
80target_link_libraries(te_fusion_stub80target_link_libraries(te_fusion_stub
81 PRIVATE81 PRIVATE
82- intf_pub82+ intf_llt_pub
83 msprof_headers83 msprof_headers
84 runtime_headers84 runtime_headers
85 metadef_headers85 metadef_headers
@@ -9,7 +9,7 @@ target_compile_options(atrace_stub PRIVATE
9 9 
10target_link_libraries(atrace_stub10target_link_libraries(atrace_stub
11 PRIVATE11 PRIVATE
12- intf_pub12+ intf_llt_pub
13 c_sec13 c_sec
14 PUBLIC14 PUBLIC
15 atrace_headers15 atrace_headers
@@ -41,7 +41,7 @@ target_link_directories(fe_env_mocker PRIVATE
41)41)
42 42 
43target_link_libraries(fe_env_mocker PUBLIC43target_link_libraries(fe_env_mocker PUBLIC
44- intf_pub44+ intf_llt_pub
45 msprof_headers45 msprof_headers
46 runtime_headers46 runtime_headers
47 c_sec47 c_sec
@@ -264,5 +264,5 @@ target_link_libraries(fe_st PRIVATE
264 slog_stub264 slog_stub
265 unified_dlog265 unified_dlog
266 cann_kb_stub266 cann_kb_stub
267- intf_pub267+ intf_llt_pub
268 )268 )
@@ -126,4 +126,4 @@ target_link_libraries(fe_st_whole_process PRIVATE
126 mmpa_stub126 mmpa_stub
127 slog_stub127 slog_stub
128 fe_env_mocker128 fe_env_mocker
129- intf_pub)129+ intf_llt_pub)
@@ -268,6 +268,6 @@ target_link_libraries(fe_ut PRIVATE
268 cann_kb_stub268 cann_kb_stub
269 easy_graph269 easy_graph
270 ge_graph_dsl270 ge_graph_dsl
271- intf_pub271+ intf_llt_pub
272 GTest::gmock272 GTest::gmock
273 mockcpp_static)273 mockcpp_static)
@@ -162,7 +162,7 @@ target_link_options(rts_engine_utest PRIVATE
162)162)
163 163 
164target_link_libraries(rts_engine_utest PRIVATE164target_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 runtime176 runtime
177 -Wl,--as-needed177 -Wl,--as-needed
178 cce_headers178 cce_headers
179- intf_pub179+ intf_llt_pub
180 runtime_headers180 runtime_headers
181 msprof_headers181 msprof_headers
182 GTest::gtest182 GTest::gtest
@@ -81,7 +81,7 @@ target_compile_options(helper_runtime PRIVATE
81)81)
82 82 
83target_link_libraries(helper_runtime PUBLIC83target_link_libraries(helper_runtime PUBLIC
84- intf_pub84+ intf_llt_pub
85 mmpa_headers85 mmpa_headers
86 slog_headers86 slog_headers
87 metadef_headers87 metadef_headers
@@ -152,7 +152,7 @@ target_compile_options(helper_runtime_no_grpc PRIVATE
152 )152 )
153 153 
154target_link_libraries(helper_runtime_no_grpc PUBLIC154target_link_libraries(helper_runtime_no_grpc PUBLIC
155- intf_pub155+ intf_llt_pub
156 mmpa_headers156 mmpa_headers
157 slog_headers157 slog_headers
158 metadef_headers158 metadef_headers
@@ -12,7 +12,7 @@ file(GLOB_RECURSE EASY_GRAPH_SRCS src/*.cc)
12 12 
13add_library(easy_graph STATIC ${EASY_GRAPH_SRCS})13add_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 
17target_include_directories(easy_graph PUBLIC include17target_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}/inc16 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_inc19+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 
30add_test(NAME ge_graph_dsl_test COMMAND ge_graph_dsl_test --gtest_output=xml:${CMAKE_INSTALL_PREFIX}/report/st/ge_graph_dsl_test.xml)30add_test(NAME ge_graph_dsl_test COMMAND ge_graph_dsl_test --gtest_output=xml:${CMAKE_INSTALL_PREFIX}/report/st/ge_graph_dsl_test.xml)
31set_tests_properties(ge_graph_dsl_test PROPERTIES LABELS "st;st_hetero;ge_graph_dsl_test")31set_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 
38target_link_libraries(ge_running_env PUBLIC38target_link_libraries(ge_running_env PUBLIC
39- intf_pub39+ intf_llt_pub
40 metadef_headers40 metadef_headers
41 runtime_headers41 runtime_headers
42 cce_headers42 cce_headers
@@ -25,7 +25,7 @@ target_compile_options(ge_running_env_test PRIVATE
25 -DFUNC_VISIBILITY25 -DFUNC_VISIBILITY
26)26)
27 27 
28-target_link_libraries(ge_running_env_test PUBLIC intf_pub GTest::gtest ge_running_env ge_common_base28+target_link_libraries(ge_running_env_test PUBLIC intf_llt_pub GTest::gtest ge_running_env ge_common_base
29 ge_compiler29 ge_compiler
30 ge_runner30 ge_runner
31 flow_graph ascendcl_stub31 flow_graph ascendcl_stub
@@ -37,7 +37,7 @@ target_include_directories(ge_runtime_stub PUBLIC
37)37)
38 38 
39target_link_libraries(ge_runtime_stub PRIVATE39target_link_libraries(ge_runtime_stub PRIVATE
40- intf_pub40+ intf_llt_pub
41 msprof_headers41 msprof_headers
42 runtime_headers42 runtime_headers
43 opp_registry43 opp_registry
@@ -24,7 +24,7 @@ target_compile_options(ge_runtime_stub_test PRIVATE
24 -g24 -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 
29include(CTest)29include(CTest)
30enable_testing()30enable_testing()
@@ -27,7 +27,7 @@ target_compile_options(hybrid_model_async_exec_test PUBLIC -g
27 -fno-access-control27 -fno-access-control
28 )28 )
29target_link_libraries(hybrid_model_async_exec_test PUBLIC 29target_link_libraries(hybrid_model_async_exec_test PUBLIC
30- intf_pub30+ intf_llt_pub
31 flow_graph31 flow_graph
32 -Wl,-z,muldefs32 -Wl,-z,muldefs
33 -Wl,--whole-archive33 -Wl,--whole-archive
@@ -35,7 +35,7 @@ target_compile_options(st_stubs PRIVATE
35 -fno-access-control35 -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 
40add_library(memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c)40add_library(memset_stubs STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/memset.c)
41target_link_libraries(memset_stubs PRIVATE intf_pub)41target_link_libraries(memset_stubs PRIVATE intf_pub)
@@ -116,8 +116,6 @@ target_compile_definitions(graph_engine_test PRIVATE
116)116)
117 117 
118target_compile_options(graph_engine_test PRIVATE118target_compile_options(graph_engine_test PRIVATE
119- -g -O0
120- -fno-access-control
121 -Wno-write-strings119 -Wno-write-strings
122 -Wno-deprecated-declarations120 -Wno-deprecated-declarations
123 -Wall -Wfloat-equal -Werror121 -Wall -Wfloat-equal -Werror
@@ -226,7 +224,7 @@ target_include_directories(graph_engine_compile_test PRIVATE
226 )224 )
227 225 
228target_link_libraries(graph_engine_compile_test226target_link_libraries(graph_engine_compile_test
229- intf_pub227+ intf_llt_pub
230 -Wl,-z,muldefs228 -Wl,-z,muldefs
231 ge_compiler229 ge_compiler
232 ge_runner230 ge_runner
@@ -64,7 +64,7 @@ target_link_libraries(autofuse_test PRIVATE
64 GTest::gmock64 GTest::gmock
65 GTest::gmock_main65 GTest::gmock_main
66 es_ge_test66 es_ge_test
67- intf_pub67+ intf_llt_pub
68 -Wl,--whole-archive68 -Wl,--whole-archive
69 rt2_registry_static69 rt2_registry_static
70 -Wl,--no-whole-archive70 -Wl,--no-whole-archive
@@ -36,7 +36,7 @@ target_include_directories(st_dvpp_runtime2_test PRIVATE
36 )36 )
37 37 
38target_link_libraries(st_dvpp_runtime2_test PRIVATE38target_link_libraries(st_dvpp_runtime2_test PRIVATE
39- intf_pub39+ intf_llt_pub
40 ascend_dump40 ascend_dump
41 gert41 gert
42 -Wl,--whole-archive42 -Wl,--whole-archive
@@ -52,7 +52,7 @@ target_link_options(ut_libgraph PRIVATE
52 52 
53target_link_libraries(ut_libgraph53target_link_libraries(ut_libgraph
54 -Wl,-z,muldefs54 -Wl,-z,muldefs
55- intf_pub55+ intf_llt_pub
56 metadef_headers56 metadef_headers
57 GTest::gtest57 GTest::gtest
58 GTest::gtest_main58 GTest::gtest_main
@@ -632,7 +632,7 @@ target_link_options(ge_ut_common PRIVATE
632)632)
633 633 
634target_link_libraries(ge_ut_common PRIVATE634target_link_libraries(ge_ut_common PRIVATE
635- intf_pub635+ intf_llt_pub
636 metadef_headers636 metadef_headers
637 datagw_headers637 datagw_headers
638 adump_headers638 adump_headers
@@ -691,7 +691,7 @@ target_link_options(ut_libge_multiparts_utest PRIVATE
691)691)
692 692 
693target_link_libraries(ut_libge_multiparts_utest693target_link_libraries(ut_libge_multiparts_utest
694- intf_pub694+ intf_llt_pub
695 metadef_headers695 metadef_headers
696 ascendcl_stub696 ascendcl_stub
697 -Wl,-z,muldefs697 -Wl,-z,muldefs
@@ -765,7 +765,7 @@ target_link_options(ut_libge_symbol_infer_utest PRIVATE
765 )765 )
766 766 
767target_link_libraries(ut_libge_symbol_infer_utest767target_link_libraries(ut_libge_symbol_infer_utest
768- intf_pub768+ intf_llt_pub
769 -Wl,-z,muldefs769 -Wl,-z,muldefs
770 symengine770 symengine
771 lowering771 lowering
@@ -819,7 +819,7 @@ target_link_options(ut_libge_common_utest PRIVATE
819)819)
820 820 
821target_link_libraries(ut_libge_common_utest821target_link_libraries(ut_libge_common_utest
822- intf_pub822+ intf_llt_pub
823 metadef_headers823 metadef_headers
824 ascendcl_stub824 ascendcl_stub
825 symengine825 symengine
@@ -894,7 +894,7 @@ target_link_options(ut_libge_others_utest PRIVATE
894)894)
895 895 
896target_link_libraries(ut_libge_others_utest896target_link_libraries(ut_libge_others_utest
897- intf_pub897+ intf_llt_pub
898 metadef_headers898 metadef_headers
899 ascendcl_stub899 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 so948# TODO:ge_ut_common need shrink; it has too many depends so
949target_link_libraries(ut_libge_label_maker_utest949target_link_libraries(ut_libge_label_maker_utest
950- intf_pub950+ intf_llt_pub
951 metadef_headers951 metadef_headers
952 ascendcl_stub952 ascendcl_stub
953 ge_common953 ge_common
@@ -998,7 +998,7 @@ target_include_directories(ut_libge_kernel_utest PRIVATE
998)998)
999 999 
1000target_link_libraries(ut_libge_kernel_utest1000target_link_libraries(ut_libge_kernel_utest
1001- intf_pub1001+ intf_llt_pub
1002 metadef_headers1002 metadef_headers
1003 -Wl,--whole-archive1003 -Wl,--whole-archive
1004 ascendcl_stub1004 ascendcl_stub
@@ -1059,7 +1059,7 @@ target_link_options(ut_libge_distinct_load_utest PRIVATE
1059)1059)
1060 1060 
1061target_link_libraries(ut_libge_distinct_load_utest1061target_link_libraries(ut_libge_distinct_load_utest
1062- intf_pub1062+ intf_llt_pub
1063 metadef_headers1063 metadef_headers
1064 ascendcl_stub1064 ascendcl_stub
1065 datagw_headers1065 datagw_headers
@@ -1112,7 +1112,7 @@ target_link_options(ge_manual_test PRIVATE
1112)1112)
1113 1113 
1114target_link_libraries(ge_manual_test1114target_link_libraries(ge_manual_test
1115- intf_pub1115+ intf_llt_pub
1116 metadef_headers1116 metadef_headers
1117 ascendcl_stub1117 ascendcl_stub
1118 ge_compiler1118 ge_compiler
@@ -1164,7 +1164,7 @@ target_link_options(ut_jit_execution PRIVATE
1164)1164)
1165 1165 
1166target_link_libraries(ut_jit_execution1166target_link_libraries(ut_jit_execution
1167- intf_pub1167+ intf_llt_pub
1168 metadef_headers1168 metadef_headers
1169 ascendcl_stub1169 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 
1222target_link_libraries(ut_eager_style_builder1222target_link_libraries(ut_eager_style_builder
1223- intf_pub1223+ intf_llt_pub
1224 -Wl,-z,muldefs1224 -Wl,-z,muldefs
1225 metadef_headers1225 metadef_headers
1226 es_generator_inner_headers1226 es_generator_inner_headers
@@ -22,7 +22,7 @@ add_library(stub_geir_ops SHARED
22target_compile_options(stub_geir_ops PRIVATE)22target_compile_options(stub_geir_ops PRIVATE)
23target_link_libraries(stub_geir_ops23target_link_libraries(stub_geir_ops
24 PRIVATE24 PRIVATE
25- intf_pub25+ intf_llt_pub
26 graph26 graph
27 graph_base27 graph_base
28 error_manager28 error_manager
@@ -58,7 +58,7 @@ target_link_libraries(ut_graph_construction
58 es_ut_test58 es_ut_test
59 graph_base59 graph_base
60 graph60 graph
61- intf_pub61+ intf_llt_pub
62 ascend_protobuf62 ascend_protobuf
63 c_sec63 c_sec
64 aihac_symbolizer64 aihac_symbolizer
@@ -69,7 +69,7 @@ target_link_options(ut_fast_runtime2_test PRIVATE
69 )69 )
70 70 
71target_link_libraries(ut_fast_runtime2_test PRIVATE71target_link_libraries(ut_fast_runtime2_test PRIVATE
72- intf_pub72+ intf_llt_pub
73 ${AIR_COMMON_LINK_OPTION}73 ${AIR_COMMON_LINK_OPTION}
74 -Wl,--whole-archive74 -Wl,--whole-archive
75 rt2_registry_static75 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-declarations22 -Wno-deprecated-declarations
23 -Wall -Wfloat-equal -Werror23 -Wall -Wfloat-equal -Werror
24- --coverage -fprofile-arcs -ftest-coverage
25 )24 )
26 25 
27target_compile_definitions(ut_dvpp_runtime2_test PRIVATE26target_compile_definitions(ut_dvpp_runtime2_test PRIVATE
@@ -36,8 +35,7 @@ target_include_directories(ut_dvpp_runtime2_test PRIVATE
36 )35 )
37 36 
38target_link_libraries(ut_dvpp_runtime2_test PRIVATE37target_link_libraries(ut_dvpp_runtime2_test PRIVATE
39- intf_pub38+ intf_llt_pub
40- ${AIR_COMMON_LINK_OPTION}
41 -Wl,--whole-archive39 -Wl,--whole-archive
42 -Wl,--no-whole-archive40 -Wl,--no-whole-archive
43 GTest::gtest41 GTest::gtest
@@ -12,7 +12,7 @@ file(GLOB_RECURSE EXE_GRAPH_SRCS CONFIGURE_DEPENDS "*.cc")
12 12 
13add_executable(exec_graph_benchmark ${EXE_GRAPH_SRCS})13add_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 
17target_include_directories(exec_graph_benchmark PRIVATE17target_include_directories(exec_graph_benchmark PRIVATE
18 ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v218 ${AIR_CODE_DIR}/tests/ge/ut/ge/runtime/fast_v2
@@ -36,7 +36,7 @@ set_target_properties(fast_graph_benchmark PROPERTIES CXX_STANDARD 17)
36target_compile_options(fast_graph_benchmark PRIVATE -O2 -std=c++17)36target_compile_options(fast_graph_benchmark PRIVATE -O2 -std=c++17)
37 37 
38target_link_libraries(fast_graph_benchmark PRIVATE benchmark::benchmark38target_link_libraries(fast_graph_benchmark PRIVATE benchmark::benchmark
39- intf_pub39+ intf_llt_pub
40 metadef_headers40 metadef_headers
41 -Wl,--no-as-needed41 -Wl,--no-as-needed
42 graph42 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 当前需要按照更高版本来编译ut53# intf_pub包含stdc++11 当前需要按照更高版本来编译ut
54target_link_libraries(ut_ascendc_ir PRIVATE54target_link_libraries(ut_ascendc_ir PRIVATE
55- intf_pub metadef_headers55+ intf_llt_pub metadef_headers
56 -Wl,--no-as-needed56 -Wl,--no-as-needed
57 platform57 platform
58 metadef58 metadef
@@ -42,7 +42,7 @@ target_link_options(ut_exe_graph PRIVATE
42 )42 )
43 43 
44target_link_libraries(ut_exe_graph PRIVATE44target_link_libraries(ut_exe_graph PRIVATE
45- intf_pub45+ intf_llt_pub
46 -Wl,--no-as-needed46 -Wl,--no-as-needed
47 slog_headers47 slog_headers
48 platform48 platform
@@ -42,7 +42,7 @@ target_compile_definitions(ut_graph PRIVATE
42)42)
43 43 
44target_link_libraries(ut_graph PRIVATE44target_link_libraries(ut_graph PRIVATE
45- intf_pub45+ intf_llt_pub
46 -Wl,-z,muldefs46 -Wl,-z,muldefs
47 -Wl,--no-as-needed47 -Wl,--no-as-needed
48 platform48 platform
@@ -46,7 +46,7 @@ target_link_options(ut_register PRIVATE
46)46)
47 47 
48target_link_libraries(ut_register48target_link_libraries(ut_register
49- intf_pub49+ intf_llt_pub
50 metadef_headers50 metadef_headers
51 runtime_headers51 runtime_headers
52 slog_headers52 slog_headers
@@ -56,7 +56,7 @@ target_compile_options(attr_util_stub PRIVATE
56)56)
57 57 
58target_link_libraries(attr_util_stub PRIVATE58target_link_libraries(attr_util_stub PRIVATE
59- intf_pub59+ intf_llt_pub
60 metadef_headers60 metadef_headers
61 air_headers61 air_headers
62 slog_headers62 slog_headers
@@ -15,7 +15,7 @@ file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
15add_library(parser_mmpa_stub SHARED ${SRCS})15add_library(parser_mmpa_stub SHARED ${SRCS})
16target_link_libraries(parser_mmpa_stub16target_link_libraries(parser_mmpa_stub
17 PRIVATE17 PRIVATE
18- intf_pub18+ intf_llt_pub
19 metadef_headers 19 metadef_headers
20 -Wl,--no-as-needed20 -Wl,--no-as-needed
21 ascend_protobuf21 ascend_protobuf
@@ -49,7 +49,7 @@ target_compile_definitions(st_parser PRIVATE
49)49)
50 50 
51target_link_libraries(st_parser PRIVATE51target_link_libraries(st_parser PRIVATE
52- intf_pub52+ intf_llt_pub
53 metadef_headers53 metadef_headers
54 air_headers54 air_headers
55 slog_headers55 slog_headers
@@ -56,7 +56,7 @@ target_compile_definitions(ut_parser PRIVATE
56)56)
57 57 
58target_link_libraries(ut_parser58target_link_libraries(ut_parser
59- intf_pub59+ intf_llt_pub
60 metadef_headers60 metadef_headers
61 air_headers61 air_headers
62 slog_headers62 slog_headers
@@ -29,7 +29,7 @@ target_compile_definitions(c_base_static PRIVATE
29 29 
30target_link_libraries(c_base_static30target_link_libraries(c_base_static
31 PRIVATE31 PRIVATE
32- $<BUILD_INTERFACE:intf_pub>32+ $<BUILD_INTERFACE:intf_llt_pub>
33 c_sec_headers33 c_sec_headers
34)34)
35 35 
@@ -67,7 +67,7 @@ add_library(c_json_static STATIC
67 67 
68target_link_libraries(c_json_static68target_link_libraries(c_json_static
69 PRIVATE69 PRIVATE
70- $<BUILD_INTERFACE:intf_pub>70+ $<BUILD_INTERFACE:intf_llt_pub>
71 c_sec_headers71 c_sec_headers
72)72)
73 73 
@@ -10,6 +10,7 @@
10 10 
11project(ut_ascendcl_c_utest)11project(ut_ascendcl_c_utest)
12set(CMAKE_CXX_STANDARD 11)12set(CMAKE_CXX_STANDARD 11)
13+include(${AIR_CODE_DIR}/tests/cmake/intf_llt_pub.cmake)
13 14 
14set(UT_FILES15set(UT_FILES
15 "main.cc"16 "main.cc"
@@ -60,8 +61,6 @@ target_include_directories(ut_ascendcl_c_utest PRIVATE
60)61)
61 62 
62target_compile_options(ut_ascendcl_c_utest PRIVATE63target_compile_options(ut_ascendcl_c_utest PRIVATE
63- -fsanitize=address -fsanitize=leak
64- -g --coverage -fprofile-arcs -ftest-coverage
65 -Wall -Wextra -Wfloat-equal64 -Wall -Wextra -Wfloat-equal
66 # -Werror65 # -Werror
67)66)
@@ -75,8 +74,7 @@ target_compile_definitions(ut_ascendcl_c_utest PRIVATE
75)74)
76 75 
77target_link_libraries(ut_ascendcl_c_utest PRIVATE76target_link_libraries(ut_ascendcl_c_utest PRIVATE
78- -fsanitize=address -fsanitize=leak77+ $<BUILD_INTERFACE:intf_llt_pub>
79- $<BUILD_INTERFACE:intf_pub>
80 msprof_headers78 msprof_headers
81 runtime_headers79 runtime_headers
82 c_sec80 c_sec
@@ -84,8 +82,4 @@ target_link_libraries(ut_ascendcl_c_utest PRIVATE
84 GTest::gtest_main82 GTest::gtest_main
85 GTest::gmock83 GTest::gmock
86 GTest::gmock_main84 GTest::gmock_main
87- -lrt
88- -ldl
89- -lpthread
90- -lgcov
91)85)