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

!1548 [session]make manager for every graph

Merge pull request !1548 from chenfei_mindspore/r0.3
......@@ -44,8 +44,7 @@ void CPUKernelRuntime::AssignKernelAddress(session::KernelGraph *kernel_graph) {
void CPUKernelRuntime::AssignValueNodeAddress(session::KernelGraph *kernel_graph) {
MS_EXCEPTION_IF_NULL(kernel_graph);
size_t type_size = sizeof(float);
for (auto &item : kernel_graph->value_nodes()) {
auto item_node = item.first;
for (auto &item_node : kernel_graph->graph_value_nodes()) {
MS_EXCEPTION_IF_NULL(item_node);
if (item_node->isa<ValueNode>()) {
auto value_node = item_node->cast<ValueNodePtr>();
......
......@@ -589,7 +589,7 @@ KernelGraphPtr SessionBasic::ConstructKernelGraph(const AnfNodePtrList &lst, con
// add a make_tuple at the end of graph as output
graph->set_output(ConstructOutput(outputs, graph));
MS_EXCEPTION_IF_NULL(context_);
FuncGraphManagerPtr manager = context_->manager();
FuncGraphManagerPtr manager = MakeManager({graph});
if (manager) {
manager->AddFuncGraph(graph);
graph->set_manager(manager);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册