Browse Source

modified: tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc

pull/931/head
zhaoxinxin 5 years ago
parent
commit
ddc9dc92d6
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc

+ 5
- 5
tests/ut/ge/graph/preprocess/graph_preprocess_unittest.cc View File

@@ -35,7 +35,7 @@ class UtestGraphPreproces : public testing::Test {
protected:
void SetUp() {
map<string, string> 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<GeTensor>(tensor1);
std::vector<GeTensor> user_input = {input1};
std::map<string,string> 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");


Loading…
Cancel
Save