Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
e282915a
Commit
e282915a
authored
6 years ago
by
Lianmin Zheng
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add -mattr=+neon for all arm cpu target (#1612)
parent
093dc741
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/benchmark/README.md
+7
-4
7 additions, 4 deletions
apps/benchmark/README.md
python/tvm/target.py
+8
-8
8 additions, 8 deletions
python/tvm/target.py
tutorials/nnvm/deploy_model_on_rasp.py
+1
-1
1 addition, 1 deletion
tutorials/nnvm/deploy_model_on_rasp.py
with
16 additions
and
13 deletions
apps/benchmark/README.md
+
7
−
4
View file @
e282915a
...
...
@@ -63,8 +63,11 @@ python3 -m tvm.exec.rpc_tracker
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
(e.g. use
`llvm -device=arm_cpu -mode=rk3399 -target=aarch64-linux-gnu`
as target).
Otherwise, you need to tune for your own device, please follow this
[
tutorial
](
https://docs.tvm.ai/tutorials/autotvm/tune_nnvm_arm.html
)
.
If your device has a same or similar SoC of the above devices, you can reuse these parameters.
For example, if your SoC is similar to rasp3b, use
```
bash
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
)
.
This diff is collapsed.
Click to expand it.
python/tvm/target.py
+
8
−
8
View file @
e282915a
...
...
@@ -427,14 +427,14 @@ def arm_cpu(model='unknown', options=None):
from
.
import
autotvm
trans_table
=
{
"
pixel2
"
:
[
"
-model=snapdragon835
"
,
"
-target=arm64-linux-android
"
],
"
mate10
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
"
],
"
mate10pro
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
"
],
"
p20
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
"
],
"
p20pro
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
"
],
"
rasp3b
"
:
[
"
-model=bcm2837
"
,
"
-target=armv7l-linux-gnueabihf
"
],
"
rk3399
"
:
[
"
-model=rk3399
"
,
"
-target=aarch64-linux-gnu
"
],
"
pynq
"
:
[
"
-model=pynq
"
,
"
-target=armv7a-linux-eabi
"
],
"
pixel2
"
:
[
"
-model=snapdragon835
"
,
"
-target=arm64-linux-android
-mattr=+neon
"
],
"
mate10
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
-mattr=+neon
"
],
"
mate10pro
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
-mattr=+neon
"
],
"
p20
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
-mattr=+neon
"
],
"
p20pro
"
:
[
"
-model=kirin970
"
,
"
-target=arm64-linux-android
-mattr=+neon
"
],
"
rasp3b
"
:
[
"
-model=bcm2837
"
,
"
-target=armv7l-linux-gnueabihf
-mattr=+neon
"
],
"
rk3399
"
:
[
"
-model=rk3399
"
,
"
-target=aarch64-linux-gnu
-mattr=+neon
"
],
"
pynq
"
:
[
"
-model=pynq
"
,
"
-target=armv7a-linux-eabi
-mattr=+neon
"
],
}
pre_defined_opt
=
trans_table
.
get
(
model
,
[
"
-model=%s
"
%
model
])
...
...
This diff is collapsed.
Click to expand it.
tutorials/nnvm/deploy_model_on_rasp.py
+
1
−
1
View file @
e282915a
...
...
@@ -154,7 +154,7 @@ if local_demo:
else
:
target
=
tvm
.
target
.
arm_cpu
(
'
rasp3b
'
)
# 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
'
]):
graph
,
lib
,
params
=
nnvm
.
compiler
.
build
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment