Browse Source

Feature: Cancel parameter item IS_DYNAMIC_INPUT of aclgrphParse interface

pull/118/head
l00444296 5 years ago
parent
commit
b55d058409
1 changed files with 7 additions and 10 deletions
  1. +7
    -10
      parser/tensorflow/tensorflow_data_parser.cc

+ 7
- 10
parser/tensorflow/tensorflow_data_parser.cc View File

@@ -134,16 +134,13 @@ Status TensorFlowDataParser::ParseInputFromUser(const Message *op_src, const ge:
}

Status TensorFlowDataParser::CheckInputShape(const std::string &name) {
const ge::ParserContext &ctx = GetParserContext();
if (!ctx.is_dynamic_input) {
for (uint32_t i = 0; i < user_input_dims_v.size(); i++) {
// if input_shape has some placeholders, user should designate them.
// dim i = 0, means empty tensor.
// dim i = -1 or -2, means unknown shape.
GE_CHK_BOOL_RET_STATUS(user_input_dims_v[i] >= kValidShapeMinValue, domi::PARAM_INVALID,
"parse data node %s: shape contains placeholder ,but not designated by user",
name.c_str());
}
for (uint32_t i = 0; i < user_input_dims_v.size(); i++) {
// if input_shape has some placeholders, user should designate them.
// dim i = 0, means empty tensor.
// dim i = -1 or -2, means unknown shape.
GE_CHK_BOOL_RET_STATUS(user_input_dims_v[i] >= kValidShapeMinValue, domi::PARAM_INVALID,
"parse data node %s: shape contains placeholder ,but not designated by user",
name.c_str());
}
return SUCCESS;
}


Loading…
Cancel
Save