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/SharedFunctions.cpp | |
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/SharedFunctions.cpp')
-rw-r--r-- | delegate/src/SharedFunctions.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/delegate/src/SharedFunctions.cpp b/delegate/src/SharedFunctions.cpp new file mode 100644 index 0000000000..79b9f9061f --- /dev/null +++ b/delegate/src/SharedFunctions.cpp @@ -0,0 +1,40 @@ +// +// Copyright © 2021 Arm Ltd and Contributors. All rights reserved. +// SPDX-License-Identifier: MIT +// + + +#include "SharedFunctions.hpp" + +#include "DelegateUtils.hpp" + +#include <tensorflow/lite/builtin_ops.h> +#include <tensorflow/lite/c/builtin_op_data.h> +#include <tensorflow/lite/c/common.h> +#include <tensorflow/lite/minimal_logging.h> + +namespace armnnDelegate +{ + +TfLiteStatus ValidateFloorOperator(DelegateData& delegateData, + TfLiteContext* tfLiteContext, + const armnn::TensorInfo& inputTensorInfo, + const armnn::TensorInfo& outputTensorInfo) +{ + bool isSupported = false; + auto validateFunc = [&](const armnn::TensorInfo& outInfo, bool& isSupported) + { + FORWARD_LAYER_SUPPORT_FUNC(__func__, + tfLiteContext, + IsFloorSupported, + delegateData.m_Backends, + isSupported, + inputTensorInfo, + outInfo); + }; + validateFunc(outputTensorInfo, isSupported); + return isSupported ? kTfLiteOk : kTfLiteError; +} + +} // namespace armnnDelegate + |