XiaoMi / mobile-ai-bench

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

Mi Note3 run error: governor: No such file or directory, unused DT entry: type 0xf arg 0xf81 #12

Closed ysh329 closed 6 years ago

ysh329 commented 6 years ago

Hi, I have two problems when running as below.

1. My Installation Step

  1. cloned mobile-ai-bench in docker image registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev on my cross-compile machine using commands below:
    docker pull registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev
    docker run -it --privileged -d --name mace-dev \
           -v /dev/bus/usb:/dev/bus/usb --net=host \
           -v /local/path:/container/path \
           -v /usr/bin/docker:/usr/bin/docker \
           -v /var/run/docker.sock:/var/run/docker.sock \
           registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev
  2. downloaded snpe-1.8.0 and unzip to /opt as below:
    root@cross-compile:/opt# ls
    android-ndk-r12b  android-ndk-r16   mobile-ai-bench  snpe-1.18.0
    android-ndk-r15c  android-ndk-r17b  sdk              snpe-1.18.0.zip
  3. edit snpe in WORKSPACE as below:
    # You need to comment following new_http_archive and uncomment following           
    # new_local_repository to benchmark SNPE                                           
    #new_http_archive(                                                                 
    #    name = "snpe",                                                                
    #    build_file = "third_party/snpe/snpe.BUILD",                                   
    #    sha256 = "b11780e5e7f591e916c69bdface4a1ef75b0c19f7b43c868bd62c0f3747d3fbb",
    #    strip_prefix = "snpe-1.15.0",                                                 
    #    urls = [                                                                      
    #        "https://cnbj1-fds.api.xiaomi.net/aibench/third_party/snpe-1.15.0.zip",
    #    ],                                                                            
    #)                                                                                 
    # You need to uncomment following new_local_repository and comment foregoing       
    # new_http_archive to benchmark SNPE                                               
    new_local_repository(                                                              
    name = "snpe",                                                                 
    build_file = "third_party/snpe/snpe.BUILD",                                    
    path = "/opt/snpe-1.18.0",                                                     
    )

2. Issues

But build failed with 2 issues:

  1. No such file or directory
    /system/bin/sh: can't create /sys/class/devfreq/soc:qcom,l3-cdsp/governor: No such file or directory
  2. unused DT entry: type 0xf arg 0xf81
    WARNING: linker: /data/local/tmp/aibench/model_benchmark: unused DT entry: type 0xf arg 0xf81
    ('snpe', 'CPU', 'MobileNetV2')

3. Error Log

root@cross-compile:/opt/mobile-ai-bench# python tools/benchmark.py --output_dir=output --frameworks=snpe \
> 
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.
INFO: Analysed target //aibench/benchmark:model_benchmark (17 packages loaded).
INFO: Found 1 target...
Target //aibench/benchmark:model_benchmark up-to-date:
  bazel-bin/aibench/benchmark/model_benchmark
INFO: Elapsed time: 61.398s, Critical Path: 1.79s
INFO: 3 processes, local.
INFO: Build completed successfully, 5 total actions
Build done!

=====================================================================
Trying to lock device ac516aca
Run on device: ac516aca, sdm660, Mi Note 3
Adjust power to performance mode on ac516aca, sdm660
adbd is already running as root
remount succeeded
/system/bin/sh: can't create /sys/class/devfreq/1d84000.ufshc/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/aa00000.qcom,vidc:arm9_bus_ddr/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/aa00000.qcom,vidc:bus_cnoc/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/aa00000.qcom,vidc:venus_bus_ddr/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/aa00000.qcom,vidc:venus_bus_llcc/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/soc:qcom,l3-cdsp/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/soc:qcom,l3-cpu0/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/soc:qcom,l3-cpu4/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/soc:qcom,llccbw/governor: No such file or directory
/system/bin/sh: can't create /sys/class/devfreq/soc:qcom,snoc_cnoc_keepalive/governor: No such file or directory
647000000
/system/bin/sh: can't create /d/dri/0/debug/core_perf/perf_mode: No such file or directory
/system/bin/sh: can't create /sys/block/sda/queue/nr_requests: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu0/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu0/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu1/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu1/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu2/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu2/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu3/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu3/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu4/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu4/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu5/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu5/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu6/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu6/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu7/pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/cpu7/rail-pc/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/l3-wfi/idle_enabled: No such file or directory
/system/bin/sh: can't create /sys/module/lpm_levels/L3/llcc-off/idle_enabled: No such file or directory
Push bazel-bin/aibench/benchmark/model_benchmark to /data/local/tmp/aibench
Run /data/local/tmp/aibench/model_benchmark
('snpe', 'CPU', 'MobileNetV1')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'CPU', 'MobileNetV2')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'CPU', 'SqueezeNetV11')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'CPU', 'InceptionV3')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'CPU', 'VGG16')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'GPU', 'MobileNetV1')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'GPU', 'MobileNetV2')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'GPU', 'SqueezeNetV11')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'GPU', 'InceptionV3')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'GPU', 'VGG16')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'DSP', 'MobileNetV1')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'DSP', 'MobileNetV2')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'DSP', 'SqueezeNetV11')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'DSP', 'InceptionV3')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
('snpe', 'DSP', 'VGG16')
WARNING: linker: "/data/local/tmp/aibench/model_benchmark" unused DT entry: type 0xf arg 0xf81
lee-bin commented 6 years ago
  1. We use tools/power.sh to try to get a stable result. But different mobile devices may have different file path to set, so it may not run perfectly on different targets. Nevertheless, we try our best to make the benchmark result relatively reasonable even if tools/power.sh does not run perfectly.
  2. It's just a warning about unused entries and does not affect benchmark result.
ysh329 commented 6 years ago

@lee-bin Thanks. Besides, I found prepare_report.csv and run_report.csv but without benchmark result as below:

root@cross-compile:/opt/mobile-ai-bench# ls
aibench    bazel-genfiles         bazel-out       BUILD    logo.png  README.md     third_party  WORKSPACE
bazel-bin  bazel-mobile-ai-bench  bazel-testlogs  LICENSE  output    README_zh.md  tools
root@cross-compile:/opt/mobile-ai-bench# cat output/run_report.csv 
model_name,device_name,soc,abi,runtime,MACE,SNPE,NCNN,TFLITE
root@cross-compile:/opt/mobile-ai-bench# cat output/prepare_report.csv 
model_name,device_name,soc,abi,runtime,MACE,SNPE,NCNN,TFLITE
lee-bin commented 6 years ago

You should read carefully about README.md. SNPE should be upper case now.

ysh329 commented 6 years ago

@lee-bin Thanks. 😭