diff --git a/apps/benchmark/README.md b/apps/benchmark/README.md index e83e47c46eb7dd0343de6327bf94c8089e19d9de..ee22f90dc4358b08ea05928ad9f3579a3cb9a55e 100644 --- a/apps/benchmark/README.md +++ b/apps/benchmark/README.md @@ -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). diff --git a/python/tvm/target.py b/python/tvm/target.py index fed20c3914c682507e39f32a21034b0fdb0130a6..e2d780f752644a139ab4e575ed8a7d37914c2ad7 100644 --- a/python/tvm/target.py +++ b/python/tvm/target.py @@ -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]) diff --git a/tutorials/nnvm/deploy_model_on_rasp.py b/tutorials/nnvm/deploy_model_on_rasp.py index c11f202c1251225aef8bdf5f41fe0d286ea8dfe4..40dbdaeb00eeaa53b3a891436c91dd88f3879e3c 100644 --- a/tutorials/nnvm/deploy_model_on_rasp.py +++ b/tutorials/nnvm/deploy_model_on_rasp.py @@ -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(