Browse Source

fix

pull/2039/head
guopeian 3 years ago
parent
commit
de50397b5a
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      tests/ut/ge/single_op/single_op_model_unittest.cc

+ 7
- 0
tests/ut/ge/single_op/single_op_model_unittest.cc View File

@@ -410,6 +410,13 @@ TEST_F(UtestSingleOpModel, build_dynamic_task02) {
model.model_helper_.model_ = ge_model;
auto op_desc = std::make_shared<ge::OpDesc>("add", "Add");
AttrUtils::SetInt(op_desc, ::ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, ge::DEPEND_COMPUTE);
GeTensorDesc tensor(GeShape(), FORMAT_NCHW, DT_FLOAT);
for (int i = 0; i < 4; i++) {
op_desc->AddInputDesc(tensor);
}
for (int i = 0; i < 2; i++) {
op_desc->AddOutputDesc(tensor);
}
NodePtr node = graph->AddNode(op_desc);
model.op_list_[0] = node;
StreamResource *res = new (std::nothrow) StreamResource(1);


Loading…
Cancel
Save