提交 066c279f 编写于 作者: C caifubi

Fix dump bug in mode 0

上级 c577952c
......@@ -126,8 +126,8 @@ bool DataDumper::KernelNeedDump(const CNodePtr &kernel) const {
return false;
}
MS_EXCEPTION_IF_NULL(kernel);
const auto &kernel_set = DataDumpParser::GetInstance().kernel_set();
return kernel_set.find(kernel->fullname_with_scope()) != kernel_set.end();
// dump all kernel if mode is set 0 in data_dump.json
return DataDumpParser::GetInstance().NeedDump(kernel->fullname_with_scope());
}
void DataDumper::UnloadDumpInfo() {
......
......@@ -175,8 +175,8 @@ size_t LoadCtrlInputTensor(const std::shared_ptr<KernelGraph> &graph, std::vecto
if (inputs_params == nullptr) {
return 0;
}
if (inputs_params->empty()) {
MS_LOG(EXCEPTION) << "Illegal empty inputs_params";
if (inputs_params->size() < 2) {
MS_LOG(EXCEPTION) << "Illegal inputs_params size";
}
auto tensor = (*inputs_params)[0];
MS_EXCEPTION_IF_NULL(tensor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册