From ddc9dc92d6ad78d3385c4dfb1b8af9371874e123 Mon Sep 17 00:00:00 2001 From: zhaoxinxin Date: Mon, 18 Jan 2021 13:53:52 +0800 Subject: [PATCH] modified: tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc --- .../ge/graph/preprocess/graph_preprocess_unittest.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc b/tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc index 08e16612..c10c5c4d 100644 --- a/tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc +++ b/tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc @@ -35,7 +35,7 @@ class UtestGraphPreproces : public testing::Test { protected: void SetUp() { map options; - ge::Status ret = ge::GEInitialize(); + ge::Status ret = ge::GEInitialize(options); EXPECT_EQ(ret, ge::SUCCESS); } void TearDown() { @@ -55,14 +55,14 @@ TEST_F(UtestGraphPreproces, test_dynamic_input_shape_parse) { graph_prepare.compute_graph_ = BuildGraph1(); // prepare user_input & graph option ge::GeTensorDesc tensor1; - tensor.SetFormat(ge::FORMAT_NCHW); - tensor.SetShape(ge::GeShape({3, 12, 5, 5})); - tensor.SetDataType(ge::DT_FLOAT); + tensor1.SetFormat(ge::FORMAT_NCHW); + tensor1.SetShape(ge::GeShape({3, 12, 5, 5})); + tensor1.SetDataType(ge::DT_FLOAT); GeTensor input1 = std::make_shared(tensor1); std::vector user_input = {input1}; std::map graph_option = {{"ge.exec.dynamicGraphExecuteMode","dynamic_execute"}, {"ge.exec.dataInputsShapeRange","[3,1~20,2~10,5]"}}; - auto ret = graph_prepare.UpdateInput(input1, graph_option); + auto ret = graph_prepare.UpdateInput(user_input, graph_option); EXPECT_EQ(ret, ge::SUCCESS); // check data node output shape_range and shape auto data_node = graph_prepare.compute_graph_->FindNode("data1");