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/ops/data_nodes.cc | 78 +---------------------------------- 1 file changed, 1 insertion(+), 77 deletions(-) (limited to 'reference_model/src/ops/data_nodes.cc') diff --git a/reference_model/src/ops/data_nodes.cc b/reference_model/src/ops/data_nodes.cc index 883cd1b..baae019 100644 --- a/reference_model/src/ops/data_nodes.cc +++ b/reference_model/src/ops/data_nodes.cc @@ -42,29 +42,6 @@ int OpConst::eval() return GraphNode::eval(); } -OpPlaceholder::OpPlaceholder(uint64_t id_) - : GraphNode(Op_PLACEHOLDER, id_) -{ - setRequiredOperands(0, 1); -} - -OpPlaceholder::~OpPlaceholder() -{} - -int OpPlaceholder::checkTensorAttributes() -{ - if (validateRequiredOperands()) - return 1; - - return 0; -} - -int OpPlaceholder::eval() -{ - // Evaluation is trivial for placeholders - return GraphNode::eval(); -} - template OpIdentity::OpIdentity(TosaAttributeBase* attribute_, TosaQuantInfoBase* qinfo_, uint64_t id_) : GraphNode(Op_IDENTITY, id_) @@ -107,64 +84,11 @@ int OpIdentity::eval() return GraphNode::eval(); } -template -OpIdentityN::OpIdentityN(TosaAttributeBase* attribute_, TosaQuantInfoBase* qinfo_, uint64_t id_) - : GraphNode(Op_IDENTITYN, id_) -{ - setRequiredRank(0, 6); -} - -template -OpIdentityN::~OpIdentityN() -{} - -template -int OpIdentityN::checkTensorAttributes() -{ - - if (inputs.size() != outputs.size()) - { - printNodeValidationError("Input and output tensor list lengths are not equal"); - return 1; - } - - for (size_t i = 0; i < inputs.size(); i++) - { - ins.push_back(dynamic_cast*>(inputs[i])); - outs.push_back(dynamic_cast*>(outputs[i])); - - if (ins[i]->matchRankTypeShape(*outs[i])) - { - printNodeValidationError("Input and output tensor rank, type, or shape do not match"); - return 1; - } - } - - return 0; -} - -template -int OpIdentityN::eval() -{ - for (size_t i = 0; i < ins.size(); i++) - { - outs[i]->getTensor() = ins[i]->getTensor(); - } - - return GraphNode::eval(); -} - // template explicit instantiation -// note OpConst and OpPlaceholder are not templated +// note OpConst is not templated DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentity, FLOAT); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentity, INT8); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentity, INT16); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentity, INT32); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentity, BOOL); - -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentityN, FLOAT); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentityN, INT8); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentityN, INT16); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentityN, INT32); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpIdentityN, BOOL); -- cgit v1.2.1