From 14d7f7a2b5d0d85b83d8c84a5456828feb1a0ea1 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Wed, 12 May 2021 10:44:49 -0700 Subject: Update to v0.22.0 - remove identityN and placeholder - add div - update serialization_lib hash - update apply_scale_16() assertion - regenerate examples/ due to serialization_lib change Change-Id: I7183d92bec33697c65adfc07cb8eb89c6882675a --- reference_model/src/subgraph_traverser.cc | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'reference_model/src/subgraph_traverser.cc') diff --git a/reference_model/src/subgraph_traverser.cc b/reference_model/src/subgraph_traverser.cc index 5096ffa..1995b5c 100644 --- a/reference_model/src/subgraph_traverser.cc +++ b/reference_model/src/subgraph_traverser.cc @@ -499,7 +499,6 @@ int SubgraphTraverser::linkTensorsAndNodes() // For each node, read this list, link up the tensors with their inputs/outputs for (GraphNode* currNode : nodes) { - // Link inputs/consuming nodes for (std::string& name : currNode->getInputNames()) { @@ -566,36 +565,18 @@ int SubgraphTraverser::validateGraph() for (TosaReference::Tensor* currTensor : tensors) { - if (!currTensor->getProducer() && currTensor->getConsumers().empty()) - { - WARNING("Graph inconsistency: TosaReference::Tensor %s has no producers or consumers\n", - currTensor->getName().c_str()); - return 1; - } - - if (currTensor->getIsSubgraphInput()) + // It's okay for block input tensor not being consumed by operators. + // This is common in control flow op execution. + if (!currTensor->getIsSubgraphInput()) { - if (currTensor->getProducer() && currTensor->getProducer()->getOp() != Op_PLACEHOLDER) + if (!currTensor->getProducer() && currTensor->getConsumers().empty()) { - WARNING("Graph inconsistency: TosaReference::Tensor %s is a subgraph input and has a producer\n", + WARNING("Graph inconsistency: TosaReference::Tensor %s has no producers or consumers\n", currTensor->getName().c_str()); return 1; } } - // comment this check out as this is possible when graph have multiple output - // for example: - // %0 = add(%arg0, %arg1) - // %1 = mul(%arg0, %0) - // yields(%0, %1) - //if (currTensor->getIsSubgraphOutput()) { - // if (!currTensor->getConsumers().empty()) { - // WARNING ("Graph inconsistency: TosaReference::Tensor %s is a subgraph output and has a consumer\n", - // currTensor->getName().c_str()); - // return 1; - // } - //} - if (g_func_config.tosa_profile == 0) { DType dtype = currTensor->getDtype(); -- cgit v1.2.1