Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
e282915a
Commit
e282915a
authored
Aug 16, 2018
by
Lianmin Zheng
Committed by
Tianqi Chen
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add -mattr=+neon for all arm cpu target (#1612)
parent
093dc741
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
apps/benchmark/README.md
+7
-4
python/tvm/target.py
+8
-8
tutorials/nnvm/deploy_model_on_rasp.py
+1
-1
No files found.
apps/benchmark/README.md
View file @
e282915a
...
@@ -63,8 +63,11 @@ python3 -m tvm.exec.rpc_tracker
...
@@ -63,8 +63,11 @@ python3 -m tvm.exec.rpc_tracker
python3 arm_cpu_imagenet_bench.py --device mate10pro --rpc-key mate10pro
python3 arm_cpu_imagenet_bench.py --device mate10pro --rpc-key mate10pro
```
```
If your device has a same SoC of the above device, you can reuse these parameters
If your device has a same or similar SoC of the above devices, you can reuse these parameters.
(e.g. use
`llvm -device=arm_cpu -mode=rk3399 -target=aarch64-linux-gnu`
as target).
For example, if your SoC is similar to rasp3b, use
Otherwise, you need to tune for your own device, please follow this
```bash
[
tutorial
](
https://docs.tvm.ai/tutorials/autotvm/tune_nnvm_arm.html
)
.
python3 arm_cpu_imagenet_bench.py --device rasp3b --rpc-key your_custom_key
```
For other devices, to get the best performance, it is recommended that you tune your network by yourself.
Please follow this
[
tutorial
](
https://docs.tvm.ai/tutorials/autotvm/tune_nnvm_arm.html
)
.
python/tvm/target.py
View file @
e282915a
...
@@ -427,14 +427,14 @@ def arm_cpu(model='unknown', options=None):
...
@@ -427,14 +427,14 @@ def arm_cpu(model='unknown', options=None):
from
.
import
autotvm
from
.
import
autotvm
trans_table
=
{
trans_table
=
{
"pixel2"
:
[
"-model=snapdragon835"
,
"-target=arm64-linux-android"
],
"pixel2"
:
[
"-model=snapdragon835"
,
"-target=arm64-linux-android
-mattr=+neon
"
],
"mate10"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android"
],
"mate10"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android
-mattr=+neon
"
],
"mate10pro"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android"
],
"mate10pro"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android
-mattr=+neon
"
],
"p20"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android"
],
"p20"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android
-mattr=+neon
"
],
"p20pro"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android"
],
"p20pro"
:
[
"-model=kirin970"
,
"-target=arm64-linux-android
-mattr=+neon
"
],
"rasp3b"
:
[
"-model=bcm2837"
,
"-target=armv7l-linux-gnueabihf"
],
"rasp3b"
:
[
"-model=bcm2837"
,
"-target=armv7l-linux-gnueabihf
-mattr=+neon
"
],
"rk3399"
:
[
"-model=rk3399"
,
"-target=aarch64-linux-gnu"
],
"rk3399"
:
[
"-model=rk3399"
,
"-target=aarch64-linux-gnu
-mattr=+neon
"
],
"pynq"
:
[
"-model=pynq"
,
"-target=armv7a-linux-eabi"
],
"pynq"
:
[
"-model=pynq"
,
"-target=armv7a-linux-eabi
-mattr=+neon
"
],
}
}
pre_defined_opt
=
trans_table
.
get
(
model
,
[
"-model=
%
s"
%
model
])
pre_defined_opt
=
trans_table
.
get
(
model
,
[
"-model=
%
s"
%
model
])
...
...
tutorials/nnvm/deploy_model_on_rasp.py
View file @
e282915a
...
@@ -154,7 +154,7 @@ if local_demo:
...
@@ -154,7 +154,7 @@ if local_demo:
else
:
else
:
target
=
tvm
.
target
.
arm_cpu
(
'rasp3b'
)
target
=
tvm
.
target
.
arm_cpu
(
'rasp3b'
)
# The above line is a simple form of
# The above line is a simple form of
# target = tvm.target.create('llvm -devcie=arm_cpu -
target=armv7l-linux-gnueabihf
')
# target = tvm.target.create('llvm -devcie=arm_cpu -
model=bcm2837 -target=armv7l-linux-gnueabihf -mattr=+neon
')
with
nnvm
.
compiler
.
build_config
(
opt_level
=
2
,
add_pass
=
[
'AlterOpLayout'
]):
with
nnvm
.
compiler
.
build_config
(
opt_level
=
2
,
add_pass
=
[
'AlterOpLayout'
]):
graph
,
lib
,
params
=
nnvm
.
compiler
.
build
(
graph
,
lib
,
params
=
nnvm
.
compiler
.
build
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment