XiaoMi / mobile-ai-bench

Benchmarking Neural Network Inference on Mobile Devices
Apache License 2.0
353 stars 57 forks source link

build aborted: Analysis failed #8

Closed ysh329 closed 6 years ago

ysh329 commented 6 years ago

Hi, when i executed python ./tools/benchmark.py, it shows logs as below:

$ python tools/benchmark.py 
Prepare to run models on armeabi-v7a
* Build //aibench/benchmark:model_benchmark with ABI armeabi-v7a
/system/lib/libcdsprpc.so does not exists! Skip DSP.
ERROR: /home/yuanshuai/code/mobile-ai-bench/aibench/executors/BUILD:57:1: no such package '@snpe//': Error downloading [https://cnbj1-fds.api.xiaomi.net/aibench/third_party/snpe-1.15.0.zip] to /home/yuanshuai/.cache/bazel/_bazel_yuanshuai/b2ea4545bb4fd72378513cc94a6e5886/external/snpe/snpe-1.15.0.zip: Unknown host: cnbj1-fds.api.xiaomi.net and referenced by '//aibench/executors:snpe_executor'
ERROR: Analysis of target '//aibench/benchmark:model_benchmark' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.434s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)
Traceback (most recent call last):
  File "tools/benchmark.py", line 225, in <module>
    main(unused_args=[sys.argv[0]] + unparsed)
  File "tools/benchmark.py", line 208, in main
    runtimes)
  File "/home/yuanshuai/code/mobile-ai-bench/tools/sh_commands.py", line 206, in bazel_build
    *bazel_args)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1413, in __call__
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/yuanshuai/bin/bazel build //aibench/benchmark:model_benchmark --config android --cpu=armeabi-v7a --action_env=ANDROID_NDK_HOME=/home/yuanshuai/software/android-ndk-r14b --define mace=true --define snpe=true --define ncnn=true --define tflite=true

  STDOUT:

  STDERR:
lee-bin commented 6 years ago

Please read README.md about SNPE carefully. If don't you care about SNPE, then you can SKIP it by setting --frameworks=MACE,NCNN,TFLITE

ysh329 commented 6 years ago

@lee-bin Thanks again!

I have some questions. If I run command below on my computer:

python tools/benchmark.py \
--output_dir=output \
--frameworks=MACE,NCNN,TFLITE \
--runtimes=all -\
-model_names=all \
--target_abis=armeabi-v7a,arm64-v8a
  1. Does this command above automatically build MACE, NCNN, TFLITE? (I only need to define its code directory)
  2. I set target_abis=armeabi-v7a,arm64-v8a, it will search and connect my mobile device using USB automatically?
lee-bin commented 6 years ago
  1. You don't have to get MACE, NCNN or TFLITE. tools/benchmark.py will prepare MACE, NCNN and TFLITE automatically and then build MACE, NCNN and TFLITE inference engine from those libraries and finally run.
  2. Yes if you connected your mobile phone through USB and turned on debug mode.