ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Equal.cpp
Go to the documentation of this file.
1
2/*
3 * Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
19#include "core/OMUtils.h"
20#include "OMStatus.h"
22
23#include "import/OMUtils.h"
24
25using namespace onert_micro;
26using namespace onert_micro::core;
27
28namespace
29{
30
31constexpr uint32_t input1TensorIdx = 0;
32constexpr uint32_t input2TensorIdx = 1;
33constexpr uint32_t outputTensorIdx = 0;
34
35} // namespace
36
37OMStatus onert_micro::import::configure_kernel_CircleEqual(const OMConfigureArgs &config_args)
38{
39 const circle::Tensor *input1;
40 const circle::Tensor *input2;
41 const circle::Tensor *output;
42
43 TISOHeader(config_args, &input1, &input2, &output);
44
45 OMStatus status;
46
47 status = utils::checkCondition(input1->type() == input2->type());
48 if (status != Ok)
49 return status;
50
51 status = utils::checkCondition(output->type() == circle::TensorType_BOOL);
52 if (status != Ok)
53 return status;
54
55 return status;
56}
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