diff --git a/tests/depends/cce/CMakeLists.txt b/tests/depends/cce/CMakeLists.txt index 93de924e..cd47114b 100644 --- a/tests/depends/cce/CMakeLists.txt +++ b/tests/depends/cce/CMakeLists.txt @@ -23,8 +23,10 @@ include_directories(${GE_CODE_DIR}/inc) include_directories(${GE_CODE_DIR}/inc/framework) include_directories(${GE_CODE_DIR}/metadef/inc/graph) include_directories(${GE_CODE_DIR}/inc/external) +include_directories(${GE_CODE_DIR}/metadef/inc/external) include_directories(${GE_CODE_DIR}/metadef/inc/external/graph) include_directories(${GE_CODE_DIR}/metadef) +include_directories(${GE_CODE_DIR}/metadef/inc) include_directories(${GE_CODE_DIR}/metadef/graph) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/cce) @@ -66,7 +68,19 @@ set(SRCS "${GE_CODE_DIR}/metadef/graph/opsproto/opsproto_manager.cc" ) add_library(cce_ge_stub SHARED src/cce_stub.cc ${PROTO_SRCS} ${PROTO_HDRS}) -target_link_libraries(cce_ge_stub ascend_protobuf) +target_link_libraries(cce_ge_stub + $ + -Wl,--no-as-needed + ascend_protobuf + -Wl,--as-needed + c_sec +) add_library(cce_stub SHARED ${SRCS} ${PROTO_SRCS} ${PROTO_HDRS}) -target_link_libraries(cce_stub ascend_protobuf) +target_link_libraries(cce_stub PRIVATE + $ + -Wl,--no-as-needed + ascend_protobuf + -Wl,--as-needed + c_sec +) diff --git a/tests/depends/hccl/CMakeLists.txt b/tests/depends/hccl/CMakeLists.txt index 9e3826dd..0966124e 100644 --- a/tests/depends/hccl/CMakeLists.txt +++ b/tests/depends/hccl/CMakeLists.txt @@ -13,14 +13,18 @@ # limitations under the License. # ============================================================================ -cmake_minimum_required(VERSION 2.8) +#cmake_minimum_required(VERSION 2.8) project(hccl_stub) file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/hccl_stub.cc" ) -include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc) -include_directories(${GE_SOURCE_DIR}/inc) +include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) +include_directories(${GE_CODE_DIR}/inc) -add_library(hccl_stub SHARED ${SRC_FILES}) \ No newline at end of file +add_library(hccl_stub SHARED ${SRC_FILES}) + +target_link_libraries(hccl_stub PRIVATE + $ +) diff --git a/tests/depends/hccl/src/hccl_stub.cc b/tests/depends/hccl/src/hccl_stub.cc index 8bfeb715..1cc8fdb3 100644 --- a/tests/depends/hccl/src/hccl_stub.cc +++ b/tests/depends/hccl/src/hccl_stub.cc @@ -18,27 +18,27 @@ #include "hccl/hcom.h" -hcclResult_t hcom_all_gather(const char *tag, void *input_count_ptr, void *output_ptr, u64 input_count, - hcclDataType_t data_type, const char *group, rtStream_t stream) { +HcclResult hcom_all_gather(const char *tag, void *input_count_ptr, void *output_ptr, u64 input_count, + HcclDataType data_type, const char *group, rtStream_t stream) { return HCCL_SUCCESS; } -hcclResult_t hcom_broadcast(const char *tag, void *ptr, u64 count, hcclDataType_t data_type, u32 root, +HcclResult hcom_broadcast(const char *tag, void *ptr, u64 count, HcclDataType data_type, u32 root, const char *group, rtStream_t stream) { return HCCL_SUCCESS; } -hcclResult_t hcom_all_reduce(const char *tag, void *input_ptr, void *output_ptr, u64 count, hcclDataType_t data_type, - hcclRedOp_t op, const char *group, rtStream_t stream) { +HcclResult hcom_all_reduce(const char *tag, void *input_ptr, void *output_ptr, u64 count, HcclDataType data_type, + HcclReduceOp op, const char *group, rtStream_t stream) { return HCCL_SUCCESS; } -hcclResult_t hcom_get_split_strategy(const char *group, const struct model_feature *feature, u32 max_segment_num, +HcclResult hcom_get_split_strategy(const char *group, const struct model_feature *feature, u32 max_segment_num, u32 *segment_num, u32 *segment_idx) { return HCCL_SUCCESS; } -hcclResult_t hcom_reduce_scatter(const char *tag, void *input_ptr, void *output_ptr, u64 count, - hcclDataType_t data_type, hcclRedOp_t op, const char *group, rtStream_t stream) { +HcclResult hcom_reduce_scatter(const char *tag, void *input_ptr, void *output_ptr, u64 count, + HcclDataType data_type, HcclReduceOp op, const char *group, rtStream_t stream) { return HCCL_SUCCESS; -} \ No newline at end of file +} diff --git a/tests/depends/mmpa/CMakeLists.txt b/tests/depends/mmpa/CMakeLists.txt index a29c3b55..567266cf 100644 --- a/tests/depends/mmpa/CMakeLists.txt +++ b/tests/depends/mmpa/CMakeLists.txt @@ -21,10 +21,18 @@ file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR} "src/mmpa_stub.cc" ) -include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc) -include_directories(${GE_SOURCE_DIR}/inc) -include_directories(${GE_SOURCE_DIR}/inc/framework) -include_directories(${GE_SOURCE_DIR}/inc/external) +include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) +include_directories(${GE_CODE_DIR}/inc) +include_directories(${GE_CODE_DIR}/inc/external) +include_directories(${GE_CODE_DIR}/metadef/inc) +include_directories(${GE_CODE_DIR}/inc/framework) +include_directories(${GE_CODE_DIR}/metadef/inc/external) add_library(mmpa_stub SHARED ${SRCS}) -target_link_libraries(mmpa_stub ascend_protobuf) +target_link_libraries(mmpa_stub PRIVATE + $ + -Wl,--no-as-needed + ascend_protobuf + -Wl,--as-needed + c_sec +) diff --git a/tests/depends/omg/CMakeLists.txt b/tests/depends/omg/CMakeLists.txt index b8dc2c8b..c107242c 100644 --- a/tests/depends/omg/CMakeLists.txt +++ b/tests/depends/omg/CMakeLists.txt @@ -22,9 +22,11 @@ set(CMAKE_CXX_STANDARD 11) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/cce) include_directories(${GE_CODE_DIR}/inc) +include_directories(${GE_CODE_DIR}/metadef/inc) include_directories(${GE_CODE_DIR}/inc/framework) include_directories(${GE_CODE_DIR}/metadef/inc/graph) include_directories(${GE_CODE_DIR}/inc/external) +include_directories(${GE_CODE_DIR}/metadef/inc/external) include_directories(${GE_CODE_DIR}/metadef/inc/external/graph) include_directories(${GE_CODE_DIR}/ge) include_directories(${CMAKE_BINARY_DIR}) @@ -42,4 +44,11 @@ set(SRCS ) add_library(omg_stub SHARED ${SRCS} ${PROTO_SRCS} ${PROTO_HDRS}) -target_link_libraries(omg_stub ascend_protobuf) +target_link_libraries(omg_stub PRIVATE + $ + -Wl,--no-as-needed + ascend_protobuf + -Wl,--as-needed + c_sec + json +) diff --git a/tests/depends/omg/src/omg_stub.cc b/tests/depends/omg/src/omg_stub.cc index 7197dac7..a6221570 100644 --- a/tests/depends/omg/src/omg_stub.cc +++ b/tests/depends/omg/src/omg_stub.cc @@ -643,7 +643,7 @@ Status GetInputOutputDescInfo(uint32_t model_id, vector &in } Status DataInput(const InputData *input_data, OutputData *output_data) { return SUCCESS; } - +/* class ModelManager { public: static std::shared_ptr GetInstance(); @@ -741,6 +741,8 @@ Status ModelManager::ExecuteModel(uint32_t model_id, rtStream_t stream, bool asy return SUCCESS; } +*/ + } // namespace ge namespace ge { diff --git a/tests/depends/profiler/CMakeLists.txt b/tests/depends/profiler/CMakeLists.txt index cc6d2ca5..83a31b63 100644 --- a/tests/depends/profiler/CMakeLists.txt +++ b/tests/depends/profiler/CMakeLists.txt @@ -13,12 +13,16 @@ # limitations under the License. # ============================================================================ -cmake_minimum_required(VERSION 2.8) +#cmake_minimum_required(VERSION 2.8) project(profiler_stub) file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/profiler_stub.cc" ) -include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc) +include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) -add_library(profiler_stub SHARED ${SRC_FILES}) \ No newline at end of file +add_library(profiler_stub SHARED ${SRC_FILES}) + +target_link_libraries(profiler_stub PRIVATE + $ +) diff --git a/tests/depends/runtime/CMakeLists.txt b/tests/depends/runtime/CMakeLists.txt index 80cc14e4..349af39a 100644 --- a/tests/depends/runtime/CMakeLists.txt +++ b/tests/depends/runtime/CMakeLists.txt @@ -13,7 +13,7 @@ # limitations under the License. # ============================================================================ -cmake_minimum_required(VERSION 2.8) +#cmake_minimum_required(VERSION 2.8) project(STUB_MMPA) @@ -21,7 +21,12 @@ file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR} "src/runtime_stub.cc" ) -include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc) -include_directories(${GE_SOURCE_DIR}/inc/framework) +include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) +include_directories(${GE_CODE_DIR}/inc/framework) add_library(runtime_stub SHARED ${SRCS}) + +target_link_libraries(runtime_stub PRIVATE + $ + c_sec +) diff --git a/tests/depends/slog/CMakeLists.txt b/tests/depends/slog/CMakeLists.txt index 326d7387..e57ac5a9 100644 --- a/tests/depends/slog/CMakeLists.txt +++ b/tests/depends/slog/CMakeLists.txt @@ -13,7 +13,7 @@ # limitations under the License. # ============================================================================ -cmake_minimum_required(VERSION 2.8) +#cmake_minimum_required(VERSION 2.8) project(slog_stub) file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} @@ -21,3 +21,6 @@ file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) add_library(slog_stub SHARED ${SRC_FILES}) +target_link_libraries(slog_stub PRIVATE + $ +) diff --git a/tests/ut/ge/CMakeLists.txt b/tests/ut/ge/CMakeLists.txt index 2c05a061..54e40a60 100755 --- a/tests/ut/ge/CMakeLists.txt +++ b/tests/ut/ge/CMakeLists.txt @@ -23,7 +23,14 @@ set(PROTO_LIST "${GE_CODE_DIR}/metadef/proto/ge_api.proto" "${GE_CODE_DIR}/metadef/proto/fwk_adapter.proto" "${GE_CODE_DIR}/metadef/proto/op_mapping_info.proto" + "${GE_CODE_DIR}/metadef/proto/optimizer_priority.proto" "${GE_CODE_DIR}/metadef/proto/ge_api.proto" + "${GE_CODE_DIR}/metadef/proto/tensorflow/attr_value.proto" + "${GE_CODE_DIR}/metadef/proto/tensorflow/tensor.proto" + "${GE_CODE_DIR}/metadef/proto/tensorflow/resource_handle.proto" + "${GE_CODE_DIR}/metadef/proto/tensorflow/tensor_shape.proto" + "${GE_CODE_DIR}/metadef/proto/tensorflow/types.proto" + "${GE_CODE_DIR}/metadef/proto/tensorflow/node_def.proto" "${GE_CODE_DIR}/metadef/proto/proto_inner/ge_onnx.proto" ) @@ -33,17 +40,22 @@ protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST}) include_directories(${CMAKE_CURRENT_LIST_DIR}) include_directories(${GE_CODE_DIR}) include_directories(${GE_CODE_DIR}/inc) +include_directories(${GE_CODE_DIR}/metadef/inc) include_directories(${GE_CODE_DIR}/ge) include_directories(${GE_CODE_DIR}/metadef) include_directories(${GE_CODE_DIR}/metadef/graph) include_directories(${GE_CODE_DIR}/inc/external) +include_directories(${GE_CODE_DIR}/metadef/inc/external) +include_directories(${GE_CODE_DIR}/parser/parser) include_directories(${GE_CODE_DIR}/metadef/inc/external/graph) include_directories(${GE_CODE_DIR}/metadef/inc/graph) include_directories(${GE_CODE_DIR}/inc/framework) include_directories(${GE_CODE_DIR}/metadef/inc/common) +include_directories(${GE_CODE_DIR}/metadef/third_party) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/cce) include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/ops) +include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/toolchain) include_directories(${GE_CODE_DIR}/tests/ut/ge) include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR}/proto/ge) @@ -501,33 +513,127 @@ list(APPEND COMMON_SHARED_LIBRARIES # build common add_library(ge_ut_common STATIC ${COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_ut_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_ut_common PRIVATE + c_sec + ascend_protobuf + json +) + # build common format add_library(ge_ut_common_format STATIC ${COMMON_SRC_FILES} ${COMMON_FORMAT_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_ut_common_format PRIVATE + google=ascend_private +) + # build graph prepare common add_library(ge_prepare_common STATIC ${GRAPH_PREPARE_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_prepare_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_prepare_common PRIVATE + c_sec + ascend_protobuf + json +) + # build graph optimize common add_library(ge_optimize_common STATIC ${GRAPH_OPTIMIZE_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_optimize_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_optimize_common PRIVATE + ascend_protobuf + c_sec + json +) + # build graph partition common add_library(ge_partition_common STATIC ${GRAPH_PARTITION_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_partition_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_partition_common PRIVATE + ascend_protobuf + c_sec + json +) + # build build graph load common add_library(ge_load_common STATIC ${GRAPH_LOAD_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_load_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_load_common PRIVATE + c_sec + ascend_protobuf + json +) + # build graph execute common add_library(ge_execute_common STATIC ${GRAPH_EXECUTE_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_execute_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_execute_common PRIVATE + c_sec + json + ascend_protobuf +) + # build graph build common add_library(ge_build_common STATIC ${GRAPH_BUILD_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_build_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_build_common PRIVATE + c_sec + ascend_protobuf + json +) + # build graph pass common add_library(ge_pass_common STATIC ${GRAPH_PASS_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_pass_common PRIVATE + google=ascend_private +) + +target_link_libraries(ge_pass_common PRIVATE + ascend_protobuf + c_sec + json +) + # build single_op common add_library(ge_single_op STATIC ${SINGLE_OP_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) +target_compile_definitions(ge_single_op PRIVATE + google=ascend_private +) + +target_link_libraries(ge_single_op PRIVATE + ascend_protobuf + json + c_sec +) + # ut binary # libge_mutiparts_utest @@ -536,12 +642,17 @@ add_executable(ut_libge_multiparts_utest ${COMMON_FORMAT_SRC_FILES} ${MULTI_PARTS_TEST_FILES} ) + +target_compile_definitions(ut_libge_multiparts_utest PRIVATE + google=ascend_private +) + target_link_libraries(ut_libge_multiparts_utest ge_build_common ge_load_common ge_build_common ge_execute_common ge_optimize_common ge_partition_common ge_pass_common ge_prepare_common ge_single_op ge_ut_common - gtest gtest_main ascend_protobuf -lrt -ldl + gtest gtest_main ascend_protobuf -lrt -ldl ) -target_link_libraries(ut_libge_multiparts_utest ${COMMON_SHARED_LIBRARIES} ascend_protobuf) +target_link_libraries(ut_libge_multiparts_utest ${COMMON_SHARED_LIBRARIES} ascend_protobuf json) # libge_others_utest add_executable(ut_libge_others_utest diff --git a/tests/ut/ge/common/datatype_transfer_unittest.cc b/tests/ut/ge/common/datatype_transfer_unittest.cc index 5f11b272..185490a2 100644 --- a/tests/ut/ge/common/datatype_transfer_unittest.cc +++ b/tests/ut/ge/common/datatype_transfer_unittest.cc @@ -18,7 +18,7 @@ #include "common/formats/format_transfers/datatype_transfer.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/formats/formats.h" #include "common/fp16_t.h" diff --git a/tests/ut/ge/common/format_transfer_5d_nchw_unittest.cc b/tests/ut/ge/common/format_transfer_5d_nchw_unittest.cc index 4a7d3672..64664a5c 100644 --- a/tests/ut/ge/common/format_transfer_5d_nchw_unittest.cc +++ b/tests/ut/ge/common/format_transfer_5d_nchw_unittest.cc @@ -17,9 +17,10 @@ #include #include "common/formats/format_transfers/format_transfer_nc1hwc0_nchw.h" - -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" namespace ge { namespace formats { @@ -644,4 +645,4 @@ TEST_F(UTEST_FormatTransferNc1hwc0ToNchw, invalid_src_data_type) { EXPECT_EQ(transfer.TransFormat(args, result), PARAM_INVALID); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_5d_nhwc_unittest.cc b/tests/ut/ge/common/format_transfer_5d_nhwc_unittest.cc index c811884f..6e5158df 100644 --- a/tests/ut/ge/common/format_transfer_5d_nhwc_unittest.cc +++ b/tests/ut/ge/common/format_transfer_5d_nhwc_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_nc1hwc0_nhwc.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransfer5dNhwc : public testing::Test { @@ -759,4 +762,4 @@ TEST_F(UtestFormatTransfer5dNhwc, invalid_src_dst_shape_relation) { EXPECT_EQ(transfer.TransFormat(args, result), PARAM_INVALID); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_c1hwncoc0_hwcn_unittest.cc b/tests/ut/ge/common/format_transfer_c1hwncoc0_hwcn_unittest.cc index 570310f3..e809cf1b 100644 --- a/tests/ut/ge/common/format_transfer_c1hwncoc0_hwcn_unittest.cc +++ b/tests/ut/ge/common/format_transfer_c1hwncoc0_hwcn_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferC1hwncoc0Hwcn : public testing::Test { @@ -13710,4 +13713,4 @@ TEST_F(UtestFormatTransferC1hwncoc0Hwcn, sixd_to_hwcn_fp32_success_gt_cube) { } } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_fractal_nz_unittest.cc b/tests/ut/ge/common/format_transfer_fractal_nz_unittest.cc index bf2a35be..ce41d3ac 100644 --- a/tests/ut/ge/common/format_transfer_fractal_nz_unittest.cc +++ b/tests/ut/ge/common/format_transfer_fractal_nz_unittest.cc @@ -19,11 +19,14 @@ #include "common/formats/format_transfers/format_transfer_fractal_nz.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/formats/formats.h" #include "common/fp16_t.h" #include "time.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferNdFractNz : public testing::Test { @@ -9164,4 +9167,4 @@ TEST_F(UtestFormatTransferNdFractNz, invalid_src_dst_shape_relation) { EXPECT_EQ(transfer.TransFormat(args, result), PARAM_INVALID); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_fractal_zz_unittest.cc b/tests/ut/ge/common/format_transfer_fractal_zz_unittest.cc index c80f72ca..34f25fde 100644 --- a/tests/ut/ge/common/format_transfer_fractal_zz_unittest.cc +++ b/tests/ut/ge/common/format_transfer_fractal_zz_unittest.cc @@ -19,11 +19,14 @@ #include "common/formats/format_transfers/format_transfer_fractal_zz.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/formats/formats.h" #include "common/fp16_t.h" #include "time.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferNdFractZz : public testing::Test { @@ -7988,4 +7991,4 @@ TEST_F(UtestFormatTransferNdFractZz, invalid_src_dst_shape_relation) { EXPECT_EQ(transfer.TransFormat(args, result), PARAM_INVALID); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_fracz_hwcn_unittest.cc b/tests/ut/ge/common/format_transfer_fracz_hwcn_unittest.cc index bc203ff3..6c18aa34 100644 --- a/tests/ut/ge/common/format_transfer_fracz_hwcn_unittest.cc +++ b/tests/ut/ge/common/format_transfer_fracz_hwcn_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_fracz_hwcn.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferFracZHwcn : public testing::Test { diff --git a/tests/ut/ge/common/format_transfer_fracz_nchw_unittest.cc b/tests/ut/ge/common/format_transfer_fracz_nchw_unittest.cc index 1b363625..46d3ae86 100644 --- a/tests/ut/ge/common/format_transfer_fracz_nchw_unittest.cc +++ b/tests/ut/ge/common/format_transfer_fracz_nchw_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_fracz_nchw.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferFraczNchw : public testing::Test { @@ -10486,4 +10489,4 @@ TEST_F(UtestFormatTransferFraczNchw, fp32_1) { } } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_fracz_nhwc_unittest.cc b/tests/ut/ge/common/format_transfer_fracz_nhwc_unittest.cc index 51770ecc..e406eb43 100644 --- a/tests/ut/ge/common/format_transfer_fracz_nhwc_unittest.cc +++ b/tests/ut/ge/common/format_transfer_fracz_nhwc_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_fracz_nhwc.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferFraczNhwc : public testing::Test { @@ -5422,4 +5425,4 @@ TEST_F(UtestFormatTransferFraczNhwc, fracz_to_nhwc_fp32_success_gt_cube) { } } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_hwcn_c1hwncoc0_unittest.cc b/tests/ut/ge/common/format_transfer_hwcn_c1hwncoc0_unittest.cc index 16c3ba77..e468f5ac 100644 --- a/tests/ut/ge/common/format_transfer_hwcn_c1hwncoc0_unittest.cc +++ b/tests/ut/ge/common/format_transfer_hwcn_c1hwncoc0_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_hwcn_c1hwncoc0.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferHwcnC1hwncoc0 : public testing::Test { @@ -13745,4 +13748,4 @@ TEST_F(UtestFormatTransferHwcnC1hwncoc0, hwcn_to_6d_fp32_success_gt_cube) { } } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_hwcn_fractalz_unittest.cc b/tests/ut/ge/common/format_transfer_hwcn_fractalz_unittest.cc index df5afe4d..b0c0b706 100644 --- a/tests/ut/ge/common/format_transfer_hwcn_fractalz_unittest.cc +++ b/tests/ut/ge/common/format_transfer_hwcn_fractalz_unittest.cc @@ -18,7 +18,10 @@ #include "common/formats/format_transfers/format_transfer_fractal_z.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" + +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" namespace ge { namespace formats { @@ -34460,4 +34463,4 @@ TEST_F(UtestFormatTransferHwcnFz, build_transfer_not_support) { EXPECT_EQ(transfer, nullptr); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_nchw_5d_unittest.cc b/tests/ut/ge/common/format_transfer_nchw_5d_unittest.cc index 47207c59..67104bf8 100644 --- a/tests/ut/ge/common/format_transfer_nchw_5d_unittest.cc +++ b/tests/ut/ge/common/format_transfer_nchw_5d_unittest.cc @@ -18,7 +18,10 @@ #include "common/formats/format_transfers/format_transfer_nchw_nc1hwc0.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" + +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" namespace ge { namespace formats { diff --git a/tests/ut/ge/common/format_transfer_nchw_fractalz_unittest.cc b/tests/ut/ge/common/format_transfer_nchw_fractalz_unittest.cc index 5af488a2..5d648473 100644 --- a/tests/ut/ge/common/format_transfer_nchw_fractalz_unittest.cc +++ b/tests/ut/ge/common/format_transfer_nchw_fractalz_unittest.cc @@ -18,7 +18,10 @@ #include "common/formats/format_transfers/format_transfer_fractal_z.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" + +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" namespace ge { namespace formats { @@ -16873,4 +16876,4 @@ TEST_F(UtestFormatTransferNchwFz, build_transfer_uint8) { EXPECT_NE(transfer, nullptr); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_nhwc_5d_unittest.cc b/tests/ut/ge/common/format_transfer_nhwc_5d_unittest.cc index 8d1ff256..f212ca80 100644 --- a/tests/ut/ge/common/format_transfer_nhwc_5d_unittest.cc +++ b/tests/ut/ge/common/format_transfer_nhwc_5d_unittest.cc @@ -18,9 +18,12 @@ #include "common/formats/format_transfers/format_transfer_nhwc_nc1hwc0.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/fp16_t.h" +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { class UtestFormatTransferNhwc5d : public testing::Test { @@ -747,4 +750,4 @@ TEST_F(UtestFormatTransferNhwc5d, unsupport_dst_format) { EXPECT_EQ(transfer.TransFormat(args, result), PARAM_INVALID); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_nhwc_fractalz_unittest.cc b/tests/ut/ge/common/format_transfer_nhwc_fractalz_unittest.cc index 424285a1..f6017fb7 100644 --- a/tests/ut/ge/common/format_transfer_nhwc_fractalz_unittest.cc +++ b/tests/ut/ge/common/format_transfer_nhwc_fractalz_unittest.cc @@ -18,7 +18,10 @@ #include "common/formats/format_transfers/format_transfer_fractal_z.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" + +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" namespace ge { namespace formats { @@ -5351,4 +5354,4 @@ TEST_F(UtestFormatTransferNhwcFz, build_transfer_uint8) { EXPECT_NE(transfer, nullptr); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/common/format_transfer_unittest.cc b/tests/ut/ge/common/format_transfer_unittest.cc index bf82a4b7..4fcfb378 100644 --- a/tests/ut/ge/common/format_transfer_unittest.cc +++ b/tests/ut/ge/common/format_transfer_unittest.cc @@ -18,9 +18,13 @@ #include "common/formats/format_transfers/format_transfer_nchw_nc1hwc0.h" -#include "common/formats/format_transfers/format_transfer.h" +//#include "common/formats/format_transfers/format_transfer.h" #include "common/formats/utils/formats_trans_utils.h" + +#include "register/register_format_transfer.h" +#include "framework/common/ge_inner_error_codes.h" + namespace ge { namespace formats { @@ -78,4 +82,4 @@ TEST_F(UtestFormatTransfer, get_size_by_data_type) { EXPECT_EQ(DT_UNDEFINED, 26); } } // namespace formats -} // namespace ge \ No newline at end of file +} // namespace ge diff --git a/tests/ut/ge/graph/build/logical_stream_allocator_unittest.cc b/tests/ut/ge/graph/build/logical_stream_allocator_unittest.cc index f9799b49..086b1495 100644 --- a/tests/ut/ge/graph/build/logical_stream_allocator_unittest.cc +++ b/tests/ut/ge/graph/build/logical_stream_allocator_unittest.cc @@ -858,7 +858,7 @@ TEST_F(UtestLogicalStreamAllocator, test_all_reduce_parallel_pass) { std::map max_parallel_num; LogicalStreamPass::Context context; context.next_stream = 5; - context.hcom_parallel = true; + context.enable_hcom_parallel = true; vector subgraphs; LogicalStreamPassPtr allreduce_pass = std::make_shared(); ret = allreduce_pass->Run(graph, subgraphs, context); diff --git a/tests/ut/ge/graph/build/mem_assigner_unittest.cc b/tests/ut/ge/graph/build/mem_assigner_unittest.cc index 459d8fc3..1e326b01 100644 --- a/tests/ut/ge/graph/build/mem_assigner_unittest.cc +++ b/tests/ut/ge/graph/build/mem_assigner_unittest.cc @@ -152,7 +152,7 @@ TEST_F(UtestMemoryAssignerTest, MemoryBlock_Resize_RealSizeList_is_empty) { ge::OpDescPtr op_def_a = createOpWithWsSize("A", 6000); ge::NodePtr node_a = graph->AddNode(op_def_a); MemoryBlock* memory_block = new MemoryBlock(0); - memory_block->Init(1, kOutput, node_a, 0); + memory_block->Init(1, kOutput, node_a, 0, 1); memory_block->real_size_list_.clear(); memory_block->Resize(); @@ -165,7 +165,7 @@ namespace ge { class MockBlockMemAssigner : public BlockMemAssigner { public: - explicit MockBlockMemAssigner(ge::ComputeGraphPtr compute_graph) : BlockMemAssigner(compute_graph){}; + explicit MockBlockMemAssigner(ge::ComputeGraphPtr compute_graph, const std::map &anchor_to_symbol, const std::map> &symbol_to_anchors) : BlockMemAssigner(compute_graph, anchor_to_symbol, symbol_to_anchors) {}; virtual ~MockBlockMemAssigner(){};