Ignore Monad input when building ops in graph

This commit is contained in:
tanghuikang 2021-06-22 19:54:44 +08:00
parent 11d6b435c2
commit 6d3fde47d9
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>()) {