Browse Source

Make whole-archive testunit

pull/1562/head
zhangxiaokun 4 years ago
parent
commit
12df2788d6
5 changed files with 133 additions and 269 deletions
  1. +9
    -1
      tests/depends/error_manager/src/error_manager_stub.cc
  2. +3
    -1
      tests/depends/runtime/CMakeLists.txt
  3. +10
    -0
      tests/depends/slog/src/slog_stub.cc
  4. +110
    -266
      tests/ut/ge/CMakeLists.txt
  5. +1
    -1
      tests/ut/ge/graph/load/model_manager_unittest.cc

+ 9
- 1
tests/depends/error_manager/src/error_manager_stub.cc View File

@@ -48,6 +48,14 @@ thread_local Context ErrorManager::error_context_ = {0, "", "", ""};
return 0;
}

std::string ErrorManager::GetErrorMessage() {
return std::string();
}

std::string ErrorManager::GetWarningMessage() {
return std::string();
}

int ErrorManager::ReportInterErrMessage(std::string error_code, const std::string &error_msg) {
return 0;
}
@@ -99,7 +107,7 @@ thread_local Context ErrorManager::error_context_ = {0, "", "", ""};
const std::string &ErrorManager::GetLogHeader() { return error_context_.log_header; }

struct Context &ErrorManager::GetErrorContext() {
struct Context error_context;
static struct Context error_context;
return error_context;
}



+ 3
- 1
tests/depends/runtime/CMakeLists.txt View File

@@ -15,7 +15,7 @@

#cmake_minimum_required(VERSION 2.8)

project(STUB_MMPA)
project(runtime_stub)

file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"src/runtime_stub.cc"
@@ -30,3 +30,5 @@ target_link_libraries(runtime_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
c_sec
)

target_include_directories(runtime_stub INTERFACE ${CMAKE_CURRENT_LIST_DIR}/src)

+ 10
- 0
tests/depends/slog/src/slog_stub.cc View File

@@ -15,6 +15,7 @@
*/

#include "toolchain/slog.h"
#include "toolchain/plog.h"

#include <stdarg.h>
#include <stdio.h>
@@ -46,3 +47,12 @@ int CheckLogLevel(int moduleId, int logLevel)
{
return 1;
}

int DlogReportInitialize() {
return 0;
}

int DlogReportFinalize() {
return 0;
}


+ 110
- 266
tests/ut/ge/CMakeLists.txt View File

@@ -130,6 +130,7 @@ set(PARSER_SRC_FILES
"${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}/parser/parser/tensorflow/iterator_fusion_pass.cc"
)

set(COMMON_SRC_FILES
@@ -141,164 +142,39 @@ set(COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/common/op/ge_op_utils.cc"
"${GE_CODE_DIR}/ge/common/context/ctx.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/opskernel_manager/ops_kernel_manager.cc"
"${GE_CODE_DIR}/ge/session/session_manager.cc"
"${GE_CODE_DIR}/ge/opskernel_manager/ops_kernel_builder_manager.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/model_manager.cc"
"${GE_CODE_DIR}/ge/common/profiling/profiling_manager.cc"
"${GE_CODE_DIR}/ge/graph/manager/host_mem_manager.cc"
"${GE_CODE_DIR}/ge/session/inner_session.cc"
"${GE_CODE_DIR}/ge/graph/manager/util/rt_context_util.cc"
"${GE_CODE_DIR}/ge/graph/execute/graph_execute.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/graph_preprocess.cc"
"${GE_CODE_DIR}/ge/hybrid/hybrid_davinci_model_stub.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/davinci_model.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/data_inputer.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_properties.cc"
"${GE_CODE_DIR}/ge/common/helper/model_helper.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_manager.cc"
"${GE_CODE_DIR}/ge/common/dump/exception_dumper.cc"
"${GE_CODE_DIR}/ge/common/dump/exception_dumper.cc"
"${GE_CODE_DIR}/ge/common/dump/opdebug_register.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_op.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/model/ge_root_model.cc"
"${GE_CODE_DIR}/ge/common/model_parser/model_parser.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/data_dumper.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_manager.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_server.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/insert_op/util_insert_aipp_op.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/multi_batch_copy_graph.cc"
"${GE_CODE_DIR}/ge/graph/optimize/mem_rw_conflict_optimize.cc"
"${GE_CODE_DIR}/ge/graph/passes/pass_manager.cc"
"${GE_CODE_DIR}/ge/graph/passes/resource_pair_add_control_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/resource_pair_remove_control_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/pass_utils.cc"
"${GE_CODE_DIR}/ge/graph/passes/base_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/bitcast_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/constant_folding_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/aicpu_constant_folding_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/reshape_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/reshape_recovery_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_breadth_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_depth_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_nearby_allreduce_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/same_transdata_breadth_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_without_reshape_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/compile_nodes_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_prepare_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_ref_delete_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_ref_useless_control_out_delete_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/subgraph_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/data_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/net_output_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/replace_transshape_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/constant_fuse_same_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/fuse_data_nodes_with_common_input_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/print_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/no_use_reshape_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/iterator_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/input_output_connection_identify_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/atomic_addr_clean_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_same_addr_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_graph_unknown_status_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_agnostic_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/dimension_compute_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/dimension_adjust_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/get_original_format_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/shape_operate_op_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/unused_op_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/assert_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/dropout_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/infershape_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/unused_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/isolated_op_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/permute_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/ctrl_edge_transfer_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/end_of_sequence_add_control_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/stop_gradient_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/prevent_gradient_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/identity_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/ref_identity_delete_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/placeholder_with_default_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/snapshot_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/guarantee_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/var_is_initialized_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/parallel_concat_start_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/folding_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cast_translate_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/prune_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/merge_to_stream_merge_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/merge_input_memcpy_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_to_stream_switch_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/attach_stream_label_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/multi_batch_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/multi_batch_clone_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/subexpression_migration_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/subgraph_const_migration_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/unused_args_clean_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/next_iteration_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/control_trigger_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cond_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cond_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/for_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/enter_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/assign_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/inplace_support_check_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/addn_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/common_subexpression_elimination_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_symmetry_elimination_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/save_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_dead_branch_elimination.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_logic_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_data_edges_bypass.cc"
"${GE_CODE_DIR}/ge/graph/passes/merge_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_format_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cast_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transpose_transdata_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_memcpy_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_continuous_memcpy_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/flow_ctrl_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/global_step_insert_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/link_gen_mask_nodes_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/replace_with_empty_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_group_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_tailing_optimization_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/memcpy_addr_async_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/set_input_output_offset_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/remove_same_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/useless_control_out_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/parallel_group_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/buffer_pool_memory_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_node_unknown_shape_pass.cc"
"${GE_CODE_DIR}/ge/model/ge_model.cc"
"${GE_CODE_DIR}/ge/common/cust_aicpu_kernel_store.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/model_utils.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/zero_copy_offset.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/zero_copy_task.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/cpu_queue_schedule.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/aipp_utils.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/tbe_handle_store.cc"
"${GE_CODE_DIR}/ge/common/kernel_store.cc"
"${GE_CODE_DIR}/ge/common/tbe_kernel_store.cc"
"${GE_CODE_DIR}/ge/common/auth/file_saver.cc"
"${GE_CODE_DIR}/ge/graph/manager/util/debug.cc"
"${GE_CODE_DIR}/ge/common/debug/memory_dumper.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_context.cc"
"${GE_CODE_DIR}/ge/graph/load/graph_loader.cc"
"${GE_CODE_DIR}/ge/graph/optimize/graph_optimize.cc"
"${GE_CODE_DIR}/ge/graph/build/graph_builder.cc"
"${GE_CODE_DIR}/ge/graph/partition/graph_partition.cc"
"${GE_CODE_DIR}/ge/common/helper/model_cache_helper.cc"
"${GE_CODE_DIR}/ge/ir_build/option_utils.cc"
"${GE_CODE_DIR}/ge/ir_build/ge_ir_build.cc"
"${GE_CODE_DIR}/ge/ir_build/attr_options/utils.cc"
"${GE_CODE_DIR}/ge/ir_build/attr_options/keep_dtype_option.cc"
@@ -307,14 +183,10 @@ set(COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/partition/stage_partition.cc"
"${GE_CODE_DIR}/ge/graph/partition/dynamic_shape_partition.cc"
"${GE_CODE_DIR}/ge/graph/optimize/summary_optimize.cc"
"${GE_CODE_DIR}/ge/ir_build/option_utils.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/insert_op/ge_aipp_op.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/multi_batch_options.cc"
"${GE_CODE_DIR}/ge/graph/build/model_builder.cc"
"${GE_CODE_DIR}/ge/graph/build/run_context.cc"
"${GE_CODE_DIR}/ge/graph/build/stream_graph_optimizer.cc"
"${GE_CODE_DIR}/ge/graph/build/task_generator.cc"
"${GE_CODE_DIR}/ge/graph/partition/graph_partition.cc"
"${GE_CODE_DIR}/ge/graph/partition/engine_place.cc"
"${GE_CODE_DIR}/ge/graph/build/stream_allocator.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/memory_assigner.cc"
@@ -339,10 +211,19 @@ set(COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/manager/host_mem_allocator.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_op.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/common/ge/datatype_util.cc"
"${GE_CODE_DIR}/ge/ge_local_engine/engine/host_cpu_engine.cc"
"${GE_CODE_DIR}/ge/session/omg.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/common/debug/memory_dumper.cc"
"${GE_CODE_DIR}/ge/common/auth/file_saver.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/common/tbe_kernel_store.cc"
"${GE_CODE_DIR}/ge/common/thread_pool.cc"
"${GE_CODE_DIR}/ge/common/profiling/profiling_manager.cc"
"${GE_CODE_DIR}/ge/common/tbe_kernel_store.cc"
"${GE_CODE_DIR}/ge/common/util.cc"
"${GE_CODE_DIR}/ge/common/thread_pool.cc"
)

set(COMMON_FORMAT_SRC_FILES
@@ -365,54 +246,26 @@ set(COMMON_FORMAT_SRC_FILES
"${GE_CODE_DIR}/ge/common/formats/format_transfers/format_transfer_fracz_hwcn.cc"
"${GE_CODE_DIR}/ge/common/formats/utils/formats_trans_utils.cc"
"${GE_CODE_DIR}/ge/graph/manager/util/hcom_util.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_manager.cc"
)

set(GRAPH_OPTIMIZE_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/optimize/graph_optimize.cc"
"${GE_CODE_DIR}/ge/graph/optimize/summary_optimize.cc"
)


set(GRAPH_PREPARE_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/preprocess/graph_preprocess.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/insert_op/util_insert_aipp_op.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/insert_op/ge_aipp_op.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/multi_batch_options.cc"
#"${GE_CODE_DIR}/ge/graph/preprocess/insert_op/base_insert_op.cc"
)

set(GRAPH_PARTITION_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/partition/graph_partition.cc"
"${GE_CODE_DIR}/ge/plugin/engine/dnnengines.cc"
"${GE_CODE_DIR}/ge/graph/partition/engine_place.cc"
)

set(GRAPH_LOAD_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/load/graph_loader.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_manager_utils.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_mem_allocator.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_var_manager.cc"
"${GE_CODE_DIR}/ge/graph/manager/trans_var_data_utils.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_caching_allocator.cc"
"${GE_CODE_DIR}/ge/graph/manager/rdma_pool_allocator.cc"
"${GE_CODE_DIR}/ge/graph/manager/host_mem_allocator.cc"
"${GE_CODE_DIR}/ge/common/thread_pool.cc"
)

set(DISTINCT_GRAPH_LOAD_SRC_FILES
"${GE_CODE_DIR}/ge/graph/manager/util/hcom_util.cc"
"${GE_CODE_DIR}/ge/graph/manager/util/debug.cc"
"${GE_CODE_DIR}/ge/common/properties_manager.cc"
"${GE_CODE_DIR}/ge/common/profiling/profiling_manager.cc"
"${GE_CODE_DIR}/ge/common/model_parser/model_parser.cc"
"${GE_CODE_DIR}/ge/common/tbe_kernel_store.cc"
"${GE_CODE_DIR}/ge/common/util.cc"
set(GRAPH_DAVINCI_MODEL_SRC_FILES
"${GE_CODE_DIR}/ge/graph/load/model_manager/aipp_utils.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/cpu_queue_schedule.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/data_dumper.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/data_inputer.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/davinci_model.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/model_manager.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/model_utils.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/zero_copy_offset.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/zero_copy_task.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/tbe_handle_store.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/task_info/task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/task_info/event_record_task_info.cc"
@@ -433,43 +286,27 @@ set(DISTINCT_GRAPH_LOAD_SRC_FILES
"${GE_CODE_DIR}/ge/graph/load/model_manager/task_info/model_exit_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/task_info/super_kernel/super_kernel.cc"
"${GE_CODE_DIR}/ge/graph/load/model_manager/task_info/super_kernel/super_kernel_factory.cc"
"${GE_CODE_DIR}/ge/model/ge_model.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/common/debug/memory_dumper.cc"
"${GE_CODE_DIR}/ge/executor/ge_executor.cc"
"${GE_CODE_DIR}/ge/common/auth/file_saver.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicpu/aicpu_ext_info.cc"
"${GE_CODE_DIR}/ge/graph/manager/model_manager/event_manager.cc"
)

set(GRAPH_EXECUTE_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/execute/graph_execute.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_manager.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_context.cc"
"${GE_CODE_DIR}/ge/graph/manager/util/rt_context_util.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_context.h"
"${GE_CODE_DIR}/ge/hybrid/hybrid_davinci_model_stub.cc"
)

set(GRAPH_BUILD_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/build/graph_builder.cc"
"${GE_CODE_DIR}/ge/graph/build/task_generator.cc"
"${GE_CODE_DIR}/ge/client/ge_api.cc"
"${GE_CODE_DIR}/ge/session/inner_session.cc"
"${GE_CODE_DIR}/ge/init/gelib.cc"
"${GE_CODE_DIR}/ge/graph/manager/host_mem_manager.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_manager.cc"
"${GE_CODE_DIR}/ge/session/session_manager.cc"
"${GE_CODE_DIR}/ge/engine_manager/dnnengine_manager.cc"
"${GE_CODE_DIR}/ge/session/inner_session.cc"
"${GE_CODE_DIR}/ge/common/dump/dump_server.cc"
"${GE_CODE_DIR}/ge/graph/execute/graph_execute.cc"
"${GE_CODE_DIR}/ge/opskernel_manager/ops_kernel_manager.cc"
"${GE_CODE_DIR}/ge/client/ge_api.cc"
"${GE_CODE_DIR}/ge/plugin/engine/dnnengines.cc"
"${GE_CODE_DIR}/ge/plugin/engine/engine_manage.cc"
"${GE_CODE_DIR}/ge/graph/build/logical_stream_allocator.cc"
"${GE_CODE_DIR}/ge/graph/build/stream_allocator.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/block_mem_assigner.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/binary_block_mem_assigner.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/hybrid_mem_assigner.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/max_block_mem_assigner.cc"
"${GE_CODE_DIR}/ge/model/ge_model.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/common/tbe_kernel_store.cc"
"${GE_CODE_DIR}/ge/common/thread_pool.cc"
"${GE_CODE_DIR}/ge/common/model_parser/model_parser.cc"
"${GE_CODE_DIR}/ge/graph/build/run_context.cc"
"${GE_CODE_DIR}/ge/graph/common/local_context.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_context.cc"
)

set(GRAPH_PASS_COMMON_SRC_FILES
@@ -479,7 +316,6 @@ set(GRAPH_PASS_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/passes/variable_ref_delete_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/atomic_addr_clean_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/constant_folding_pass.cc"
"${GE_CODE_DIR}/parser/parser/tensorflow/iterator_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/iterator_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/net_output_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/print_op_pass.cc"
@@ -512,28 +348,72 @@ set(GRAPH_PASS_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/passes/reshape_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/resource_pair_add_control_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/resource_pair_remove_control_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/remove_same_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/useless_control_out_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/remove_same_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/useless_control_out_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_breadth_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_without_reshape_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_depth_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_nearby_allreduce_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/same_transdata_breadth_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/compile_nodes_pass.cc"
"${GE_CODE_DIR}/ge/graph/common/transop_util.cc"
"${GE_CODE_DIR}/ge/graph/passes/flow_ctrl_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/parallel_group_pass.cc"
#"${GE_CODE_DIR}/ge/graph/optimize/optimizer/allreduce_fusion_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/folding_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transpose_transdata_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_memcpy_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/no_use_reshape_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/infershape_pass.cc"
"${GE_CODE_DIR}/ge/ge_local_engine/engine/host_cpu_engine.cc"
"${GE_CODE_DIR}/ge/analyzer/analyzer.cc"
"${GE_CODE_DIR}/ge/graph/passes/net_output_pass.cc"
"${GE_CODE_DIR}/ge/graph/common/local_context.cc"
"${GE_CODE_DIR}/ge/graph/passes/aicpu_constant_folding_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/assign_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/attach_stream_label_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/bitcast_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/buffer_pool_memory_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cast_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/common_subexpression_elimination_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cond_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cond_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/constant_fuse_same_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/control_trigger_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/ctrl_edge_transfer_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/data_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/end_of_sequence_add_control_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/for_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/fuse_data_nodes_with_common_input_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/global_step_insert_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_continuous_memcpy_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_group_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/hccl_tailing_optimization_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/inplace_support_check_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/input_output_connection_identify_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/link_gen_mask_nodes_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_agnostic_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_graph_unknown_status_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_node_unknown_shape_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/mark_same_addr_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/memcpy_addr_async_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/merge_input_memcpy_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/merge_to_stream_merge_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/multi_batch_clone_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/multi_batch_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/parallel_concat_start_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/ref_identity_delete_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/replace_transshape_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/replace_with_empty_const_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/reshape_recovery_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/set_input_output_offset_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/subexpression_migration_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/subgraph_const_migration_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/subgraph_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_data_edges_bypass.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_dead_branch_elimination.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_to_stream_switch_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/transop_symmetry_elimination_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/unused_args_clean_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_format_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/variable_ref_useless_control_out_delete_pass.cc"
"${GE_CODE_DIR}/ge/graph/preprocess/multi_batch_copy_graph.cc"
)

set(KERNEL_SRC_FILES
@@ -574,6 +454,7 @@ set(KERNEL_SRC_FILES
)

set(SINGLE_OP_SRC_FILES
"${GE_CODE_DIR}/ge/executor/ge_executor.cc"
"${GE_CODE_DIR}/ge/single_op/task/build_task_utils.cc"
"${GE_CODE_DIR}/ge/single_op/task/op_task.cc"
"${GE_CODE_DIR}/ge/single_op/task/tbe_task_builder.cc"
@@ -606,7 +487,6 @@ set(SINGLE_OP_SRC_FILES
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicore/aicore_op_task.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicore/aicore_task_builder.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicore/aicore_task_compiler.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicpu/aicpu_ext_info.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/aicpu/aicpu_node_executor.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc"
"${GE_CODE_DIR}/ge/hybrid/node_executor/ge_local/ge_local_node_executor.cc"
@@ -707,8 +587,9 @@ set(PASS_TEST_FILES
"graph/passes/transpose_transdata_pass_unittest.cc"
"graph/passes/parallel_group_pass_unittest.cc"
"graph/passes/buffer_pool_memory_pass_unittest.cc"
"graph/passes/mark_node_unknown_shape_pass_unittest.cc"
"graph/passes/reshape_recovery_pass_unittest.cc"
"graph/passes/mark_node_unknown_shape_pass_unittest.cc"
"graph/passes/reshape_recovery_pass_unittest.cc"
"graph/passes/atomic_addr_clean_pass_unittest.cc"
)

set(KERNEL_TEST_FILES
@@ -745,17 +626,16 @@ set(KERNEL_TEST_FILES
"graph/passes/folding_kernel/gather_v2_kernel_unittest.cc"
"graph/passes/folding_kernel/slice_kernel_unittest.cc"
"graph/passes/folding_kernel/dynamic_stitch_kernel_unittest.cc"
"graph/passes/atomic_addr_clean_pass_unittest.cc"
)

set(MULTI_PARTS_TEST_FILES
"graph_ir/ge_operator_factory_unittest.cc"
"graph_ir/ge_ir_build_unittest.cc"
"graph_ir/ge_ir_build_unittest.cc"
"graph/transop_util_unittest.cc"
"common/datatype_transfer_unittest.cc"
"common/dump_manager_unittest.cc"
"common/dump_op_unittest.cc"
"common/dump_exception_unittest.cc"
"common/dump_exception_unittest.cc"
"common/opdebug_register_unittest.cc"
"common/format_transfer_unittest.cc"
"common/format_transfer_transpose_unittest.cc"
@@ -774,7 +654,7 @@ set(MULTI_PARTS_TEST_FILES
"common/format_transfer_fracz_nhwc_unittest.cc"
"common/format_transfer_fracz_hwcn_unittest.cc"
"common/ge_format_util_unittest.cc"
"common/ge_auth_file_saver_unittest.cc"
"common/ge_auth_file_saver_unittest.cc"
"graph/variable_accelerate_ctrl_unittest.cc"
"graph/build/logical_stream_allocator_unittest.cc"
"graph/build/model_builder_unittest.cc"
@@ -803,7 +683,7 @@ set(SINGLE_OP_TEST_FILES
"single_op/single_op_manager_unittest.cc"
"single_op/stream_resource_unittest.cc"
"single_op/single_op_task_unittest.cc"
"single_op/single_op_unittest.cc"
"single_op/single_op_unittest.cc"
)

set(PROFILING_MNG_TEST_FILES
@@ -813,7 +693,7 @@ set(PROFILING_MNG_TEST_FILES
set(HYBRID_TEST_FILES
"hybrid/ge_hybrid_unittest.cc"
"hybrid/known_node_executor_unittest.cc"
"hybrid/executor/worker/execution_engine_unittest.cc"
"hybrid/executor/worker/execution_engine_unittest.cc"
)

set(OTHERS_TEST_FILES
@@ -874,7 +754,7 @@ target_link_libraries(ge_ut_common PRIVATE
)

# build common format
add_library(ge_ut_common_format STATIC ${COMMON_SRC_FILES} ${COMMON_FORMAT_SRC_FILES} ${PROTO_HDRS})
add_library(ge_ut_common_format STATIC ${COMMON_FORMAT_SRC_FILES} ${PROTO_HDRS})

target_compile_definitions(ge_ut_common_format PRIVATE
google=ascend_private
@@ -912,57 +792,19 @@ target_link_libraries(ge_prepare_common PRIVATE
json
)

# build graph optimize common
add_library(ge_optimize_common STATIC ${GRAPH_OPTIMIZE_COMMON_SRC_FILES} ${PROTO_HDRS})

target_compile_definitions(ge_optimize_common PRIVATE
google=ascend_private
)

target_compile_options(ge_optimize_common PRIVATE
-g --coverage -fprofile-arcs -ftest-coverage
-Werror=format
)

target_link_libraries(ge_optimize_common PRIVATE
$<BUILD_INTERFACE:intf_pub>
ascend_protobuf
c_sec
json
)

# build graph partition common
add_library(ge_partition_common STATIC ${GRAPH_PARTITION_COMMON_SRC_FILES} ${PROTO_HDRS})

target_compile_definitions(ge_partition_common PRIVATE
google=ascend_private
)

target_compile_options(ge_partition_common PRIVATE
-g --coverage -fprofile-arcs -ftest-coverage
-Werror=format
)

target_link_libraries(ge_partition_common PRIVATE
$<BUILD_INTERFACE:intf_pub>
ascend_protobuf
c_sec
json
)

# build build graph load common
add_library(ge_load_common STATIC ${GRAPH_LOAD_COMMON_SRC_FILES} ${PROTO_HDRS})
add_library(ge_davinci_mode STATIC ${GRAPH_DAVINCI_MODEL_SRC_FILES} ${PROTO_HDRS})

target_compile_definitions(ge_load_common PRIVATE
target_compile_definitions(ge_davinci_mode PRIVATE
google=ascend_private
)

target_compile_options(ge_load_common PRIVATE
target_compile_options(ge_davinci_mode PRIVATE
-g --coverage -fprofile-arcs -ftest-coverage
-Werror=format
)

target_link_libraries(ge_load_common PRIVATE
target_link_libraries(ge_davinci_mode PRIVATE
$<BUILD_INTERFACE:intf_pub>
c_sec
ascend_protobuf
@@ -1051,7 +893,6 @@ target_link_libraries(ge_single_op PRIVATE
# libge_mutiparts_utest
add_executable(ut_libge_multiparts_utest
${COMMON_TEST_FILES}
${COMMON_FORMAT_SRC_FILES}
${MULTI_PARTS_TEST_FILES}
)

@@ -1066,14 +907,15 @@ target_compile_definitions(ut_libge_multiparts_utest PRIVATE

target_link_libraries(ut_libge_multiparts_utest
$<BUILD_INTERFACE:intf_pub>
ge_build_common ge_load_common ge_execute_common ge_optimize_common ge_partition_common ge_prepare_common ge_single_op ge_ut_common
-Wl,--whole-archive
ge_davinci_mode ge_build_common ge_prepare_common ge_pass_common ge_execute_common ge_ut_common_format ge_ut_common
-Wl,--no-whole-archive
gtest gtest_main gmock gmock_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov
)

# libge_others_utest
add_executable(ut_libge_others_utest
${COMMON_TEST_FILES}
${COMMON_FORMAT_SRC_FILES}
${PASS_TEST_FILES}
${EXECUTE_TEST_FILES}
${OTHERS_TEST_FILES}
@@ -1086,16 +928,17 @@ target_compile_options(ut_libge_others_utest PRIVATE

target_link_libraries(ut_libge_others_utest
$<BUILD_INTERFACE:intf_pub>
ge_load_common ge_execute_common ge_ut_common
-Wl,--whole-archive
ge_davinci_mode ge_build_common ge_prepare_common ge_pass_common ge_execute_common ge_ut_common ge_ut_common_format
-Wl,--no-whole-archive
gtest gtest_main gmock gmock_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov
)

# libge_kernel_utest
add_executable(ut_libge_kernel_utest
${COMMON_TEST_FILES}
${COMMON_FORMAT_SRC_FILES}
${KERNEL_TEST_FILES}
${KERNEL_SRC_FILES}
${COMMON_TEST_FILES}
${KERNEL_TEST_FILES}
${KERNEL_SRC_FILES}
)

target_compile_options(ut_libge_kernel_utest PRIVATE
@@ -1105,7 +948,9 @@ target_compile_options(ut_libge_kernel_utest PRIVATE

target_link_libraries(ut_libge_kernel_utest
$<BUILD_INTERFACE:intf_pub>
ge_load_common ge_ut_common
-Wl,--whole-archive
ge_davinci_mode ge_build_common ge_prepare_common ge_pass_common ge_execute_common ge_ut_common ge_ut_common_format
-Wl,--no-whole-archive
gtest gtest_main gmock gmock_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov
)

@@ -1115,7 +960,6 @@ add_executable(ut_libge_distinct_load_utest
${GENERATOR_TEST_FILES}
${EXECUTOR_TEST_FILES}
${DISTINCT_GRAPH_LOAD_TEST_FILES}
${DISTINCT_GRAPH_LOAD_SRC_FILES}
${SINGLE_OP_TEST_FILES}
${PROFILING_MNG_TEST_FILES}
${HYBRID_TEST_FILES}
@@ -1134,8 +978,8 @@ target_compile_definitions(ut_libge_distinct_load_utest PRIVATE
target_link_libraries(ut_libge_distinct_load_utest
${COMMON_SHARED_LIBRARIES}
$<BUILD_INTERFACE:intf_pub>
ge_execute_common ge_ut_common_format ge_load_common
ge_single_op ge_prepare_common
ge_optimize_common ge_build_common ge_partition_common ge_ut_common
-Wl,--whole-archive
ge_davinci_mode ge_build_common ge_prepare_common ge_pass_common ge_single_op ge_ut_common ge_ut_common_format
-Wl,--no-whole-archive
gtest gtest_main gmock gmock_main ascend_protobuf json c_sec -lrt -ldl -lpthread -lgcov
)

+ 1
- 1
tests/ut/ge/graph/load/model_manager_unittest.cc View File

@@ -418,6 +418,6 @@ TEST_F(UtestModelManagerModelManager, test_data_input_tensor) {
vector<InputTensorInfo> inputs;
inputs.emplace_back(input_tensor);
auto ret = mm.DataInputTensor(model_id,inputs);
EXPECT_EQ(UNSUPPORTED, ret);
EXPECT_EQ(PARAM_INVALID, ret); // HybridDavinciModel::impl_ is null.
}
} // namespace ge

Loading…
Cancel
Save