From b56fc0c2af8a3dc8729237b5e1e6e4e4e5d45dfa Mon Sep 17 00:00:00 2001 From: huangbingjian Date: Thu, 18 Feb 2021 21:30:43 +0800 Subject: [PATCH] [auto-monad] Do not insert VirtualDiv after UpdateState --- mindspore/ccsrc/frontend/parallel/step_parallel.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/frontend/parallel/step_parallel.cc b/mindspore/ccsrc/frontend/parallel/step_parallel.cc index d5bb19c3f1..83faf919ed 100644 --- a/mindspore/ccsrc/frontend/parallel/step_parallel.cc +++ b/mindspore/ccsrc/frontend/parallel/step_parallel.cc @@ -942,7 +942,8 @@ void InsertVirtualDivOp(const VirtualDivOp &virtual_div_op, const CNodePtr &node for (size_t index = 1; index < node_size; ++index) { AnfNodePtr input = node->input(index); MS_EXCEPTION_IF_NULL(input); - if (!input->isa() && !input->isa()) { // if it is not a tensor, continue + // if it is not a tensor, continue + if ((!input->isa() && !input->isa()) || HasAbstractMonad(input)) { MS_LOG(INFO) << "insert div op: the index " << index << " is not tensor, skip"; continue; }