From 2409140178ce110f2d7b04091734856f8edac066 Mon Sep 17 00:00:00 2001 From: yujianfeng Date: Sat, 25 Jul 2020 17:00:06 +0800 Subject: [PATCH] Fix getting output address of internal output --- mindspore/ccsrc/backend/session/session_basic.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/backend/session/session_basic.cc b/mindspore/ccsrc/backend/session/session_basic.cc index ee33ff39fc2..33b722da78b 100644 --- a/mindspore/ccsrc/backend/session/session_basic.cc +++ b/mindspore/ccsrc/backend/session/session_basic.cc @@ -312,11 +312,11 @@ void SessionBasic::InitInternalOutputParameter(const AnfNodePtr &out_node, const MS_LOG(INFO) << "No kernel info"; return; } - auto address = AnfAlgo::GetMutableOutputAddr(ref_real_node, ref_real_node_index); - if (address == nullptr) { + if (!AnfAlgo::OutputAddrExist(ref_real_node, ref_real_node_index)) { MS_LOG(INFO) << "No kernel address"; return; } + auto address = AnfAlgo::GetMutableOutputAddr(ref_real_node, ref_real_node_index); auto format = AnfAlgo::GetOutputFormat(ref_real_node, ref_real_node_index); auto type = AnfAlgo::GetOutputDeviceDataType(ref_real_node, ref_real_node_index); auto d_kernel_info = std::make_shared();