ONE - On-device Neural Engine
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
w
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
k
l
m
n
o
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
u
v
w
y
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
a
c
d
e
f
g
i
k
l
m
o
p
r
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Symbols
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Variables
_
b
c
d
f
g
i
k
m
n
o
p
s
t
v
Typedefs
a
d
f
g
i
l
m
n
o
s
t
u
v
Enumerations
f
g
n
o
p
r
Enumerator
a
k
n
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
KernelGenerator.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 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
#ifndef __ONERT_BACKEND_ACL_CL_KERNEL_GENERATOR_H__
18
#define __ONERT_BACKEND_ACL_CL_KERNEL_GENERATOR_H__
19
20
#include <
backend/basic/KernelGeneratorBase.h
>
21
22
#include "
TensorBuilder.h
"
23
#include "
AclTensorRegistry.h
"
24
#include "
TensorManager.h
"
25
26
namespace
onert::backend::acl_cl
27
{
28
29
class
KernelGenerator
:
public
basic::KernelGeneratorBase
30
{
31
public
:
32
KernelGenerator
(
const
ir::Graph
&graph,
const
std::shared_ptr<TensorBuilder> &tensor_builder,
33
const
std::shared_ptr<
acl_common::AclTensorRegistry<TensorManager>
> &_tensor_reg);
34
35
std::unique_ptr<exec::FunctionSequence>
generate
(
ir::OperationIndex
ind)
override
;
36
37
private
:
38
void
visit(
const
ir::operation::ArgMinMax
&)
override
;
39
void
visit(
const
ir::operation::BatchToSpaceND
&)
override
;
40
void
visit(
const
ir::operation::BinaryArithmetic
&)
override
;
41
void
visit(
const
ir::operation::Comparison
&)
override
;
42
void
visit(
const
ir::operation::Concat
&)
override
;
43
void
visit(
const
ir::operation::Conv2D
&)
override
;
44
void
visit(
const
ir::operation::ConvertFp16ToFp32
&)
override
;
45
void
visit(
const
ir::operation::ConvertFp32ToFp16
&)
override
;
46
void
visit(
const
ir::operation::DepthToSpace
&)
override
;
47
void
visit(
const
ir::operation::DepthwiseConv2D
&)
override
;
48
void
visit(
const
ir::operation::ElementwiseActivation
&)
override
;
49
void
visit(
const
ir::operation::ElementwiseBinary
&)
override
;
50
void
visit(
const
ir::operation::ElementwiseUnary
&)
override
;
51
void
visit(
const
ir::operation::EmbeddingLookup
&)
override
;
52
void
visit(
const
ir::operation::ExpandDims
&)
override
;
53
void
visit(
const
ir::operation::FullyConnected
&)
override
;
54
void
visit(
const
ir::operation::Gather
&)
override
;
55
void
visit(
const
ir::operation::HashtableLookup
&)
override
;
56
void
visit(
const
ir::operation::InstanceNorm
&)
override
;
57
void
visit(
const
ir::operation::L2Normalization
&)
override
;
58
void
visit(
const
ir::operation::LocalResponseNormalization
&)
override
;
59
void
visit(
const
ir::operation::LSTM
&)
override
;
60
void
visit(
const
ir::operation::OneHot
&)
override
;
61
void
visit(
const
ir::operation::Pack
&)
override
;
62
void
visit(
const
ir::operation::Pad
&)
override
;
63
void
visit(
const
ir::operation::Pool2D
&)
override
;
64
void
visit(
const
ir::operation::PReLU
&)
override
;
65
void
visit(
const
ir::operation::Reduce
&)
override
;
66
void
visit(
const
ir::operation::Reshape
&)
override
;
67
void
visit(
const
ir::operation::ResizeBilinear
&)
override
;
68
void
visit(
const
ir::operation::ResizeNearestNeighbor
&)
override
;
69
void
visit(
const
ir::operation::Reverse
&)
override
;
70
void
visit(
const
ir::operation::RNN
&)
override
;
71
void
visit(
const
ir::operation::Slice
&)
override
;
72
void
visit(
const
ir::operation::Softmax
&)
override
;
73
void
visit(
const
ir::operation::SpaceToBatchND
&)
override
;
74
void
visit(
const
ir::operation::SpaceToDepth
&)
override
;
75
void
visit(
const
ir::operation::Split
&)
override
;
76
void
visit(
const
ir::operation::SplitV
&)
override
;
77
void
visit(
const
ir::operation::SquaredDifference
&)
override
;
78
void
visit(
const
ir::operation::Squeeze
&)
override
;
79
void
visit(
const
ir::operation::StridedSlice
&)
override
;
80
void
visit(
const
ir::operation::TopKV2
&)
override
;
81
void
visit(
const
ir::operation::Transpose
&)
override
;
82
void
visit(
const
ir::operation::TransposeConv
&)
override
;
83
void
visit(
const
ir::operation::Unpack
&)
override
;
84
85
private
:
86
const
ir::Operands
&_ctx;
87
const
ir::Operations
&_operations_ctx;
88
std::shared_ptr<TensorBuilder> _tensor_builder;
89
std::shared_ptr<acl_common::AclTensorRegistry<TensorManager>> _tensor_reg;
90
};
29
class
KernelGenerator
:
public
basic::KernelGeneratorBase
{
…
};
91
92
}
// namespace onert::backend::acl_cl
93
94
#endif
// __ONERT_BACKEND_ACL_CL_KERNEL_GENERATOR_H__
AclTensorRegistry.h
KernelGeneratorBase.h
onert::backend::acl_cl::KernelGenerator
Definition
KernelGenerator.h:30
onert::backend::acl_cl::KernelGenerator::generate
std::unique_ptr< exec::FunctionSequence > generate(ir::OperationIndex ind) override
Definition
KernelGenerator.cc:51
onert::backend::acl_common::AclTensorRegistry
Tensor registry class for acl backends.
Definition
AclTensorRegistry.h:31
onert::backend::basic::KernelGeneratorBase
Definition
KernelGeneratorBase.h:33
onert::ir::Graph
Definition
Graph.h:32
onert::ir::Operands
Definition
Operands.h:31
onert::ir::Operations
Definition
Operations.h:28
onert::ir::operation::ArgMinMax
Definition
ArgMinMax.h:26
onert::ir::operation::BatchToSpaceND
Definition
BatchToSpaceND.h:26
onert::ir::operation::BinaryArithmetic
Definition
BinaryArithmetic.h:27
onert::ir::operation::Comparison
Definition
Comparison.h:26
onert::ir::operation::Concat
Definition
Concat.h:28
onert::ir::operation::Conv2D
Definition
Conv2D.h:30
onert::ir::operation::ConvertFp16ToFp32
Definition
ConvertFp16ToFp32.h:26
onert::ir::operation::ConvertFp32ToFp16
Definition
ConvertFp32ToFp16.h:26
onert::ir::operation::DepthToSpace
Definition
DepthToSpace.h:28
onert::ir::operation::DepthwiseConv2D
Definition
DepthwiseConv2D.h:30
onert::ir::operation::ElementwiseActivation
Definition
ElementwiseActivation.h:26
onert::ir::operation::ElementwiseBinary
Definition
ElementwiseBinary.h:26
onert::ir::operation::ElementwiseUnary
Definition
ElementwiseUnary.h:26
onert::ir::operation::EmbeddingLookup
Definition
EmbeddingLookup.h:26
onert::ir::operation::ExpandDims
Definition
ExpandDims.h:28
onert::ir::operation::FullyConnected
Definition
FullyConnected.h:29
onert::ir::operation::Gather
Definition
Gather.h:28
onert::ir::operation::HashtableLookup
Definition
HashtableLookup.h:26
onert::ir::operation::InstanceNorm
Definition
InstanceNorm.h:27
onert::ir::operation::L2Normalization
Definition
L2Normalization.h:26
onert::ir::operation::LSTM
Definition
LSTM.h:27
onert::ir::operation::LocalResponseNormalization
Definition
LocalResponseNormalization.h:28
onert::ir::operation::OneHot
Definition
OneHot.h:26
onert::ir::operation::PReLU
Definition
PReLU.h:26
onert::ir::operation::Pack
Definition
Pack.h:24
onert::ir::operation::Pad
Definition
Pad.h:26
onert::ir::operation::Pool2D
Definition
Pool2D.h:30
onert::ir::operation::RNN
Definition
RNN.h:26
onert::ir::operation::Reduce
Definition
Reduce.h:28
onert::ir::operation::Reshape
Definition
Reshape.h:28
onert::ir::operation::ResizeBilinear
Definition
ResizeBilinear.h:28
onert::ir::operation::ResizeNearestNeighbor
Definition
ResizeNearestNeighbor.h:28
onert::ir::operation::Reverse
Definition
Reverse.h:26
onert::ir::operation::Slice
Definition
Slice.h:26
onert::ir::operation::Softmax
Definition
Softmax.h:28
onert::ir::operation::SpaceToBatchND
Definition
SpaceToBatchND.h:28
onert::ir::operation::SpaceToDepth
Definition
SpaceToDepth.h:28
onert::ir::operation::Split
Definition
Split.h:24
onert::ir::operation::SplitV
Definition
SplitV.h:24
onert::ir::operation::SquaredDifference
Definition
SquaredDifference.h:26
onert::ir::operation::Squeeze
Definition
Squeeze.h:26
onert::ir::operation::StridedSlice
Definition
StridedSlice.h:28
onert::ir::operation::TopKV2
Definition
TopKV2.h:28
onert::ir::operation::TransposeConv
Definition
TransposeConv.h:30
onert::ir::operation::Transpose
Definition
Transpose.h:28
onert::ir::operation::Unpack
Definition
Unpack.h:24
onert::util::Index< uint32_t, OperationIndexTag >
TensorBuilder.h
onert::backend::acl_cl
Definition
Backend.h:32
TensorManager.h
runtime
onert
backend
acl_cl
KernelGenerator.h
Generated by
1.9.8