From c8eb955a2c9f0b432fe932e2df8445f242080e31 Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Thu, 26 Nov 2020 10:54:22 +0000 Subject: IVGCVSW-5381 TfLiteDelegate: Implement the Logical operators * Implemented Logical AND, NOT and OR operators. * NOT uses existing ElementwiseUnary VisitLayer function & tests. * AND/OR uses new LogicalBinary VisitLayer function & tests. Signed-off-by: Matthew Sloyan Change-Id: I5e7f1e78b30c36ac7f14c70a712b54f98d664b83 --- delegate/src/armnn_delegate.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'delegate/src/armnn_delegate.cpp') diff --git a/delegate/src/armnn_delegate.cpp b/delegate/src/armnn_delegate.cpp index 9097211241..5139adbf75 100644 --- a/delegate/src/armnn_delegate.cpp +++ b/delegate/src/armnn_delegate.cpp @@ -16,6 +16,7 @@ #include "Fill.hpp" #include "FullyConnected.hpp" #include "Gather.hpp" +#include "LogicalBinary.hpp" #include "Lstm.hpp" #include "Normalization.hpp" #include "Pad.hpp" @@ -583,6 +584,26 @@ TfLiteStatus ArmnnSubgraph::VisitNode(DelegateData& delegateData, tfLiteNode, nodeIndex, kTfLiteBuiltinLocalResponseNormalization); + case kTfLiteBuiltinLogicalAnd: + return VisitLogicalBinaryOperator(delegateData, + tfLiteContext, + tfLiteNode, + nodeIndex, + kTfLiteBuiltinLogicalAnd, + armnn::LogicalBinaryOperation::LogicalAnd); + case kTfLiteBuiltinLogicalNot: + return VisitElementwiseUnaryOperator(delegateData, + tfLiteContext, + tfLiteNode, + nodeIndex, + armnn::UnaryOperation::LogicalNot); + case kTfLiteBuiltinLogicalOr: + return VisitLogicalBinaryOperator(delegateData, + tfLiteContext, + tfLiteNode, + nodeIndex, + kTfLiteBuiltinLogicalOr, + armnn::LogicalBinaryOperation::LogicalOr); case kTfLiteBuiltinLogistic: return VisitActivationOperator(delegateData, tfLiteContext, -- cgit v1.2.1