Browse Source

Size parser

pull/335/head
lianghao 4 years ago
parent
commit
96c73ff091
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      parser/tensorflow/tensorflow_auto_mapping_parser_adapter.cc

+ 12
- 0
parser/tensorflow/tensorflow_auto_mapping_parser_adapter.cc View File

@@ -84,6 +84,18 @@ Status TensorFlowAutoMappingParserAdapter::ParseParams(const Message *op_src, ge
op_dest->GetType().c_str(), dynamic_tensor_num);
}

if (op_dest->GetType() == SIZE) {
ge::DataType out_type = DT_INT32;
if (AttrUtils::GetDataType(op_dest, kShapeAttrOutType, out_type)) {
if (!AttrUtils::SetInt(op_dest, kShapeAttrDtype, static_cast<int64_t>(out_type))) {
REPORT_CALL_ERROR("E19999", "Set Attr:%s to op:%s(%s) failed", kShapeAttrDtype,
op_dest->GetName().c_str(), op_dest->GetType().c_str());
GELOGE(FAILED, "Set attr dtype for op:%s failed.", op_dest->GetName().c_str());
return FAILED;
}
}
}

// add nodedef for shape insert by adapter when online_infer_dynamic
if (op_dest->GetType() == SHAPE) {
ge::DataType out_type = DT_INT32;


Loading…
Cancel
Save