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
Optimizer.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 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 "
Optimizer.h
"
18
19
#include <
AclSubTensorAnalyzer.h
>
20
21
#include <
compiler/LoweredGraph.h
>
22
#include <
util/logging.h
>
23
24
#include <cassert>
25
26
namespace
onert::backend::acl_neon
27
{
28
29
Optimizer::Optimizer
(
BackendContext
*context)
30
: _context{context},
31
_tensor_builder{
std
::dynamic_pointer_cast<
TensorBuilder
>(context->tensor_builder)}
32
{
33
assert(context);
34
}
29
Optimizer::Optimizer
(
BackendContext
*context) {
…
}
35
36
void
Optimizer::optimize
()
37
{
38
// Concat elimination (build subtensor info)
39
{
40
acl_common::AclSubTensorAnalyzer
sa{*_context->
graph
()};
41
sa.setUsePadding();
42
_context->
graph
()->
operations
().
iterate
(
43
[&](
const
ir::OperationIndex
&,
const
ir::IOperation
&op) { op.
accept
(sa); });
44
}
45
}
36
void
Optimizer::optimize
() {
…
}
46
47
}
// namespace onert::backend::acl_neon
AclSubTensorAnalyzer.h
LoweredGraph.h
onert::backend::BackendContext::graph
const ir::Graph * graph() const
Definition
BackendContext.h:61
onert::backend::acl_common::AclBackendContext
Definition
AclBackendContext.h:37
onert::backend::acl_common::AclSubTensorAnalyzer
Class to analyze tensor subsumption.
Definition
AclSubTensorAnalyzer.h:32
onert::backend::acl_common::AclTensorBuilder
Definition
AclTensorBuilder.h:39
onert::backend::acl_neon::Optimizer::Optimizer
Optimizer(BackendContext *context)
Definition
Optimizer.cc:29
onert::backend::acl_neon::Optimizer::optimize
void optimize()
Definition
Optimizer.cc:36
onert::ir::Graph::operations
const Operations & operations() const override
Definition
Graph.h:112
onert::util::Index< uint32_t, OperationIndexTag >
onert::util::ObjectManager::iterate
void iterate(const std::function< void(const Index &, const Object &)> &fn) const
Iterate over the container with given function.
Definition
ObjectManager.h:184
onert::backend::acl_neon
Definition
Backend.h:32
std
Definition
CircleExporterUtils.h:53
Optimizer.h
logging.h
onert::ir::IOperation
Definition
IOperation.h:32
onert::ir::IOperation::accept
virtual void accept(OperationVisitor &v) const =0
runtime
onert
backend
acl_neon
Optimizer.cc
Generated by
1.9.8