Browse Source

fix sc warning of parser

pull/312/head
zhou_lili 4 years ago
parent
commit
389e5f74be
2 changed files with 9 additions and 7 deletions
  1. +1
    -1
      parser/common/proto_file_parser.cc
  2. +8
    -6
      parser/tensorflow/tensorflow_variable_v2_parser.cc

+ 1
- 1
parser/common/proto_file_parser.cc View File

@@ -506,7 +506,7 @@ Status ProtoFileParser::CombineProtoFile(const char *caffe_proto_file, const cha

if (!CheckRealPath(caffe_proto_file) || !CheckRealPath(custom_proto_file)) {
REPORT_CALL_ERROR("E19999", "caffe proto[%s] or custom proto[%s] is not existed.",
caffe_proto_file, custom_proto_file);
caffe_proto_file, custom_proto_file);
GELOGE(FAILED, "[Check][Param] caffe proto[%s] or custom proto[%s] is not existed.",
caffe_proto_file, custom_proto_file);
return FAILED;


+ 8
- 6
parser/tensorflow/tensorflow_variable_v2_parser.cc View File

@@ -89,8 +89,8 @@ static Status ParseSrcType(const domi::tensorflow::NodeDef *node, VariableOperat
CHECK_FALSE_EXEC(TensorFlowUtil::FindAttrValue(node, VAR_ATTR_DTYPE, attr),
REPORT_CALL_ERROR("E19999", "In NodeDef:%s attr:%s not exist, check invalid",
node->name().c_str(), VAR_ATTR_DTYPE.c_str());
GELOGE(FAILED, "Attr %s does not exist in NodeDef %s.",
VAR_ATTR_DTYPE.c_str(), node->name().c_str());
GELOGE(FAILED, "Attr %s does not exist in NodeDef %s.", VAR_ATTR_DTYPE.c_str(),
node->name().c_str());
return PARAM_INVALID);

GE_RETURN_WITH_LOG_IF_ERROR(TensorFlowUtil::CheckAttrHasType(attr, TENSORFLOW_ATTR_TYPE_TYPE),
@@ -116,8 +116,8 @@ Status ParseContainer(const domi::tensorflow::NodeDef *node, VariableOperator *o
CHECK_FALSE_EXEC(TensorFlowUtil::FindAttrValue(node, VAR_ATTR_CONTAINER, attr),
REPORT_CALL_ERROR("E19999", "In NodeDef:%s attr:%s not exist, check invalid",
node->name().c_str(), VAR_ATTR_CONTAINER.c_str());
GELOGE(FAILED, "Attr %s does not exist in NodeDef %s.",
VAR_ATTR_CONTAINER.c_str(), node->name().c_str());
GELOGE(FAILED, "Attr %s does not exist in NodeDef %s.", VAR_ATTR_CONTAINER.c_str(),
node->name().c_str());
return PARAM_INVALID);
GE_RETURN_WITH_LOG_IF_ERROR(TensorFlowUtil::CheckAttrHasType(attr, TENSORFLOW_ATTR_TYPE_STRING),
"check Attr s failed");
@@ -153,7 +153,8 @@ static Status ParseVarName(const domi::tensorflow::NodeDef *node, VariableOperat
REPORT_CALL_ERROR("E19999", "In NodeDef:%s attr:%s not exist, check invalid",
node->name().c_str(), VAR_ATTR_NAME.c_str());
GELOGE(FAILED, "Attr %s does not exist in NodeDef %s.", ge::VAR_ATTR_NAME.c_str(),
node->name().c_str()); return PARAM_INVALID);
node->name().c_str());
return PARAM_INVALID);

GE_RETURN_WITH_LOG_IF_ERROR(TensorFlowUtil::CheckAttrHasType(attr, TENSORFLOW_ATTR_TYPE_STRING),
"check Attr s failed");
@@ -204,7 +205,8 @@ static Status ParseVarShape(const domi::tensorflow::NodeDef *node, VariableOpera
REPORT_CALL_ERROR("E19999", "In NodeDef:%s attr:%s not exist, check invalid",
node->name().c_str(), VAR_ATTR_SHAPE.c_str());
GELOGE(FAILED, "Attr %s does not exist in NodeDef %s.", VAR_ATTR_SHAPE.c_str(),
node->name().c_str()); return PARAM_INVALID);
node->name().c_str());
return PARAM_INVALID);

GE_RETURN_WITH_LOG_IF_ERROR(TensorFlowUtil::CheckAttrHasType(attr_value, TENSORFLOW_ATTR_TYPE_SHAPE),
"check Attr s failed");


Loading…
Cancel
Save