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");