@@ -528,7 +528,6 @@ uint32_t Fusion(ComputeGraphPtr model_graph, ComputeGraphPtr fusion_graph, kScop | |||
int stream_num = 1; | |||
int flag = 0; | |||
// make_graph_nd(graph); | |||
NodePtr node_a = fusion_graph->AddNode(op_def_a); | |||
NodePtr node_b = fusion_graph->AddNode(op_def_b); | |||
@@ -746,7 +746,6 @@ int TestBuildGraphTest(Func fun, Graph &graph, vector<ge::Tensor> &inputs, vecto | |||
shapeTensor.SetTensorDesc(shape_desc); | |||
vector<float> dataValuec; | |||
for (int i = 0; i < sizeshape; i++) { | |||
// dataValuec.push_back((float)(i%255)); | |||
dataValuec.push_back(1); | |||
} | |||
@@ -764,7 +763,6 @@ int TestBuildGraphTest(Func fun, Graph &graph, vector<ge::Tensor> &inputs, vecto | |||
} | |||
shapeTensor1.SetData((uint8_t *)dataValuec1.data(), 4 * sizeshape1); | |||
// inputs.push_back(shapeTensor1); | |||
return 0; | |||
} | |||
@@ -69,12 +69,10 @@ TEST_F(UtestGeModelUnittest, save_model_to_file_success) { | |||
ge::Graph ge_graph = ge::GraphUtils::CreateGraphFromComputeGraph(compute_graph); | |||
string file_name = "model_data.pb"; | |||
setenv("DUMP_MODEL", "1", true); | |||
// EXPECT_EQ(ge_graph.SaveToFile(file_name), GRAPH_FAILED); | |||
setenv("DUMP_MODEL", "0", true); | |||
} | |||
TEST_F(UtestGeModelUnittest, load_model_from_file_success) { | |||
ge::Graph ge_graph; | |||
string file_name = "model_data.pb"; | |||
// EXPECT_EQ(ge_graph.LoadFromFile(file_name), GRAPH_SUCCESS); | |||
} |
@@ -182,8 +182,6 @@ TEST_F(UtestModelManagerDavinciModel, contruct_modeldef_createfail) { | |||
ge::AttrUtils::SetListInt(op_desc, ge::POOLING_ATTR_WINDOW, vector<int>({1, 1})); | |||
ge::AttrUtils::SetListInt(op_desc, ge::POOLING_ATTR_STRIDE, vector<int>({1, 1})); | |||
// EXPECT_EQ(ge::SUCCESS, model.Init()); | |||
model.GetEventList(); | |||
} | |||
@@ -200,7 +198,6 @@ TEST_F(UtestModelManagerDavinciModel, copy_input_data_to_model_fail) { | |||
input_data.blobs.push_back(data_buffer); | |||
model.op_list_.clear(); | |||
// EXPECT_EQ(ge::PARAM_INVALID, model.CopyInputDataToModel(input_data.blobs, 0)); | |||
delete[](char *) data_buffer.data; | |||
} | |||
@@ -210,7 +207,6 @@ TEST_F(UtestModelManagerDavinciModel, streamnum_success) { | |||
DavinciModel *model = new DavinciModel(0, g_label_call_back); | |||
OmeTestOpUtils::InitModel(*model); | |||
// EXPECT_EQ(ge::SUCCESS, model->Init()); | |||
EXPECT_EQ(0, model->StreamNum()); | |||
EXPECT_EQ(ge::INTERNAL_ERROR, model->ModelRunStart()); | |||
@@ -226,8 +222,6 @@ TEST_F(UtestModelManagerDavinciModel, eventnum_success) { | |||
OmeTestOpUtils::InitModel(*model); | |||
// EXPECT_EQ(ge::SUCCESS, model->Init()); | |||
EXPECT_EQ(0, model->EventNum()); | |||
EXPECT_EQ(ge::INTERNAL_ERROR, model->ModelRunStart()); | |||
@@ -241,8 +235,6 @@ TEST_F(UtestModelManagerDavinciModel, handlelist_success) { | |||
OmeTestOpUtils::InitModel(*model); | |||
// EXPECT_EQ(ge::SUCCESS, model->Init()); | |||
EXPECT_EQ(ge::INTERNAL_ERROR, model->ModelRunStart()); | |||
EXPECT_EQ(ge::SUCCESS, model->ModelRunStop()); | |||
@@ -256,8 +248,6 @@ TEST_F(UtestModelManagerDavinciModel, eventlist_success) { | |||
OmeTestOpUtils::InitModel(*model); | |||
// EXPECT_EQ(ge::SUCCESS, model->Init()); | |||
EXPECT_EQ(true, model->GetEventList().empty()); | |||
EXPECT_EQ(ge::INTERNAL_ERROR, model->ModelRunStart()); | |||
@@ -282,7 +272,6 @@ TEST_F(UtestModelManagerDavinciModel, failed_reset_device) { | |||
TEST_F(UtestModelManagerDavinciModel, init_not_support_priority) { | |||
int32_t priority = 8; | |||
DavinciModel model(priority, g_label_call_back); | |||
// EXPECT_EQ(ge::PARAM_INVALID, model.Init()); | |||
} | |||
// test GetInputOutputDescInfo | |||
@@ -346,7 +335,6 @@ TEST_F(UtestModelManagerDavinciModel, CopyTensorFromSrcVarNode_success) { | |||
NodePtr dst_node = graph->AddNode(op_desc_ptr); | |||
DavinciModel model(0, g_label_call_back); | |||
Status ret = model.CopyTensorFromSrcVarNode(src_node, dst_node); | |||
// EXPECT_EQ(SUCCESS, ret); | |||
} | |||
TEST_F(UtestModelManagerDavinciModel, CopyVarData_graph_is_nullptr) { | |||
@@ -370,7 +358,6 @@ TEST_F(UtestModelManagerDavinciModel, copy_var_data_success) { | |||
DavinciModel model(0, g_label_call_back); | |||
Status ret = model.CopyVarData(graph); | |||
// EXPECT_EQ(SUCCESS, ret); | |||
} | |||
TEST_F(UtestModelManagerDavinciModel, get_input_output_desc_info_without_data_op_list) { | |||
@@ -540,7 +527,6 @@ TEST_F(UtestModelManagerDavinciModel, get_flow_ctrl_op_list_success) { | |||
std::map<uint32_t, uint32_t> flowctrl_op_index_internal_map; | |||
flowctrl_op_index_internal_map.insert(pair<uint32_t, uint32_t>(1, 1)); | |||
model.flowctrl_op_index_internal_map_ = flowctrl_op_index_internal_map; | |||
// EXPECT_EQ(flowctrl_op_index_internal_map_, model.GetFlowctrlOpList()); | |||
} | |||
// test SetFlowctrlOpList | |||
@@ -1204,10 +1190,8 @@ TEST_F(UtestModelManagerDavinciModel, profiling_model_success) { | |||
input_data.index = 0; | |||
input_data.model_id = 1; | |||
input_data.blobs.push_back(data_buffer); | |||
// model.SinkModelProfile(&model); | |||
rtFreeHost(data.model_data); | |||
// delete stream; | |||
delete[](char *) data_buffer.data; | |||
delete model_def; | |||
} | |||
@@ -76,7 +76,6 @@ class OmeTestOpUtils { | |||
return nullptr; | |||
} | |||
// return std::make_shared<ge::Node>(op_desc, nullptr); | |||
auto g = std::make_shared<ge::ComputeGraph>("g"); | |||
return g->AddNode(std::move(op_desc)); | |||
} | |||
@@ -403,8 +402,6 @@ class OmeTestOpDescBuilder { | |||
if (SUCCESS != res) { | |||
GELOGE(ge::FAILED, "Finish: GraphUtils::AddEdge failed"); | |||
} | |||
// ge::NodePtr src_node = node->GetOwnerComputeGraph()->AddNodeFront(src_op_desc); | |||
// node->AddLinkFrom(src_node); | |||
} | |||
{ | |||
@@ -434,8 +431,6 @@ class OmeTestOpDescBuilder { | |||
vector<ge::GeTensorPtr> weights_; | |||
int64_t eventId_ = -1; | |||
int64_t scopeid_ = -1; | |||
// std::shared_ptr<ge::ComputeGraph> graph_; | |||
}; | |||
#endif // OME_REBUILD_OME_OP_TEST_UTILS_H |
@@ -122,7 +122,6 @@ TEST_F(UtestGraphPassesDimensionAdjustPass, node_get_original_type_failed) { | |||
std::shared_ptr<DimensionAdjustPass> pass = make_shared<DimensionAdjustPass>(); | |||
ge::Status ret = pass->Run(op_node); | |||
// EXPECT_EQ(ge::SUCCESS, ret); | |||
} | |||
TEST_F(UtestGraphPassesDimensionAdjustPass, node_not_register_op) { | |||
@@ -93,7 +93,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test2) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test3) { | |||
@@ -123,7 +122,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test3) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test4) { | |||
@@ -154,7 +152,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test4) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test5) { | |||
@@ -186,7 +183,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test5) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test6) { | |||
@@ -219,7 +215,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test6) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test7) { | |||
@@ -253,7 +248,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test7) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test8) { | |||
@@ -288,7 +282,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test8) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test9) { | |||
@@ -322,7 +315,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test9) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test10) { | |||
@@ -357,7 +349,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test10) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test11) { | |||
@@ -392,7 +383,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test11) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test12) { | |||
@@ -427,7 +417,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test12) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test13) { | |||
@@ -462,7 +451,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test13) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test14) { | |||
@@ -497,7 +485,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test14) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test15) { | |||
@@ -532,7 +519,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test15) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test16) { | |||
@@ -567,7 +553,6 @@ TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test16) { | |||
shared_ptr<Kernel> kernel = KernelFactory::Instance().Create(STRIDEDSLICE); | |||
ge::Status status = kernel->Compute(op_desc_ptr, input, outputs); | |||
// EXPECT_EQ(PARAM_INVALID, status); | |||
} | |||
TEST_F(UtestGraphPassesFoldingKernelStridedSliceKernel, Test17) { | |||
@@ -167,7 +167,6 @@ TEST_F(UtestGraphPassesGuaranteeConstPass, get_origenal_type_fail) { | |||
string type2 = "FrameworkOp"; | |||
node->GetOpDesc()->SetType(type2); | |||
ge::Status ret = guarantee_const_op_remove_pass_->Run(node); | |||
// EXPECT_EQ(ge::SUCCESS, ret); | |||
} | |||
TEST_F(UtestGraphPassesGuaranteeConstPass, int32_success_6) { | |||
@@ -135,7 +135,6 @@ TEST_F(UtestIdentityPass, succ) { | |||
string type2 = "FrameworkOp"; | |||
node->GetOpDesc()->SetType(type2); | |||
status = pass.Run(node); | |||
// EXPECT_EQ(ge::SUCCESS, status); | |||
NodePtr node_err = AddNode(graph, "Identity", IDENTITY, 1, 2); | |||
status = pass.Run(node_err); | |||
@@ -845,7 +845,6 @@ TEST_F(UtestGraphPassesNetOutputPass, out_node_remove_check_fail) { | |||
ge::NodePtr mul2 = compute_graph->FindNode("Mul2"); | |||
std::vector<std::pair<ge::NodePtr, int32_t>> output_nodes = {{mul1, 0}, {mul2, 0}}; | |||
compute_graph->SetGraphOutNodesInfo(output_nodes); | |||
// compute_graph->RemoveNode(mul1); | |||
mul1->GetInDataAnchor(0)->UnlinkAll(); | |||
mul1->GetInDataAnchor(1)->UnlinkAll(); | |||
GraphUtils::RemoveNodeWithoutRelink(compute_graph, mul1); | |||
@@ -75,5 +75,4 @@ TEST_F(UtestPlaceholderWithDefaultPass, succ) { | |||
string type2 = "FrameworkOp"; | |||
node->GetOpDesc()->SetType(type2); | |||
pass.Run(node); | |||
// EXPECT_EQ(ge::SUCCESS, status); | |||
} |
@@ -75,5 +75,4 @@ TEST_F(UtestPreventGradientPass, succ) { | |||
string type2 = "FrameworkOp"; | |||
node->GetOpDesc()->SetType(type2); | |||
status = pass.Run(node); | |||
// EXPECT_EQ(ge::SUCCESS, status); | |||
} |
@@ -178,6 +178,5 @@ TEST_F(UtestReshapeRemovePass, reshape_remove_without_const) { | |||
EXPECT_EQ(var1->GetOutDataNodes().at(0)->GetName(), "transdata1"); | |||
EXPECT_NE(const1, nullptr); | |||
EXPECT_EQ(const1->GetOutNodes().size(), 1); | |||
// EXPECT_EQ(const1->GetOutDataNodes().at(0)->GetName(), "transdata2"); | |||
} | |||
} // namespace ge |
@@ -78,5 +78,4 @@ TEST_F(UtestSnapshotPass, succ) { | |||
string type2 = "FrameworkOp"; | |||
snapshot->GetOpDesc()->SetType(type2); | |||
status = pass.Run(snapshot); | |||
// EXPECT_EQ(ge::SUCCESS, status); | |||
} |
@@ -176,7 +176,6 @@ TEST_F(UtestGraphPassesStopGradientPass, get_origenal_type_fail) { | |||
string type2 = "FrameworkOp"; | |||
node->GetOpDesc()->SetType(type2); | |||
ge::Status ret = pass_->Run(node); | |||
// EXPECT_EQ(ge::SUCCESS, ret); | |||
} | |||
TEST_F(UtestGraphPassesStopGradientPass, size_check_fail) { | |||
vector<int64_t> dims_vec_0 = {8, 2}; | |||
@@ -256,7 +256,6 @@ TEST_F(UtestGraphPassesSwitchPass, inactive_output_not_exists) { | |||
output_true_node_->GetOutDataAnchor(0)->UnlinkAll(); | |||
GraphUtils::RemoveNodeWithoutRelink(graph_, output_true_node_); | |||
switch_node_->GetOutDataAnchor(1)->UnlinkAll(); | |||
// switch_node_->outDataAnchors_.pop_back(); | |||
/// input | |||
/// | | |||
@@ -394,7 +393,6 @@ TEST_F(UtestGraphPassesSwitchPass, dead_output_connected_to_merge) { | |||
/// Merge | |||
bool pred_value = true; | |||
BuildDefaultGraph(false, &pred_value); | |||
// graph_->RemoveNode(output_false_node_); | |||
output_false_node_->GetOutDataAnchor(0)->UnlinkAll(); | |||
GraphUtils::RemoveNodeWithoutRelink(graph_, output_false_node_); | |||
switch_node_->GetOutDataAnchor(0)->UnlinkAll(); | |||
@@ -106,7 +106,6 @@ TEST_F(UtestGraphPassesUnusedAndIsolatedOpRemovePass, transpose_and_conv) { | |||
Status status = PassManager::Run(graph, passes); | |||
EXPECT_EQ(SUCCESS, status); | |||
NodePtr found_node0 = graph->FindNode("transpose1"); | |||
// EXPECT_EQ(nullptr, found_node0); | |||
NodePtr found_node = graph->FindNode("conv1"); | |||
EXPECT_EQ(conv_node, found_node); | |||
} | |||
@@ -343,8 +343,6 @@ bool BuildComputeGraph0(ge::ComputeGraphPtr &graph) { | |||
if (ge::GraphUtils::AddEdge(node_apply_monetum->GetOutDataAnchor(0), node_5d_to_4d_1->GetInDataAnchor(0)) != | |||
ge::SUCCESS) { | |||
/// GELOGE(FAILED, "ge::GraphUtils::AddEdge(node_apply_monetum->GetOutDataAnchor(0), | |||
/// node_5d_to_4d_1->GetInDataAnchor(0) ) Failed."); | |||
}; | |||
ge::GraphUtils::AddEdge(node_5d_to_4d_1->GetOutDataAnchor(0), node_ref->GetInDataAnchor(0)); | |||
@@ -395,8 +393,6 @@ bool BuildComputeGraph1(ge::ComputeGraphPtr &graph) { | |||
if (ge::GraphUtils::AddEdge(node_apply_monetum->GetOutDataAnchor(0), node_5d_to_4d_1->GetInDataAnchor(0)) != | |||
ge::SUCCESS) { | |||
/// GELOGE(FAILED, "ge::GraphUtils::AddEdge(node_apply_monetum->GetOutDataAnchor(0), | |||
/// node_5d_to_4d_1->GetInDataAnchor(0) ) Failed."); | |||
}; | |||
ge::GraphUtils::AddEdge(node_5d_to_4d_1->GetOutDataAnchor(0), node_ref->GetInDataAnchor(0)); | |||