|
1 |
| -# cvm-runtime |
2 |
| -CVM Runtime |
| 1 | +# Test the cvm-runtime under QEMU with RISC-V support |
3 | 2 |
|
4 |
| - |
5 |
| - |
6 |
| -## Latency |
7 |
| - |
8 |
| -model| Jetson Nano \- Cortex\-A57(s) | Intel E5\-2650(s) | Jetson Nano \- GPU(128 CUDA Cores)(s) | 1080Ti(3584 CUDA Cores)(s) |
9 |
| --|-|-|-|- |
10 |
| -yolo_tfm | | | 1.076 | 0.043 |
11 |
| -resnet50_mxg | 1.2076| 0.3807| 0.147 | 0.009 |
12 |
| -resnet18_v1 | | | 0.055 | 0.004 |
13 |
| -qd10_resnet20_v2 || | 0.064 | 0.010 |
14 |
| -resnet50_v2 |1.4674| 0.5005 | 0.185 | 0.010 |
15 |
| -qd10_resnet20_v2|0.2944|0.1605 | 0.065 | 0.012 |
16 |
| -trec | 0.0075| 0.0028 | 0.002 | 0.001 |
17 |
| -dcnet_mnist_v1|0.0062|0.0057 | 0.002 | 0.001 |
18 |
| -mobilenetv1.0_imagenet|0.3508| 0.1483| 0.039 | 0.002 |
19 |
| -resnet50_v1_imagenet|1.2453| 0.3429 | 0.150 | 0.009 |
20 |
| -animal10 | 0.3055 | 0.1466 | 0.065 | 0.010 |
21 |
| -vgg16_gcv|4.3787| 0.6092 | 0.713 | 0.021 |
22 |
| -sentiment_trec|0.0047| 0.0022 | 0.002 | 0.001 |
23 |
| -vgg19_gcv|5.1753| 0.7513 | 0.788 | 0.023 |
24 |
| -squeezenet_gcv1.1|0.3889| 0.0895 | 0.044 | 0.002 |
25 |
| -squeezenet_gcv1.0|0.1987| 0.1319 | 0.064 | 0.003 |
26 |
| -shufflenet|1.4575| 0.7697 | 0.140 | 0.004 |
27 |
| -ssd| | |0.773 | 0.030 |
28 |
| -ssd_512_mobilenet1.0_coco_tfm| | | 0.311 | 0.016 |
29 |
| -ssd_512_mobilenet1.0_voc_tfm| | | 0.220 | 0.014 |
| 3 | +## Config The QEMU Environment |
| 4 | +You will need to refer to this [documentation](https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html) to download and install the following: |
| 5 | +``` |
| 6 | +1. https://github.com/riscv/riscv-gnu-toolchain : master |
| 7 | +2. https://github.com/qemu/qemu : v3.0.0 |
| 8 | +3. https://github.com/torvalds/linux : v4.19 |
| 9 | +4. https://github.com/riscv/riscv-pk : master |
| 10 | +5. https://github.com/michaeljclark/busybear-linux : master |
| 11 | +``` |
| 12 | +## Testing |
| 13 | +1. git clone git@github.com:CortexFoundation/cvm-runtime.git |
| 14 | +2. git checkout riscv |
| 15 | +3. cp cmake/config . (in cvm-runtime directory) |
| 16 | +4. make lib && make test_model_riscv |
| 17 | +5. cd ${busybear-linux directory} |
| 18 | +6. mkdir etc/tests |
| 19 | +7. cp ~/cvm-runtime/build/libcvm.so ~/cvm-runtime/build/tests/test_model_riscv etc/tests/ |
| 20 | +8. modify scripts/start-qemu.sh: |
| 21 | +``` |
| 22 | + 32 # construct command |
| 23 | + 33 cmd="${QEMU_SYSTEM_BIN} -nographic -machine virt \ |
| 24 | + 34 -kernel build/riscv-pk/bbl \ |
| 25 | + 35 -m 2G \ |
| 26 | + 36 -append \"root=/dev/vda ro console=ttyS0\" \ |
| 27 | + 37 -drive file=busybear.bin,format=raw,id=hd0 \ |
| 28 | + 38 -device virtio-blk-device,drive=hd0 \ |
| 29 | + 39 -netdev ${QEMU_NETDEV},id=net0 \ |
| 30 | + 40 -device virtio-ne |
| 31 | +``` |
| 32 | +9. make clean && make && ./scripts/start-qemu.sh |
| 33 | +10. login as root, and password is busybear |
| 34 | +11. cd /etc/tests |
| 35 | +12. export LD_LIBRARY_PATH=/etc/tests |
| 36 | +13. ./test_model_riscv |
0 commit comments