Browse Source

singleop errormassage modify

tags/v1.1.0
wangwenhua 4 years ago
parent
commit
f561e066d5
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      ge/offline/single_op_parser.cc

+ 6
- 3
ge/offline/single_op_parser.cc View File

@@ -229,7 +229,8 @@ bool SingleOpParser::Validate(const SingleOpDesc &op_desc) {
for (auto &tensor_desc : op_desc.input_desc) {
if ((tensor_desc.type == DT_UNDEFINED && tensor_desc.format != FORMAT_RESERVED) ||
(tensor_desc.type != DT_UNDEFINED && tensor_desc.format == FORMAT_RESERVED)){
ErrorManager::GetInstance().ATCReportErrMessage("E10027", {"input", "index"}, {"output", std::to_string(index)});
ErrorManager::GetInstance().ATCReportErrMessage("E10027", {"input", "type", "index"},
{"intput", "datatype or format", std::to_string(index)});
GELOGE(PARAM_INVALID, "Input's dataType or format is invalid when the index is %d", index);
return false;
}
@@ -239,13 +240,15 @@ bool SingleOpParser::Validate(const SingleOpDesc &op_desc) {
index = 0;
for (auto &tensor_desc : op_desc.output_desc) {
if (tensor_desc.type == DT_UNDEFINED) {
ErrorManager::GetInstance().ATCReportErrMessage("E10027", {"input", "index"}, {"output", std::to_string(index)});
ErrorManager::GetInstance().ATCReportErrMessage("E10027", {"input", "type", "index"},
{"output", "datatype", std::to_string(index)});
GELOGE(PARAM_INVALID, "Output's dataType is invalid when the index is %d", index);
return false;
}

if (tensor_desc.format == FORMAT_RESERVED) {
ErrorManager::GetInstance().ATCReportErrMessage("E10028", {"input", "index"}, {"output", std::to_string(index)});
ErrorManager::GetInstance().ATCReportErrMessage("E10027", {"input", "type", "index"},
{"output", "format", std::to_string(index)});
GELOGE(PARAM_INVALID, "Output's format is invalid when the index is %d", index);
return false;
}


Loading…
Cancel
Save