【TVM学习七】Reproduce Benchmark

参考链接:Benchmark results

                  How to Reproduce


一. 基于RK3399/ARM-CPU的测试

1. 在本地PC上开启RPC Tracker

    python3 -m tvm.exec.rpc_tracker

    运行完显示如下:

    INFO:root:If you are running ROCM/Metal, fork will cause compiler internal error. Try to launch with arg ```--no-fork```
    INFO:RPCTracker:bind to 0.0.0.0:9190

2. 在RK3399上Register devices to the tracker

    python3 -m tvm.exec.rpc_server --tracker=172.20.15.184:9190 --key=rk3399

    运行完显示如下:

    INFO:root:If you are running ROCM/Metal, fork will cause compiler internal error. Try to launch with arg ```--no-fork```
    INFO:RPCServer:bind to 0.0.0.0:9090

3. 在本地PC上Verify the device registration We can query all registered devices by

    python3 -m tvm.exec.query_rpc_tracker

    运行完显示如下:

    Tracker address localhost:9190

    Server List
    ----------------------------
    server-address    key
    ----------------------------
    172.20.15.65:34300    server:rk3399
    ----------------------------

    Queue Status
    ------------------------------
    key      total  free  pending
    ------------------------------
    rk3399   1      1     0      
    ------------------------------

4. 在本地PC上Run benchmark

    # ARM CPU

    python3 arm_cpu_imagenet_bench.py --model rk3399 --rpc-key rk3399

【TVM学习七】Reproduce Benchmark_第1张图片

    # ---------------------------- Mali GPU ------------------------------ #

    # NOTE: To make the test environment more stable, we close GUI and lock the frequency

    sudo /etc/init.d/lightdm stop

    sudo -i

    echo performance > /sys/class/misc/mali0/device/devfreq/ff9a0000.gpu/governor

    python3 mobile_gpu_imagenet_bench.py --model rk3399 --rpc-key rk3399

    python3 mobile_gpu_imagenet_bench.py --model rk3399 --rpc-key rk3399 --dtype float16


 

你可能感兴趣的:(TVM,TVM—End,to,End,Deep,Learning,Compiler,Stack)