ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Abs.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
17
#include "
execute/kernels/MathCommon.h
"
18
#include "PALAbs.h"
19
20
using namespace
onert_micro
;
21
using namespace
onert_micro::execute
;
22
23
// NOTE: doesnt currently support dynamic shapes
24
OMStatus
onert_micro::execute::execute_kernel_CircleAbs(
const
OMExecuteArgs
&execute_args)
25
{
26
auto
abs_float_lambda = [](
const
core::OMRuntimeShape
&input_shape,
const
float
*
input_data
,
27
const
core::OMRuntimeShape
&
output_shape
,
float
*
output_data
) {
28
assert(input_shape ==
output_shape
);
29
return
pal::Abs
(input_shape, input_data, output_data);
30
};
31
32
return
execute_math_common
(execute_args, abs_float_lambda);
33
}
MathCommon.h
onert_micro::core::OMRuntimeShape
Definition
OMRuntimeShape.h:34
output_shape
const luci_interpreter::RuntimeShape output_shape
Definition
PALComparisons.h:32
infer.input_data
list input_data
Definition
infer.py:29
onert_micro::execute::pal::Abs
OMStatus Abs(const core::OMRuntimeShape &shape, const T *input_data, T *output_data)
Definition
PALAbs.h:33
onert_micro::execute
Definition
ArgCommon.h:33
onert_micro::execute::execute_math_common
OMStatus execute_math_common(const OMExecuteArgs &execute_args, const std::function< OMStatus(const core::OMRuntimeShape &input_shape, const float *input_data, const core::OMRuntimeShape &output_shape, float *output_data)> &f_float)
onert_micro
Definition
OMMemoryManager.h:26
onert_micro::OMStatus
OMStatus
Definition
OMStatus.h:24
part_eval_one.output_data
output_data
Definition
part_eval_one.py:112
onert_micro::execute::OMExecuteArgs
Definition
OMExecuteArgs.h:31
onert-micro
onert-micro
src
execute
kernels
Abs.cpp
Generated by
1.9.8