ONE - On-device Neural Engine
Loading...
Searching...
No Matches
LessEqual.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 "core/OMUtils.h"
19#include "OMStatus.h"
21
22#include "import/OMUtils.h"
23
24using namespace onert_micro;
25using namespace onert_micro::core;
26
27namespace
28{
29
30constexpr uint32_t input1TensorIdx = 0;
31constexpr uint32_t input2TensorIdx = 1;
32constexpr uint32_t outputTensorIdx = 0;
33
34} // namespace
35
36OMStatus onert_micro::import::configure_kernel_CircleLessEqual(const OMConfigureArgs &config_args)
37{
38 const circle::Tensor *input1;
39 const circle::Tensor *input2;
40 const circle::Tensor *output;
41
42 TISOHeader(config_args, &input1, &input2, &output);
43
44 OMStatus status;
45
46 status = utils::checkCondition(input1->type() == input2->type());
47 if (status != Ok)
48 return status;
49
50 status = utils::checkCondition(output->type() == circle::TensorType_BOOL);
51 if (status != Ok)
52 return status;
53
54 return status;
55}
constexpr uint32_t input1TensorIdx
constexpr uint32_t outputTensorIdx
constexpr uint32_t input2TensorIdx
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