|
@@ -65,25 +65,9 @@ include_directories(${CMAKE_BINARY_DIR}) |
|
|
include_directories(${CMAKE_BINARY_DIR}/proto/ge) |
|
|
include_directories(${CMAKE_BINARY_DIR}/proto/ge) |
|
|
include_directories(${CMAKE_BINARY_DIR}/proto/ge/proto) |
|
|
include_directories(${CMAKE_BINARY_DIR}/proto/ge/proto) |
|
|
|
|
|
|
|
|
set(COMMON_SRC_FILES |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/properties_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/ge/plugin_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/ge/tbe_plugin_manager.cc" |
|
|
|
|
|
|
|
|
set(GRAPH_SRC_FILES |
|
|
"${GE_CODE_DIR}/metadef/graph/option/ge_local_context.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/option/ge_local_context.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/option/ge_context.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/option/ge_context.cc" |
|
|
"${GE_CODE_DIR}/ge/common/types.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/op_map.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/fmk_error_codes.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/op/ge_op_utils.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/graph/manager/util/variable_accelerate_ctrl.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/opskernel_manager/ops_kernel_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/generator/ge_generator.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/generator/generator_api.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/graph/common/omg_util.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/graph/common/bcast.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/util.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/ge/op_tiling_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/init/gelib.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/graph/ge_attr_define.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/ge_attr_define.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/anchor.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/anchor.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/ge_attr_value.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/ge_attr_value.cc" |
|
@@ -128,6 +112,38 @@ set(COMMON_SRC_FILES |
|
|
"${GE_CODE_DIR}/metadef/register/tensor_assign.cpp" |
|
|
"${GE_CODE_DIR}/metadef/register/tensor_assign.cpp" |
|
|
"${GE_CODE_DIR}/metadef/register/register_format_transfer.cc" |
|
|
"${GE_CODE_DIR}/metadef/register/register_format_transfer.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/format_refiner.cc" |
|
|
"${GE_CODE_DIR}/metadef/graph/format_refiner.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/register/ops_kernel_builder_registry.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/register/op_tiling.cpp" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/graph/utils/tuning_utils.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/register/op_tiling_registry.cpp" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
set(PARSER_SRC_FILES |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/op_map.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/pre_checker.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/convert/pb2json.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/parser_factory.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/model_saver.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/parser_types.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/parser_inner_ctx.cc" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
set(COMMON_SRC_FILES |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/properties_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/ge/plugin_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/ge/tbe_plugin_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/types.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/fmk_error_codes.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/op/ge_op_utils.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/graph/manager/util/variable_accelerate_ctrl.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/opskernel_manager/ops_kernel_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/generator/ge_generator.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/generator/generator_api.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/graph/common/omg_util.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/graph/common/bcast.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/util.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/common/ge/op_tiling_manager.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/init/gelib.cc" |
|
|
"${GE_CODE_DIR}/ge/engine_manager/dnnengine_manager.cc" |
|
|
"${GE_CODE_DIR}/ge/engine_manager/dnnengine_manager.cc" |
|
|
"${GE_CODE_DIR}/ge/opskernel_manager/ops_kernel_manager.cc" |
|
|
"${GE_CODE_DIR}/ge/opskernel_manager/ops_kernel_manager.cc" |
|
|
"${GE_CODE_DIR}/ge/session/session_manager.cc" |
|
|
"${GE_CODE_DIR}/ge/session/session_manager.cc" |
|
@@ -311,17 +327,7 @@ set(COMMON_SRC_FILES |
|
|
"${GE_CODE_DIR}/ge/common/model_saver.cc" |
|
|
"${GE_CODE_DIR}/ge/common/model_saver.cc" |
|
|
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicpu/aicpu_ext_info.cc" |
|
|
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicpu/aicpu_ext_info.cc" |
|
|
"${GE_CODE_DIR}/ge/common/ge/datatype_util.cc" |
|
|
"${GE_CODE_DIR}/ge/common/ge/datatype_util.cc" |
|
|
"${GE_CODE_DIR}/metadef/register/ops_kernel_builder_registry.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/register/op_tiling.cpp" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/graph/utils/tuning_utils.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/metadef/register/op_tiling_registry.cpp" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/ge_local_engine/engine/host_cpu_engine.cc" |
|
|
"${GE_CODE_DIR}/ge/ge_local_engine/engine/host_cpu_engine.cc" |
|
|
"${GE_CODE_DIR}/parser/parser/common/pre_checker.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/convert/pb2json.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/parser_factory.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/model_saver.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/parser_types.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/parser/parser/common/parser_inner_ctx.cc" |
|
|
|
|
|
"${GE_CODE_DIR}/ge/session/omg.cc" |
|
|
"${GE_CODE_DIR}/ge/session/omg.cc" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@@ -769,18 +775,45 @@ list(APPEND COMMON_SHARED_LIBRARIES |
|
|
hccl_stub |
|
|
hccl_stub |
|
|
error_manager_stub |
|
|
error_manager_stub |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
# build graph |
|
|
|
|
|
add_library(ge_ut_graph STATIC |
|
|
|
|
|
${COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_definitions(ge_ut_graph PRIVATE |
|
|
|
|
|
google=ascend_private |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_ut_graph PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_link_libraries(ge_ut_graph PRIVATE |
|
|
|
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
|
|
|
c_sec |
|
|
|
|
|
ascend_protobuf |
|
|
|
|
|
json |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
# build common |
|
|
# build common |
|
|
add_library(ge_ut_common STATIC ${COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) |
|
|
|
|
|
|
|
|
add_library(ge_ut_common STATIC ${COMMON_SRC_FILES} ${PROTO_HDRS}) |
|
|
|
|
|
|
|
|
target_compile_definitions(ge_ut_common PRIVATE |
|
|
target_compile_definitions(ge_ut_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_ut_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_ut_common PRIVATE |
|
|
target_link_libraries(ge_ut_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
c_sec |
|
|
c_sec |
|
|
ascend_protobuf |
|
|
ascend_protobuf |
|
|
json |
|
|
json |
|
|
|
|
|
ge_ut_graph |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
# build common format |
|
|
# build common format |
|
@@ -790,6 +823,11 @@ target_compile_definitions(ge_ut_common_format PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_ut_common_format PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_ut_common_format PRIVATE |
|
|
target_link_libraries(ge_ut_common_format PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
c_sec |
|
|
c_sec |
|
@@ -804,6 +842,11 @@ target_compile_definitions(ge_prepare_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_prepare_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_prepare_common PRIVATE |
|
|
target_link_libraries(ge_prepare_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
c_sec |
|
|
c_sec |
|
@@ -818,6 +861,11 @@ target_compile_definitions(ge_optimize_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_optimize_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_optimize_common PRIVATE |
|
|
target_link_libraries(ge_optimize_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
ascend_protobuf |
|
|
ascend_protobuf |
|
@@ -832,6 +880,11 @@ target_compile_definitions(ge_partition_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_partition_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_partition_common PRIVATE |
|
|
target_link_libraries(ge_partition_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
ascend_protobuf |
|
|
ascend_protobuf |
|
@@ -846,6 +899,11 @@ target_compile_definitions(ge_load_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_load_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_load_common PRIVATE |
|
|
target_link_libraries(ge_load_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
c_sec |
|
|
c_sec |
|
@@ -860,6 +918,11 @@ target_compile_definitions(ge_execute_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_execute_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_execute_common PRIVATE |
|
|
target_link_libraries(ge_execute_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
c_sec |
|
|
c_sec |
|
@@ -874,6 +937,11 @@ target_compile_definitions(ge_build_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_build_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_build_common PRIVATE |
|
|
target_link_libraries(ge_build_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
c_sec |
|
|
c_sec |
|
@@ -888,6 +956,11 @@ target_compile_definitions(ge_pass_common PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_pass_common PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_pass_common PRIVATE |
|
|
target_link_libraries(ge_pass_common PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
ascend_protobuf |
|
|
ascend_protobuf |
|
@@ -902,6 +975,11 @@ target_compile_definitions(ge_single_op PRIVATE |
|
|
google=ascend_private |
|
|
google=ascend_private |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(ge_single_op PRIVATE |
|
|
|
|
|
-g |
|
|
|
|
|
-Werror=format |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ge_single_op PRIVATE |
|
|
target_link_libraries(ge_single_op PRIVATE |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
$<BUILD_INTERFACE:intf_pub> |
|
|
ascend_protobuf |
|
|
ascend_protobuf |
|
@@ -920,6 +998,7 @@ add_executable(ut_libge_multiparts_utest |
|
|
|
|
|
|
|
|
target_compile_options(ut_libge_multiparts_utest PRIVATE |
|
|
target_compile_options(ut_libge_multiparts_utest PRIVATE |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
|
|
|
-Werror=format |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
target_compile_definitions(ut_libge_multiparts_utest PRIVATE |
|
|
target_compile_definitions(ut_libge_multiparts_utest PRIVATE |
|
@@ -942,6 +1021,7 @@ add_executable(ut_libge_others_utest |
|
|
|
|
|
|
|
|
target_compile_options(ut_libge_others_utest PRIVATE |
|
|
target_compile_options(ut_libge_others_utest PRIVATE |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
|
|
|
-Werror=format |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ut_libge_others_utest |
|
|
target_link_libraries(ut_libge_others_utest |
|
@@ -959,6 +1039,7 @@ add_executable(ut_libge_kernel_utest |
|
|
|
|
|
|
|
|
target_compile_options(ut_libge_kernel_utest PRIVATE |
|
|
target_compile_options(ut_libge_kernel_utest PRIVATE |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
|
|
|
-Werror=format |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries(ut_libge_kernel_utest |
|
|
target_link_libraries(ut_libge_kernel_utest |
|
@@ -977,6 +1058,7 @@ add_executable(ut_libge_distinct_load_utest |
|
|
|
|
|
|
|
|
target_compile_options(ut_libge_distinct_load_utest PRIVATE |
|
|
target_compile_options(ut_libge_distinct_load_utest PRIVATE |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
-g --coverage -fprofile-arcs -ftest-coverage |
|
|
|
|
|
-Werror=format |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
target_compile_definitions(ut_libge_distinct_load_utest PRIVATE |
|
|
target_compile_definitions(ut_libge_distinct_load_utest PRIVATE |
|
|