aboutsummaryrefslogtreecommitdiff
path: root/delegate/classic
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2023-04-26 11:42:46 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2023-04-26 11:36:49 +0000
commit2b04ec3b94da152281fbbc69f8539378589b1f56 (patch)
tree13fd9f3a8ca44cf4f3a53ccf3f44960cfe627475 /delegate/classic
parentf2dffdb00bdf3108ebda6aaa142249d208f0c507 (diff)
downloadarmnn-2b04ec3b94da152281fbbc69f8539378589b1f56.tar.gz
IVGCVSW-7579 IVGCVSW-7581 IVGCVSW-7583 Implement Comparison, Concat and Mean in Opaque Delegate
* Removed input slot check from Connect function as number of TFLite and Arm NN inputs can differ. * Moved SetupConcatViewOrigin function to DelegateUtils.hpp * Simplified validation checks in VistConvolution functions as IsValid and IsDynamic were already being called. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I858dbe4b643f9d350d9c38ea255ce5effbda4612
Diffstat (limited to 'delegate/classic')
-rw-r--r--delegate/classic/src/Control.hpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/delegate/classic/src/Control.hpp b/delegate/classic/src/Control.hpp
index a3ea6e92a7..e6779f360a 100644
--- a/delegate/classic/src/Control.hpp
+++ b/delegate/classic/src/Control.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include <armnn/utility/IgnoreUnused.hpp>
+#include <DelegateUtils.hpp>
#include <tensorflow/lite/builtin_ops.h>
#include <tensorflow/lite/c/builtin_op_data.h>
@@ -21,35 +21,6 @@
namespace armnnDelegate
{
-void SetupConcatViewOrigin(const armnn::TensorInfo& inputTensorInfo,
- armnn::OriginsDescriptor& concatDescriptor,
- const unsigned int concatAxis,
- unsigned int inputIndex,
- unsigned int& mergeDimOrigin)
-{
- const uint32_t inputRank = concatDescriptor.GetNumDimensions();
-
- // double check dimensions of the tensors
- if (inputTensorInfo.GetNumDimensions() != inputRank)
- {
- throw armnn::ParseException("The number of dimensions for input tensors "
- "of the concatenation operator should be: " + std::to_string(inputRank));
- }
-
- for (unsigned int j = 0; j < concatAxis; ++j)
- {
- concatDescriptor.SetViewOriginCoord(inputIndex, j, 0);
- }
-
- concatDescriptor.SetViewOriginCoord(inputIndex, concatAxis, mergeDimOrigin);
- mergeDimOrigin += inputTensorInfo.GetShape()[concatAxis];
-
- for (unsigned int j = concatAxis + 1; j < inputRank; ++j)
- {
- concatDescriptor.SetViewOriginCoord(inputIndex, j, 0);
- }
-}
-
TfLiteStatus VisitConcatenationOperator(DelegateData& delegateData,
TfLiteContext* tfLiteContext,
TfLiteNode* tfLiteNode,
@@ -322,12 +293,6 @@ TfLiteStatus VisitControlOperator(DelegateData& delegateData,
int nodeIndex,
int32_t operatorCode)
{
- armnn::IgnoreUnused(delegateData,
- tfLiteContext,
- tfLiteNode,
- nodeIndex,
- operatorCode);
-
switch(operatorCode)
{
case kTfLiteBuiltinConcatenation: