Browse Source

ge ut 4

tags/v1.1.0
t00456437 3 years ago
parent
commit
8ad52ac684
48 changed files with 394 additions and 111 deletions
  1. +25
    -0
      tests/depends/mmpa/src/mmpa_stub.cc
  2. +71
    -0
      tests/depends/runtime/src/runtime_stub.cc
  3. +2
    -0
      tests/depends/slog/src/slog_stub.cc
  4. +197
    -23
      tests/ut/ge/CMakeLists.txt
  5. +7
    -5
      tests/ut/ge/graph/load/data_dumper_unittest.cc
  6. +0
    -1
      tests/ut/ge/graph/load/new_model_manager_davinci_model_unittest.cc
  7. +6
    -3
      tests/ut/ge/graph/load/new_model_manager_model_manager_unittest.cc
  8. +2
    -2
      tests/ut/ge/graph/load/new_op_test_utils.h
  9. +1
    -1
      tests/ut/ge/graph/passes/flow_ctrl_pass_unittest.cc
  10. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/add_kernel_unittest.cc
  11. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/broadcast_args_kernel_unittest.cc
  12. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/broadcast_gradient_args_kernel_unittest.cc
  13. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/cast_kernel_unittest.cc
  14. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/concat_offset_kernel_unittest.cc
  15. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/concat_v2_kernel_unittest.cc
  16. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/dynamic_stitch_kernel_unittest.cc
  17. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/empty_kernel_unittest.cc
  18. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/expanddims_kernel_unittest.cc
  19. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/fill_kernel_unittest.cc
  20. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/floordiv_kernel_unittest.cc
  21. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/floormod_kernel_unittest.cc
  22. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/folding_kernel_unittest_utils.h
  23. +3
    -3
      tests/ut/ge/graph/passes/folding_kernel/gather_v2_kernel_unittest.cc
  24. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/greater_kernel_unittest.cc
  25. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/maximum_kernel_unittest.cc
  26. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/mul_kernel_unittest.cc
  27. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/pack_kernel_unittest.cc
  28. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/permute_kernel_unittest.cc
  29. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/range_kernel_unittest.cc
  30. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/rank_kernel_unittest.cc
  31. +3
    -3
      tests/ut/ge/graph/passes/folding_kernel/reduce_prod_kernel_unittest.cc
  32. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/reformat_kernel_unittest.cc
  33. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/reshape_kernel_unittest.cc
  34. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/rsqrt_kernel_unittest.cc
  35. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/shape_kernel_unittest.cc
  36. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/shape_n_kernel_unittest.cc
  37. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/size_kernel_unittest.cc
  38. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/slice_kernel_unittest.cc
  39. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/squeeze_kernel_unittest.cc
  40. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/ssd_prior_box_kernel_unittest.cc
  41. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/strided_slice_kernel_unittest.cc
  42. +1
    -1
      tests/ut/ge/graph/passes/folding_kernel/sub_kernel_unittest.cc
  43. +2
    -2
      tests/ut/ge/graph/passes/folding_kernel/transdata_kernel_unittest.cc
  44. +17
    -17
      tests/ut/ge/graph/passes/net_output_pass_unittest.cc
  45. +2
    -2
      tests/ut/ge/graph/passes/resource_pair_control_pass_unittest.cc
  46. +1
    -1
      tests/ut/ge/graph/passes/save_pass_unittest.cc
  47. +0
    -1
      tests/ut/ge/graph/passes/switch_pass_unittest.cc
  48. +15
    -7
      tests/ut/ge/graph/passes/unused_and_isolated_op_remove_pass_unittest.cc

+ 25
- 0
tests/depends/mmpa/src/mmpa_stub.cc View File

@@ -247,3 +247,28 @@ INT32 mmGetEnv(const CHAR *name, CHAR *value, UINT32 len)
{
return 0;
}

INT32 mmDlclose(VOID *handle)
{
return 0;
}

CHAR *mmDlerror()
{
return "";
}

INT32 mmDladdr(VOID *addr, mmDlInfo *info)
{
return 0;
}

VOID *mmDlopen(const CHAR *fileName, INT32 mode)
{
return NULL;
}

VOID *mmDlsym(VOID *handle, const CHAR *funcName)
{
return NULL;
}

+ 71
- 0
tests/depends/runtime/src/runtime_stub.cc View File

@@ -307,3 +307,74 @@ rtError_t rtModelBindQueue(rtModel_t model, uint32_t queueId, rtModelQueueFlag_t
{
return RT_ERROR_NONE;
}

rtError_t rtSetSocVersion(const char *version)
{
return RT_ERROR_NONE;
}

rtError_t rtGetSocVersion(char *version, const uint32_t maxLen)
{
return RT_ERROR_NONE;
}

rtError_t rtSetTaskFailCallback(rtTaskFailCallback callback)
{
return RT_ERROR_NONE;
}

rtError_t rtMallocHostSharedMemory(rtMallocHostSharedMemoryIn *in,
rtMallocHostSharedMemoryOut *out)
{
out->ptr = new uint8_t[in->size];
out->devPtr = new uint8_t[in->size];
return RT_ERROR_NONE;
}

rtError_t rtFreeHostSharedMemory(rtFreeHostSharedMemoryIn *in)
{
delete[] (uint8_t*)in->ptr;
delete[] (uint8_t*)in->devPtr;
return RT_ERROR_NONE;
}

rtError_t rtGetAicpuDeploy(rtAicpuDeployType_t *deplyType)
{
return RT_ERROR_NONE;
}

rtError_t rtDebugRegister(rtModel_t model, uint32_t flag, const void *addr, uint32_t *streamId, uint32_t *taskId)
{
return RT_ERROR_NONE;
}

rtError_t rtDebugUnRegister(rtModel_t model)
{
return RT_ERROR_NONE;
}

rtError_t rtDumpAddrSet(rtModel_t model, void *addr, uint32_t dumpSize, uint32_t flag)
{
return RT_ERROR_NONE;
}

rtError_t rtSetCtxINFMode(bool mode)
{
return RT_ERROR_NONE;
}

rtError_t rtLabelCreateEx(rtLabel_t *label, rtStream_t stream)
{
*label = new uint32_t;
return RT_ERROR_NONE;
}

rtError_t rtGetRtCapability(rtFeatureType_t featureType, int32_t featureInfo, int64_t *value)
{
return RT_ERROR_NONE;
}

rtError_t rtGetMaxStreamAndTask(uint32_t streamType, uint32_t *maxStrCount, uint32_t *maxTaskCount)
{
return RT_ERROR_NONE;
}

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

@@ -38,6 +38,8 @@ void DlogWithKVInner(int module_id, int level, KeyValue *pst_kv_array, int kv_nu
dav_log(module_id, fmt);
}

int dlog_setlevel(int module_id, int level, int enable_event) { return DLOG_DEBUG; }

int dlog_getlevel(int module_id, int *enable_event) { return DLOG_DEBUG; }

int CheckLogLevel(int moduleId, int logLevel)


+ 197
- 23
tests/ut/ge/CMakeLists.txt View File

@@ -22,6 +22,7 @@ set(PROTO_LIST
"${GE_CODE_DIR}/metadef/proto/ge_ir.proto"
"${GE_CODE_DIR}/metadef/proto/ge_api.proto"
"${GE_CODE_DIR}/metadef/proto/insert_op.proto"
"${GE_CODE_DIR}/metadef/proto/dump_task.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"
@@ -73,7 +74,6 @@ set(COMMON_SRC_FILES
"${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/node_searcher/need_rebuild_node_searcher.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"
@@ -81,6 +81,8 @@ set(COMMON_SRC_FILES
"${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/anchor.cc"
"${GE_CODE_DIR}/metadef/graph/ge_attr_value.cc"
@@ -126,6 +128,181 @@ set(COMMON_SRC_FILES
"${GE_CODE_DIR}/metadef/register/tensor_assign.cpp"
"${GE_CODE_DIR}/metadef/register/register_format_transfer.cc"
"${GE_CODE_DIR}/metadef/graph/format_refiner.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/new_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/new_model_manager/davinci_model.cc"
"${GE_CODE_DIR}/ge/graph/load/new_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/helper/om_file_helper.cc"
"${GE_CODE_DIR}/ge/model/ge_root_model.cc"
"${GE_CODE_DIR}/ge/common/model_parser/base.cc"
"${GE_CODE_DIR}/ge/graph/load/new_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/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_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/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/memcpy_addr_async_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/set_input_output_offset_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/new_model_manager/model_utils.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/zero_copy_offset.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/zero_copy_task.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/cpu_queue_schedule.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/aipp_utils.cc"
"${GE_CODE_DIR}/ge/omm/csa_interact.cc"
"${GE_CODE_DIR}/ge/graph/load/new_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/ge_ir_build.cc"
"${GE_CODE_DIR}/ge/graph/build/label_allocator.cc"
"${GE_CODE_DIR}/ge/graph/passes/memcpy_addr_async_pass.cc"
"${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/atc_ir_common.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"
"${GE_CODE_DIR}/ge/graph/build/logical_stream_allocator.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/graph_mem_assigner.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/var_mem_assign_util.cc"
"${GE_CODE_DIR}/ge/graph/build/memory/hybrid_mem_assigner.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/max_block_mem_assigner.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/analyzer/analyzer.cc"
"${GE_CODE_DIR}/ge/common/thread_pool.cc"
"${GE_CODE_DIR}/ge/graph/common/transop_util.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_manager_utils.cc"
"${GE_CODE_DIR}/ge/graph/manager/trans_var_data_utils.cc"
"${GE_CODE_DIR}/ge/graph/common/local_context.cc"
"${GE_CODE_DIR}/ge/graph/manager/graph_caching_allocator.cc"
"${GE_CODE_DIR}/ge/graph/manager/rdma_pool_allocator.cc"
"${GE_CODE_DIR}/metadef/register/ops_kernel_builder_registry.cc"
"${GE_CODE_DIR}/metadef/graph/utils/tuning_utils.cc"
)

set(COMMON_FORMAT_SRC_FILES
@@ -133,7 +310,6 @@ set(COMMON_FORMAT_SRC_FILES
"${GE_CODE_DIR}/ge/common/ge_format_util.cc"
"${GE_CODE_DIR}/ge/common/formats/formats.cc"
"${GE_CODE_DIR}/ge/common/formats/format_transfers/datatype_transfer.cc"
#"${GE_CODE_DIR}/ge/common/formats/format_transfers/format_transfer.cc"
"${GE_CODE_DIR}/ge/common/formats/format_transfers/format_transfer_transpose.cc"
"${GE_CODE_DIR}/ge/common/formats/format_transfers/format_transfer_nchw_nc1hwc0.cc"
"${GE_CODE_DIR}/ge/common/formats/format_transfers/format_transfer_fractal_z.cc"
@@ -176,7 +352,9 @@ set(GRAPH_LOAD_COMMON_SRC_FILES
"${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/common/util.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/common/thread_pool.cc"
)

set(DISTINCT_GRAPH_LOAD_SRC_FILES
@@ -193,7 +371,6 @@ set(DISTINCT_GRAPH_LOAD_SRC_FILES
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/davinci_model.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/davinci_model_parser.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/model_manager.cc"
#"${GE_CODE_DIR}/ge/graph/load/new_model_manager/model_output.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/model_utils.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/tbe_handle_store.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/task_info.cc"
@@ -204,7 +381,6 @@ set(DISTINCT_GRAPH_LOAD_SRC_FILES
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/kernel_ex_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/kernel_task_info.cc"
#"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/label_goto_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/label_set_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/memcpy_async_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/profiler_trace_task_info.cc"
@@ -214,7 +390,6 @@ set(DISTINCT_GRAPH_LOAD_SRC_FILES
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/model_exit_task_info.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/super_kernel/super_kernel.cc"
"${GE_CODE_DIR}/ge/graph/load/new_model_manager/task_info/super_kernel/super_kernel_factory.cc"
#"${GE_CODE_DIR}/ge/graph/load/output/output.cc"
"${GE_CODE_DIR}/ge/model/ge_model.cc"
"${GE_CODE_DIR}/ge/common/helper/model_helper.cc"
"${GE_CODE_DIR}/ge/common/helper/om_file_helper.cc"
@@ -222,7 +397,6 @@ set(DISTINCT_GRAPH_LOAD_SRC_FILES
"${GE_CODE_DIR}/ge/executor/ge_executor.cc"
"${GE_CODE_DIR}/ge/common/auth/file_saver.cc"
"${GE_CODE_DIR}/ge/graph/manager/model_manager/event_manager.cc"
#"${GE_CODE_DIR}/ge/graph/manager/custom/custom_op.cc"
)

set(GRAPH_EXECUTE_COMMON_SRC_FILES
@@ -231,13 +405,11 @@ set(GRAPH_EXECUTE_COMMON_SRC_FILES
"${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/common/thread_pool.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/init/gelib.cc"
"${GE_CODE_DIR}/ge/client/ge_api.cc"
"${GE_CODE_DIR}/ge/session/inner_session.cc"
"${GE_CODE_DIR}/ge/session/session_manager.cc"
@@ -253,10 +425,10 @@ set(GRAPH_BUILD_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/common/helper/model_helper.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/base.cc"
"${GE_CODE_DIR}/ge/graph/build/run_context.cc"
"${GE_CODE_DIR}/ge/graph/common/local_context.cc"
#"${GE_CODE_DIR}/ge/graph/build/optimize_stream_graph.cc"
)

set(GRAPH_PASS_COMMON_SRC_FILES
@@ -269,9 +441,6 @@ set(GRAPH_PASS_COMMON_SRC_FILES
"${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/update_net_output_pass.cc"
#"${GE_CODE_DIR}/ge/graph/passes/end_graph_pass.cc"
#"${GE_CODE_DIR}/ge/graph/passes/node_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/print_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/dimension_compute_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/dimension_adjust_pass.cc"
@@ -288,16 +457,13 @@ set(GRAPH_PASS_COMMON_SRC_FILES
"${GE_CODE_DIR}/ge/graph/passes/permute_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/var_is_initialized_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/cast_translate_pass.cc"
#"${GE_CODE_DIR}/ge/graph/passes/dropout_scope_split_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/prune_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/enter_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/next_iteration_pass.cc"
#"${GE_CODE_DIR}/ge/graph/passes/switch_op_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/pass_utils.cc"
"${GE_CODE_DIR}/ge/graph/passes/addn_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/save_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/merge_pass.cc"
#"${GE_CODE_DIR}/ge/graph/passes/switch_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/switch_logic_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/assert_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/dropout_pass.cc"
@@ -318,11 +484,12 @@ set(GRAPH_PASS_COMMON_SRC_FILES
"${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_reshape_op_remove_pass.cc"
"${GE_CODE_DIR}/ge/graph/passes/no_use_reshape_remove_pass.cc"
#"${GE_CODE_DIR}/ge/graph/passes/control_op_attr_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"
)

set(KERNEL_SRC_FILES
@@ -407,7 +574,7 @@ set(PASS_TEST_FILES
"graph/passes/addn_pass_unittest.cc"
"graph/passes/save_pass_unittest.cc"
"graph/passes/merge_pass_unittest.cc"
"graph/passes/switch_pass_unittest.cc"
#"graph/passes/switch_pass_unittest.cc"
"graph/passes/switch_logic_remove_pass_unittest.cc"
"graph/passes/assert_pass_unittest.cc"
"graph/passes/dropout_pass_unittest.cc"
@@ -543,6 +710,13 @@ target_compile_definitions(ge_ut_common_format PRIVATE
google=ascend_private
)

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

# build graph prepare common
add_library(ge_prepare_common STATIC ${GRAPH_PREPARE_COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS})

@@ -670,7 +844,7 @@ 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_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 ${COMMON_SHARED_LIBRARIES} json -lrt -ldl
ge_build_common ge_load_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 ${COMMON_SHARED_LIBRARIES} json -lrt -ldl
)

# libge_others_utest
@@ -683,7 +857,7 @@ add_executable(ut_libge_others_utest
)
target_link_libraries(ut_libge_others_utest
$<BUILD_INTERFACE:intf_pub>
ge_execute_common ge_load_common ge_pass_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} -lrt -ldl
ge_build_common ge_load_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 ${COMMON_SHARED_LIBRARIES} json -lrt -ldl
)

# libge_kernel_utest
@@ -695,7 +869,7 @@ add_executable(ut_libge_kernel_utest
)
target_link_libraries(ut_libge_kernel_utest
$<BUILD_INTERFACE:intf_pub>
ge_pass_common ge_ut_common ge_load_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} -lrt -ldl
ge_build_common ge_load_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 ${COMMON_SHARED_LIBRARIES} json -lrt -ldl
)

# libge_distinct_load_utest
@@ -712,5 +886,5 @@ target_link_libraries(ut_libge_distinct_load_utest
ge_execute_common ge_ut_common ge_ut_common_format ge_pass_common ge_load_common
ge_single_op ge_prepare_common
ge_optimize_common ge_build_common ge_partition_common
gtest gtest_main ascend_protobuf -lrt -ldl -lpthread
gtest gtest_main ascend_protobuf json c_sec -lrt -ldl -lpthread
)

+ 7
- 5
tests/ut/ge/graph/load/data_dumper_unittest.cc View File

@@ -40,20 +40,22 @@ std::vector<void *> stub_get_output_addrs(const RuntimeParam &model_param, Const
}

TEST_F(UtestDataDumper, LoadDumpInfo_no_output_addrs_fail) {
DataDumper data_dumper;
RuntimeParam rts_param;
DataDumper data_dumper(rts_param);
data_dumper.SetModelName("test");
data_dumper.SetModelId(2333);
data_dumper.SetMemory(std::move(RuntimeParam{}));
std::shared_ptr<OpDesc> op_desc_1(new OpDesc());
op_desc_1->AddOutputDesc("test", GeTensorDesc());
data_dumper.SaveDumpTask(0, op_desc_1, 0);

string dump_mode = "output";
data_dumper.dump_properties_.SetDumpMode(dump_mode);
Status ret = data_dumper.LoadDumpInfo();
EXPECT_EQ(ret, PARAM_INVALID);
EXPECT_EQ(ret, SUCCESS);
}

TEST_F(UtestDataDumper, UnloadDumpInfo_success) {
DataDumper data_dumper;
RuntimeParam rts_param
DataDumper data_dumper(rts_param);
data_dumper.SetModelName("test");
data_dumper.SetModelId(2333);



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

@@ -25,7 +25,6 @@
#include "graph/utils/graph_utils.h"
#include "graph/model_serialize.h"
#include "graph/load/new_model_manager/davinci_model.h"
#include "graph/load/new_model_manager/model_output.h"
#include "common/properties_manager.h"
#include "common/op/ge_op_utils.h"
#include <cce/taskdown_api.h>


+ 6
- 3
tests/ut/ge/graph/load/new_model_manager_model_manager_unittest.cc View File

@@ -113,7 +113,7 @@ class DModelListener : public ge::ModelListener {
uint32_t OnComputeDone(uint32_t model_id, uint32_t data_index, uint32_t resultCode) { return 0; }
};

shared_ptr<ge::ModelListener> UTEST_CALL_BACK_FUN(new DModelListener());
shared_ptr<ModelListener> UTEST_CALL_BACK_FUN(new DModelListener());

TEST_F(UtestModelManagerModelManager, case_load_incorrect_param) {
ModelManager mm;
@@ -164,7 +164,7 @@ TEST_F(UtestModelManagerModelManager, case_load_model_encypt_type_unsupported) {
delete[](uint8_t *) data.model_data;
}

shared_ptr<ge::ModelListener> LabelCallBack(new DModelListener());
shared_ptr<ModelListener> LabelCallBack(new DModelListener());

// test HandleCommand
TEST_F(UtestModelManagerModelManager, command_success1) {
@@ -306,6 +306,8 @@ TEST_F(UtestModelManagerModelManager, get_input_output_desc_info_fail) {
EXPECT_EQ(ge::PARAM_INVALID, manager.GetInputOutputDescInfo(2, input_shape, output_shape));
}


/*
// test GetInputOutputDescInfo fail
TEST_F(UtestModelManagerModelManager, get_input_output_desc_info_zero_copy_fail) {
ModelManager manager;
@@ -314,6 +316,7 @@ TEST_F(UtestModelManagerModelManager, get_input_output_desc_info_zero_copy_fail)
vector<InputOutputDescInfo> output_shape;
EXPECT_EQ(ge::PARAM_INVALID, manager.GetInputOutputDescInfoForZeroCopy(2, input_shape, output_shape));
}
*/

// test Stop
TEST_F(UtestModelManagerModelManager, stop_fail) {
@@ -324,7 +327,7 @@ TEST_F(UtestModelManagerModelManager, stop_fail) {

// build input_data
TEST_F(UtestModelManagerModelManager, check_data_len_success) {
shared_ptr<ge::ModelListener> g_label_call_back(new DModelListener());
shared_ptr<ModelListener> g_label_call_back(new DModelListener());
DavinciModel model(0, g_label_call_back);
ModelManager model_manager;
ge::InputData input_data;


+ 2
- 2
tests/ut/ge/graph/load/new_op_test_utils.h View File

@@ -151,7 +151,7 @@ class OmeTestOpUtils {
ge::Model::Load((uint8_t *)data.model_data, data.model_len, *model_);

GeModelPtr ge_model;
ModelHelper::TransModelToGeModel(model_, ge_model);
TransModelToGeModel(model_, ge_model);
davinciModel.Assign(ge_model);

if (data.model_data != nullptr) {
@@ -178,7 +178,7 @@ class OmeTestOpUtils {
model->SetGraph(graph);

GeModelPtr ge_model;
ModelHelper::TransModelToGeModel(model, ge_model);
TransModelToGeModel(model, ge_model);

davinciModel.Assign(ge_model);
}


+ 1
- 1
tests/ut/ge/graph/passes/flow_ctrl_pass_unittest.cc View File

@@ -38,7 +38,7 @@ class UtestGraphPassesFlowCtrlPass : public testing::Test {
EXPECT_EQ(SUCCESS, ge::VarManager::Instance(0)->Init(session_version, session_id, device_id, job_id));
}

void TearDown() { VarManagerPool::Instance().Destroy(); }
void TearDown() { VarManagerPool::Instance().Destory(); }

public:
/// Set up a graph with the following network structure


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/add_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/add_kernel.h"
#include "host_kernels/add_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/broadcast_args_kernel_unittest.cc View File

@@ -31,7 +31,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/broadcast_args_kernel.h"
#include "host_kernels/broadcast_args_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/broadcast_gradient_args_kernel_unittest.cc View File

@@ -31,7 +31,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/broadcast_gradient_args_kernel.h"
#include "host_kernels/broadcast_gradient_args_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/cast_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/cast_kernel.h"
#include "host_kernels/cast_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -28,7 +28,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/concat_offset_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/concat_offset_kernel.h"
#include "host_kernels/concat_offset_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -28,7 +28,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/concat_v2_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/concat_v2_kernel.h"
#include "host_kernels/concat_v2_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -28,7 +28,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/dynamic_stitch_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/dynamic_stitch_kernel.h"
#include "host_kernels/dynamic_stitch_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -27,7 +27,7 @@
#include "common/op/attr_value_util.h"
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/empty_kernel_unittest.cc View File

@@ -31,7 +31,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/empty_kernel.h"
#include "host_kernels/empty_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/expanddims_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/expanddims_kernel.h"
#include "host_kernels/expanddims_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/fill_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/fill_kernel.h"
#include "host_kernels/fill_kernel.h"

#include "common/debug/log.h"
#include "common/fp16_t.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/floordiv_kernel_unittest.cc View File

@@ -18,13 +18,13 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/floordiv_kernel.h"
#include "host_kernels/floordiv_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
#include "common/op/ge_op_utils.h"
#include "common/types.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/floormod_kernel_unittest.cc View File

@@ -20,7 +20,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/floormod_kernel.h"
#include "host_kernels/floormod_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/folding_kernel_unittest_utils.h View File

@@ -27,7 +27,7 @@
#include "graph/debug/ge_attr_define.h"
#include "graph/operator.h"
#include "graph/passes/constant_folding_pass.h"
#include "graph/passes/folding_kernel/broadcast_args_kernel.h"
#include "host_kernels/broadcast_args_kernel.h"
#include "inc/kernel_factory.h"
#include "shape_refiner.h"



+ 3
- 3
tests/ut/ge/graph/passes/folding_kernel/gather_v2_kernel_unittest.cc View File

@@ -19,7 +19,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/gather_v2_kernel.h"
#include "host_kernels/gather_v2_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -29,7 +29,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"
@@ -984,4 +984,4 @@ TEST_F(UtestGraphPassesFoldingKernelGatherV2Kernel, AbnormalTest) {
status = kernel->Compute(op_desc_ptr, input_7, outputs);
EXPECT_NE(ge::SUCCESS, status);
}
}
}

+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/greater_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/greater_kernel.h"
#include "host_kernels/greater_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/maximum_kernel_unittest.cc View File

@@ -20,7 +20,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/maximum_kernel.h"
#include "host_kernels/maximum_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/mul_kernel_unittest.cc View File

@@ -20,7 +20,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/mul_kernel.h"
#include "host_kernels/mul_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/pack_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/pack_kernel.h"
#include "host_kernels/pack_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -28,7 +28,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/permute_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/permute_kernel.h"
#include "host_kernels/permute_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -28,7 +28,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/range_kernel_unittest.cc View File

@@ -20,7 +20,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/range_kernel.h"
#include "host_kernels/range_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/rank_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/rank_kernel.h"
#include "host_kernels/rank_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 3
- 3
tests/ut/ge/graph/passes/folding_kernel/reduce_prod_kernel_unittest.cc View File

@@ -18,14 +18,14 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/reduce_prod_kernel.h"
#include "host_kernels/reduce_prod_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
#include "common/op/ge_op_utils.h"
#include "common/types.h"
#include "graph/passes/folding_kernel/concat_v2_kernel.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/concat_v2_kernel.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/reformat_kernel_unittest.cc View File

@@ -16,12 +16,12 @@

#include <gtest/gtest.h>

#include "graph/passes/folding_kernel/reformat_kernel.h"
#include "host_kernels/reformat_kernel.h"

#include "common/debug/log.h"
#include "common/ge_inner_error_codes.h"
#include "common/types.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/reshape_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/reshape_kernel.h"
#include "host_kernels/reshape_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/rsqrt_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/rsqrt_kernel.h"
#include "host_kernels/rsqrt_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/shape_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/shape_kernel.h"
#include "host_kernels/shape_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/shape_n_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/shape_n_kernel.h"
#include "host_kernels/shape_n_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/size_kernel_unittest.cc View File

@@ -19,7 +19,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/size_kernel.h"
#include "host_kernels/size_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/slice_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/slice_kernel.h"
#include "host_kernels/slice_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/squeeze_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/squeeze_kernel.h"
#include "host_kernels/squeeze_kernel.h"

#include "../graph_builder_utils.h"
#include "common/debug/log.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/ssd_prior_box_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/ssd_prior_box_kernel.h"
#include "host_kernels/ssd_prior_box_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/strided_slice_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/strided_slice_kernel.h"
#include "host_kernels/strided_slice_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -28,7 +28,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 1
- 1
tests/ut/ge/graph/passes/folding_kernel/sub_kernel_unittest.cc View File

@@ -18,7 +18,7 @@

#define protected public
#define private public
#include "graph/passes/folding_kernel/sub_kernel.h"
#include "host_kernels/sub_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"


+ 2
- 2
tests/ut/ge/graph/passes/folding_kernel/transdata_kernel_unittest.cc View File

@@ -16,7 +16,7 @@

#include <gtest/gtest.h>

#include "graph/passes/folding_kernel/transdata_kernel.h"
#include "host_kernels/transdata_kernel.h"

#include "common/debug/log.h"
#include "common/debug/memory_dumper.h"
@@ -26,7 +26,7 @@
#include "common/types.h"
#include "graph/debug/ge_attr_define.h"
#include "graph/passes/dimension_compute_pass.h"
#include "graph/passes/folding_kernel/kernel_utils.h"
#include "host_kernels/kernel_utils.h"
#include "graph/types.h"
#include "graph/utils/attr_utils.h"
#include "graph/utils/graph_utils.h"


+ 17
- 17
tests/ut/ge/graph/passes/net_output_pass_unittest.cc View File

@@ -155,7 +155,7 @@ TEST_F(UtestGraphPassesNetOutputPass, add_ctrl_edge_for_netout_from_leaf_success
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{relu3, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -200,7 +200,7 @@ TEST_F(UtestGraphPassesNetOutputPass, only_target_node_success) {
std::vector<ge::NodePtr> target_nodes = {mul1, mul2};
compute_graph->SetGraphTargetNodesInfo(target_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -256,7 +256,7 @@ TEST_F(UtestGraphPassesNetOutputPass, targets_with_retval_success) {
}

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -300,7 +300,7 @@ TEST_F(UtestGraphPassesNetOutputPass, output_node_and_target_node_no_duplicate_s
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{relu3, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -348,7 +348,7 @@ TEST_F(UtestGraphPassesNetOutputPass, output_node_and_target_node_duplicate_succ
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{mul1, 0}, {mul2, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -398,7 +398,7 @@ TEST_F(UtestGraphPassesNetOutputPass, net_output_node_and_target_node_success) {
compute_graph->SetGraphTargetNodesInfo(target_nodes);

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -462,7 +462,7 @@ TEST_F(UtestGraphPassesNetOutputPass, net_output_node_and_output_nodes_and_targe
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{mul1, 0}, {mul2, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -518,7 +518,7 @@ TEST_F(UtestGraphPassesNetOutputPass, net_output_node_and_output_nodes_and_targe
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{mul1, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -582,7 +582,7 @@ TEST_F(UtestGraphPassesNetOutputPass, net_output_node_and_output_nodes_and_targe
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{mul1, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
// check contain netoutput
@@ -626,7 +626,7 @@ TEST_F(UtestGraphPassesNetOutputPass, no_output_no_target_no_retval_success) {
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{mul1, 0}, {mul2, 0}};
compute_graph->SetGraphOutNodesInfo(output_nodes);
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
}
@@ -641,7 +641,7 @@ TEST_F(UtestGraphPassesNetOutputPass, user_out_node_success) {
compute_graph->SetGraphOutNodesInfo(output_nodes);

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
NodePtr net_out_node = compute_graph->FindNode(NODE_NAME_NET_OUTPUT);
@@ -687,7 +687,7 @@ TEST_F(UtestGraphPassesNetOutputPass, retval_node_for_out_success) {
}

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
NodePtr net_out_node = compute_graph->FindNode(NODE_NAME_NET_OUTPUT);
@@ -737,7 +737,7 @@ TEST_F(UtestGraphPassesNetOutputPass, check_order_and_const_flag_success) {
GraphUtils::AddEdge(mul2->GetOutDataAnchor(0), retval_node2->GetInDataAnchor(0));

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
NodePtr net_out_node = compute_graph->FindNode(NODE_NAME_NET_OUTPUT);
@@ -775,7 +775,7 @@ TEST_F(UtestGraphPassesNetOutputPass, out_node_check_fail) {
compute_graph->SetGraphOutNodesInfo(output_nodes_invalid_name);

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::INTERNAL_ERROR);
NodePtr net_out_node = compute_graph->FindNode(NODE_NAME_NET_OUTPUT);
@@ -817,7 +817,7 @@ TEST_F(UtestGraphPassesNetOutputPass, retval_node_check_fail) {
}

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::INTERNAL_ERROR);
NodePtr net_out_node = compute_graph->FindNode(NODE_NAME_NET_OUTPUT);
@@ -832,7 +832,7 @@ TEST_F(UtestGraphPassesNetOutputPass, out_node_update_desc_check_fail) {
EXPECT_NE(netout_node, nullptr);

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::INTERNAL_ERROR);
}
@@ -852,7 +852,7 @@ TEST_F(UtestGraphPassesNetOutputPass, out_node_remove_check_fail) {
EXPECT_EQ(mul1, nullptr);

ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) NetOutputPass);
pass_managers.AddPass("", new (std::nothrow) NetOutputPass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
}


+ 2
- 2
tests/ut/ge/graph/passes/resource_pair_control_pass_unittest.cc View File

@@ -68,7 +68,7 @@ TEST_F(UtestResourcePairControlPass, resource_pair_control) {
EXPECT_EQ(stackpop0->GetInControlNodes().size(), 0);

ResourcePairAddControlPass add_pass;
vector<GraphPass*> passes = {&add_pass};
std::vector<std::pair<string, GraphPass*>> passes = { {"", &add_pass} };
EXPECT_EQ(PassManager::Run(graph, passes), SUCCESS);

auto stackpush1 = graph->FindNode("stackpush1");
@@ -80,7 +80,7 @@ TEST_F(UtestResourcePairControlPass, resource_pair_control) {
EXPECT_EQ(stackpop1->GetInControlNodes().at(0)->GetName(), "stackpush1");

ResourcePairRemoveControlPass remove_pass;
passes = {&remove_pass};
passes = { {"", &remove_pass} };
EXPECT_EQ(PassManager::Run(graph, passes), SUCCESS);

auto stackpush2 = graph->FindNode("stackpush1");


+ 1
- 1
tests/ut/ge/graph/passes/save_pass_unittest.cc View File

@@ -70,7 +70,7 @@ ge::ComputeGraphPtr CreateSaveGraph() {
TEST_F(UtestGraphPassesSavePass, cover_run_success) {
ge::ComputeGraphPtr compute_graph = CreateSaveGraph();
ge::PassManager pass_managers;
pass_managers.AddPass(new (std::nothrow) SavePass);
pass_managers.AddPass("", new (std::nothrow) SavePass);
Status status = pass_managers.Run(compute_graph);
EXPECT_EQ(status, ge::SUCCESS);
}

+ 0
- 1
tests/ut/ge/graph/passes/switch_pass_unittest.cc View File

@@ -19,7 +19,6 @@
#include <string>

#define private public
#include "graph/passes/switch_pass.h"

#include "common/ge_inner_error_codes.h"
#include "inc/pass_manager.h"


+ 15
- 7
tests/ut/ge/graph/passes/unused_and_isolated_op_remove_pass_unittest.cc View File

@@ -106,7 +106,9 @@ TEST_F(UtestGraphPassesUnusedAndIsolatedOpRemovePass, transpose_and_conv) {

ge::UnusedOpRemovePass unused_pass(TENSORFLOW);
ge::IsolatedOpRemovePass isolate_pass;
vector<GraphPass *> passes = {&unused_pass, &isolate_pass};
std::vector<std::pair<string, GraphPass*>> passes;
passes.emplace_back("", &isolate_pass);
passes.emplace_back("", &unused_pass);
Status status = PassManager::Run(graph, passes);
EXPECT_EQ(SUCCESS, status);
NodePtr found_node0 = graph->FindNode("transpose1");
@@ -132,9 +134,11 @@ TEST_F(UtestGraphPassesUnusedAndIsolatedOpRemovePass, transpose_and_conv3) {
NodePtr conv2_node = AddNode(graph, "conv2", CONVOLUTION);
GraphUtils::AddEdge(conv_node->GetOutDataAnchor(0), conv2_node->GetInDataAnchor(0));

ge::UnusedOpRemovePass unused_pass(FMK_TYPE_T);
ge::UnusedOpRemovePass unused_pass(TENSORFLOW);
ge::IsolatedOpRemovePass isolate_pass;
vector<GraphPass *> passes = {&unused_pass, &isolate_pass};
std::vector<std::pair<string, GraphPass*>> passes;
passes.emplace_back("", &isolate_pass);
passes.emplace_back("", &unused_pass);
Status status = PassManager::Run(graph, passes);
EXPECT_EQ(SUCCESS, status);
NodePtr found_node0 = graph->FindNode("transpose1");
@@ -155,9 +159,11 @@ TEST_F(UtestGraphPassesUnusedAndIsolatedOpRemovePass, cast_and_cast) {
GraphUtils::AddEdge(conv3_node->GetOutDataAnchor(0), transpose_node->GetInDataAnchor(0));
GraphUtils::AddEdge(transpose_node->GetOutDataAnchor(0), transpose_node_1->GetInDataAnchor(0));

ge::UnusedOpRemovePass unused_pass(FMK_TYPE_T);
ge::UnusedOpRemovePass unused_pass(TENSORFLOW);
ge::IsolatedOpRemovePass isolate_pass;
vector<GraphPass *> passes = {&unused_pass, &isolate_pass};
std::vector<std::pair<string, GraphPass*>> passes;
passes.emplace_back("", &isolate_pass);
passes.emplace_back("", &unused_pass);
Status status = PassManager::Run(graph, passes);
EXPECT_EQ(SUCCESS, status);
}
@@ -175,9 +181,11 @@ TEST_F(UtestGraphPassesUnusedAndIsolatedOpRemovePass, remove_parent_node) {
GraphUtils::AddEdge(conv3_node->GetOutDataAnchor(0), transpose_node->GetInDataAnchor(0));
GraphUtils::AddEdge(transpose_node->GetOutDataAnchor(0), transpose_node_1->GetInDataAnchor(0));

ge::UnusedOpRemovePass unused_pass(FMK_TYPE_T);
ge::UnusedOpRemovePass unused_pass(TENSORFLOW);
ge::IsolatedOpRemovePass isolate_pass;
vector<GraphPass *> passes = {&unused_pass, &isolate_pass};
std::vector<std::pair<string, GraphPass*>> passes;
passes.emplace_back("", &isolate_pass);
passes.emplace_back("", &unused_pass);
Status status = PassManager::Run(graph, passes);
EXPECT_EQ(SUCCESS, status);
}

Loading…
Cancel
Save