From 395a4a8a31a457bc4c42d05e5a8ea4982ce99d29 Mon Sep 17 00:00:00 2001 From: wxl Date: Thu, 17 Dec 2020 21:21:14 +0800 Subject: [PATCH] bugfix --- ge/ir_build/ge_ir_build.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ge/ir_build/ge_ir_build.cc b/ge/ir_build/ge_ir_build.cc index f181170c..cb63c4cb 100644 --- a/ge/ir_build/ge_ir_build.cc +++ b/ge/ir_build/ge_ir_build.cc @@ -318,6 +318,13 @@ graphStatus Impl::CheckOptions(const std::map &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; }