提交 e4c8365d 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!3358 fix cpu nonop net

Merge pull request !3358 from kisnwang/fix-cpu-nonop-error
......@@ -186,11 +186,15 @@ BaseRef CPUKernelRuntime::CreatTensorForOutput(const session::KernelWithIndex &k
return ret;
}
return CreatTensorForOutput(node, index, bound_addresses, need_sync_outputs);
} else if (input_node->isa<Parameter>() || input_node->isa<ValueNode>()) {
} else if (input_node->isa<Parameter>()) {
auto iter = input_map.find(input_node.get());
if (iter != input_map.end()) {
return iter->second;
}
} else if (input_node->isa<ValueNode>()) {
auto value_node = input_node->cast<ValueNodePtr>();
MS_EXCEPTION_IF_NULL(value_node);
return value_node->value();
}
return BaseRef();
}
......
......@@ -21,7 +21,7 @@ namespace device {
namespace cpu {
void CPUSimpleMemPlan::MemPlan(const session::KernelGraph *graph) {
MS_EXCEPTION_IF_NULL(graph);
size_t total_mem_size = 0;
size_t total_mem_size = 32;
auto kernels = graph->execution_order();
for (const auto &kernel : kernels) {
MS_EXCEPTION_IF_NULL(kernel);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册