Jim Flynn | 4b2f347 | 2021-10-13 21:20:07 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2021 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | |
| 7 | #include "SharedFunctions.hpp" |
| 8 | |
| 9 | #include "DelegateUtils.hpp" |
| 10 | |
| 11 | #include <tensorflow/lite/builtin_ops.h> |
| 12 | #include <tensorflow/lite/c/builtin_op_data.h> |
| 13 | #include <tensorflow/lite/c/common.h> |
| 14 | #include <tensorflow/lite/minimal_logging.h> |
| 15 | |
| 16 | namespace armnnDelegate |
| 17 | { |
| 18 | |
| 19 | TfLiteStatus ValidateFloorOperator(DelegateData& delegateData, |
| 20 | TfLiteContext* tfLiteContext, |
| 21 | const armnn::TensorInfo& inputTensorInfo, |
| 22 | const armnn::TensorInfo& outputTensorInfo) |
| 23 | { |
| 24 | bool isSupported = false; |
| 25 | auto validateFunc = [&](const armnn::TensorInfo& outInfo, bool& isSupported) |
| 26 | { |
Sadik Armagan | bfa767c | 2022-02-09 14:58:03 +0000 | [diff] [blame] | 27 | FORWARD_LAYER_SUPPORT_FUNC("FLOOR", |
Jim Flynn | 4b2f347 | 2021-10-13 21:20:07 +0100 | [diff] [blame] | 28 | tfLiteContext, |
| 29 | IsFloorSupported, |
| 30 | delegateData.m_Backends, |
| 31 | isSupported, |
| 32 | inputTensorInfo, |
| 33 | outInfo); |
| 34 | }; |
| 35 | validateFunc(outputTensorInfo, isSupported); |
| 36 | return isSupported ? kTfLiteOk : kTfLiteError; |
| 37 | } |
| 38 | |
| 39 | } // namespace armnnDelegate |
| 40 | |