AI-performance / embedded-ai.bench

benchmark for embededded-ai deep learning inference engines, such as NCNN / TNN / MNN / TensorFlow Lite etc.
https://www.ai-performance.com
Other
202 stars 29 forks source link

[BUG] NCNN特殊机型兼容错误CANNOT LINK EXECUTABLE: library "libvulkan.so" not found #20

Closed ysh329 closed 4 years ago

ysh329 commented 4 years ago

金立M6,SoC为MT6755

[INFO] [2020-07-20:10:31:17,894 engine.py:343 run_bench] ==== run_bench ====
[DEBUG] [2020-07-20:10:31:17,894 engine.py:359 run_bench] didx:0, serial_num:HEZLGMPNQWHABINZ
[DEBUG] [2020-07-20:10:31:17,894 engine.py:368 run_bench] midx:0, model_name:caffe_mobilenetv1.opt, model_dir:/data/local/tmp/ai-performance/ncnn/caffe_mobilenetv1.opt.param
[DEBUG] [2020-07-20:10:31:17,894 engine.py:383 run_bench] pidx:0, platform:android-armv8
[DEBUG] [2020-07-20:10:31:17,894 engine.py:388 run_bench] bidx:0, backend:0
[INFO] [2020-07-20:10:31:17,894 engine.py:398 run_bench] 

bench_case_idx(from 1):1
[INFO] [2020-07-20:10:31:17,894 cmd.py:16 run_cmd] CMD> adb -s HEZLGMPNQWHABINZ shell /data/local/tmp/ai-performance/ncnn/android-armv8/benchncnn /data/local/tmp/ai-performance/ncnn/caffe_mobilenetv1.opt.param 1000 2 1 2 0
[DEBUG] [2020-07-20:10:31:17,934 cmd.py:30 run_cmd] CMD finished
[DEBUG] [2020-07-20:10:31:17,935 cmd.py:59 run_cmd] CMD consume 0 seconds to finish
[DEBUG] [2020-07-20:10:31:17,936 cmd.py:65 run_cmd] cmd_res:('CANNOT LINK EXECUTABLE: library "libvulkan.so" not found\n', '')
[INFO] [2020-07-20:10:31:17,936 engine.py:584 parse_benchmark] ==== parse_benchmark ====
[DEBUG] [2020-07-20:10:31:17,936 engine.py:586 parse_benchmark] ['CANNOT LINK EXECUTABLE: library "libvulkan.so" not found']
[DEBUG] [2020-07-20:10:31:17,937 engine.py:615 parse_benchmark] output_lines:
[]
[INFO] [2020-07-20:10:31:17,937 engine.py:679 tearDown] TestEngine tearDown
F
======================================================================
FAIL: test_ncnn_engine (__main__.TestEngine)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "engine.py", line 746, in test_ncnn_engine
    bench_dict = ncnn.run_bench()
  File "engine.py", line 445, in run_bench
    perf_dict = self.parse_benchmark(cmd_handle)
  File "engine.py", line 616, in parse_benchmark
    assert len(output_lines) == 1
AssertionError

----------------------------------------------------------------------
Ran 2 tests in 16.069s

FAILED (failures=1)
ysh329 commented 4 years ago

对于NCNN,可能需要:

  1. 加入类似如bool is_vulkan_valid()的预判API提供给用户;
  2. 要么或者回退CPU计算并给出提示;
  3. 让用户知道该后端的Predictor/Executor是否创建成功,并给出返回值。

目前bench里做了该错误的关键词"libvulkan.so" not found捕获,结果返回全0。