From 6d3fde47d9992b2f54fbb243678a9de2d377b72d Mon Sep 17 00:00:00 2001 From: tanghuikang Date: Tue, 22 Jun 2021 19:54:44 +0800 Subject: [PATCH] Ignore Monad input when building ops in graph --- mindspore/ccsrc/backend/session/ascend_session.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/ccsrc/backend/session/ascend_session.cc b/mindspore/ccsrc/backend/session/ascend_session.cc index 169ec08243d..979ffd9fe4d 100644 --- a/mindspore/ccsrc/backend/session/ascend_session.cc +++ b/mindspore/ccsrc/backend/session/ascend_session.cc @@ -708,6 +708,9 @@ void AscendSession::GetOpInputStubTensors(const CNodePtr &cnode, const std::map< MS_EXCEPTION_IF_NULL(real_input); tensor::TensorPtr tensor = nullptr; if (real_input->isa()) { + if (HasAbstractMonad(real_input)) { + continue; + } tensor = GetValueNodeOutputTensor(real_input, kernel_with_index.second); input_tensor_info->input_tensors_mask.emplace_back(kParameterDataTensorMask); } else if (real_input->isa()) {