ONE - On-device Neural Engine
Loading...
Searching...
No Matches
GreaterEqual.cpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
18#include "OMStatus.h"
20#include "core/OMUtils.h"
22#include "PALComparisons.h"
23
24#include "execute/OMUtils.h"
25
26using namespace onert_micro;
27using namespace onert_micro::core;
28using namespace onert_micro::execute;
29
30namespace
31{
32
33constexpr uint32_t input1TensorIdx = 0;
34constexpr uint32_t input2TensorIdx = 1;
35constexpr uint32_t outputTensorIdx = 0;
36
37} // namespace
38
39OMStatus onert_micro::execute::execute_kernel_CircleGreaterEqual(const OMExecuteArgs &execute_args)
40{
41 OMStatus status = Ok;
42
43 const circle::Tensor *input1 = nullptr;
44 const circle::Tensor *input2 = nullptr;
45 const circle::Tensor *output = nullptr;
46
47 OMRuntimeKernel runtime_kernel;
48
49 TISOHeader(execute_args, &input1, &input2, &output, &runtime_kernel);
50
51 switch (input1->type())
52 {
53 case circle::TensorType_INT64:
54 onert_micro::execute::evalComparisonGeneric<int64_t>(
56 break;
57 case circle::TensorType_INT32:
58 onert_micro::execute::evalComparisonGeneric<int32_t>(
60 break;
61#ifndef DIS_FLOAT
62 case circle::TensorType_FLOAT32:
63 onert_micro::execute::evalComparisonGeneric<float>(&runtime_kernel,
65 break;
66#endif // DIS_FLOAT
67 default:
68 assert(false && "Unsupported type.");
69 }
70
71 return status;
72}
constexpr uint32_t input1TensorIdx
constexpr uint32_t outputTensorIdx
constexpr uint32_t input2TensorIdx
bool GreaterEqualFn(T lhs, T rhs)
OMStatus TISOHeader(const OMExecuteArgs &execute_args, const circle::Tensor **input1, const circle::Tensor **input2, const circle::Tensor **output, OMRuntimeKernel *runtime_kernel)
Definition OMUtils.cpp:240