Browse Source

bugfix

tags/v1.2.0
wxl 4 years ago
parent
commit
395a4a8a31
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      ge/ir_build/ge_ir_build.cc

+ 7
- 0
ge/ir_build/ge_ir_build.cc View File

@@ -318,6 +318,13 @@ graphStatus Impl::CheckOptions(const std::map<std::string, std::string> &options
if (it != options_.end() && (CheckDisableReuseMemoryParamValid(it->second) != GRAPH_SUCCESS)) {
return GRAPH_PARAM_INVALID;
}
// Check Input Format
if (options_.find(kInputFormat) != options_.end()) {
if (!options_[kInputFormat].empty() && !ge::TypeUtils::IsFormatValid(options_[kInputFormat].c_str())) {
GELOGE(ge::PARAM_INVALID, "user input format [%s] is not found!", options_[kInputFormat].c_str());
return GRAPH_PARAM_INVALID;
}
}
return GRAPH_SUCCESS;
}



Loading…
Cancel
Save