diff options
author | Jim Flynn <jim.flynn@arm.com> | 2021-10-13 21:20:07 +0100 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-11-01 12:09:27 +0000 |
commit | 4b2f34709be018d6cf9931b66deaf84a4469340d (patch) | |
tree | 2320ebf3ee3aeb91b91fb55de16504bd80f6f3a3 /delegate/src/Round.hpp | |
parent | 9f6862de94e3d15ea5207a5747012f6c7eead358 (diff) | |
download | armnn-4b2f34709be018d6cf9931b66deaf84a4469340d.tar.gz |
IVGCVSW-6457 Add FLOOR_DIV Support to the TfLiteDelegate
Change-Id: Ia4bf42b1f3f86b947825dff8e538d2d4343effab
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'delegate/src/Round.hpp')
-rw-r--r-- | delegate/src/Round.hpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/delegate/src/Round.hpp b/delegate/src/Round.hpp index 1677607571..016af11e21 100644 --- a/delegate/src/Round.hpp +++ b/delegate/src/Round.hpp @@ -5,6 +5,8 @@ #pragma once +#include "SharedFunctions.hpp" + #include <tensorflow/lite/builtin_ops.h> #include <tensorflow/lite/c/builtin_op_data.h> #include <tensorflow/lite/c/common.h> @@ -36,27 +38,17 @@ TfLiteStatus VisitFloorOperator(DelegateData& delegateData, } const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor); + // NOTE: looks like the outputTensorInfo is the only thing that is required for the case + // where we are adding the floor layer so maybe move the other stuff inside the + // if !delegateData block for efficiency. const armnn::TensorInfo& outputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteOutputTensor); - bool isSupported = false; - auto validateFunc = [&](const armnn::TensorInfo& outInfo, bool& isSupported) - { - FORWARD_LAYER_SUPPORT_FUNC(__func__, - tfLiteContext, - IsFloorSupported, - delegateData.m_Backends, - isSupported, - inputTensorInfo, - outInfo); - }; - // If the m_Network is a nullptr, this signals that a prerequisite TfLite callback is required to clarify the // support for the operator // If supported, VisitFloorOperator will be called again to add the layer to the network as seen further below if (!delegateData.m_Network) { - validateFunc(outputTensorInfo, isSupported); - return isSupported ? kTfLiteOk : kTfLiteError; + return ValidateFloorOperator(delegateData, tfLiteContext, inputTensorInfo, outputTensorInfo); } // Add a Floor layer |