!18732 Ignore Monad input when building ops in graph

Merge pull request !18732 from tanghuikang/ignore_monad
This commit is contained in:
i-robot 2021-06-23 01:20:00 +00:00 committed by Gitee
commit 4bea42bb20
1 changed files with 3 additions and 0 deletions

View File

@ -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<ValueNode>()) {
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<Parameter>()) {