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

Fix dump bug in mode 0

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