aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/armnn_delegate.cpp
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2020-11-26 10:54:22 +0000
committerMatthew Sloyan <matthew.sloyan@arm.com>2020-12-07 09:41:42 +0000
commitc8eb955a2c9f0b432fe932e2df8445f242080e31 (patch)
treecb3a74ae4d3a2a558f0589a45a6d1ea6d58e02c3 /delegate/src/armnn_delegate.cpp
parent97451b4429b717f6ff19c10716d1d82a2ff6f155 (diff)
downloadarmnn-c8eb955a2c9f0b432fe932e2df8445f242080e31.tar.gz
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 <matthew.sloyan@arm.com> Change-Id: I5e7f1e78b30c36ac7f14c70a712b54f98d664b83
Diffstat (limited to 'delegate/src/armnn_delegate.cpp')
-rw-r--r--delegate/src/armnn_delegate.cpp21
1 files changed, 21 insertions, 0 deletions
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,