blob: 22f578a9d76b6dc82ba3b12373f4f2132bf1767f [file] [log] [blame]
Jim Flynn4b2f3472021-10-13 21:20:07 +01001//
Cathal Corbett53837672022-09-01 11:34:37 +01002// Copyright © 2021,2022 Arm Ltd and Contributors. All rights reserved.
Jim Flynn4b2f3472021-10-13 21:20:07 +01003// 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
16namespace armnnDelegate
17{
18
19TfLiteStatus 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 Armaganbfa767c2022-02-09 14:58:03 +000027 FORWARD_LAYER_SUPPORT_FUNC("FLOOR",
Jim Flynn4b2f3472021-10-13 21:20:07 +010028 tfLiteContext,
29 IsFloorSupported,
30 delegateData.m_Backends,
31 isSupported,
Cathal Corbett53837672022-09-01 11:34:37 +010032 armnn::BackendId(),
Jim Flynn4b2f3472021-10-13 21:20:07 +010033 inputTensorInfo,
34 outInfo);
35 };
36 validateFunc(outputTensorInfo, isSupported);
37 return isSupported ? kTfLiteOk : kTfLiteError;
38}
39
40} // namespace armnnDelegate
41