In this blog series, I discuss various topics regarding Kria.
Introduction
If you did not see my overview of the new Kria KV260 Vision AI Starter Kit, check it out on hackster:
I wanted to reproduce the benchmarks that were reported in the WP529 White Paper : "Kria K26 SOM: The Ideal Platform for Vision AI at the Edge".
As described in my hackster project, Kria now includes management of "app"s that can be installed, loaded, and unloaded, at runtime.
This is an extremely convenient feature, but as a result will not make all pre-built models from the Xilinx model zoo available. Only the models used by each "app" are installed.
In order to reproduce the benchmarks, I had to first rebuild all the models from the model zoo for the Kria apps.
As you may suspect, the DPU used "can" be different for each "app", since each app includes a new bitstream.
Here is the workflow I describe in this blog:
- choose an app to use for benchmarking
- determine the DPU configuration used by the app
- compile the model zoo for this DPU configuration
- copy model zoo to Kria
- install VART runtime
- install Vitis-AI-Library examples
- run benchmarks
- measure power
I chose to use the smartcam app.
Determining the DPU configuration
There are several ways to determine the DPU configuration for each app.
The first is to simply check the Kria app store:
https://xilinx.github.io/kria-apps-docs/master/docs/smartcamera/docs/customize_ai_models.html
https://xilinx.github.io/kria-apps-docs/master/docs/aibox-reid/docs/customize_ai_models-aib.html
From these descriptions, we know that the "smartcam" and "aibox-reid" apps use the B3136 DPU.
They also indicate to the use the following arch.json file to compile AI models for this DPU architecture.
{
"fingerprint":"0x1000020F6014406"
}
This is an encrypted version of the following more human-readable version, which I will use:
{
"target":"DPUCZDX8G_ISA0_B3136_MAX_BG2"
}
Another way to query the DPU configuration is to use dexplorer. The dexplorer comes with the DNNDK runtime, and can be installed as follows:
root@xilinx-k26-starterkit-2020_2:~# dnf install dnndk-dev
Attempting to use dexplorer on the KV260 turned out to be a little tricky since it expects the presence of a /usr/lib/dpu.xclbin file.
root@xilinx-k26-starterkit-2020_2:~# dexplorer --whoami
[DNNDK_XRT] Cannot find device, index: 0
root@xilinx-k26-starterkit-2020_2:~# xmutil unloadapp
Removing accel /lib/firmware/xilinx/kv260-dp
root@xilinx-k26-starterkit-2020_2:~# xmutil loadapp kv260-smartcam
...
DFX-MGRD> Loaded kv260-smartcam successfully
root@xilinx-k26-starterkit-2020_2:~# dexplorer --whoami
[DNNDK_XRT] Invalid bitstream: /usr/lib/dpu.xclbin
root@xilinx-k26-starterkit-2020_2:~# ls /usr/lib/dpu.xclbin
ls: cannot access '/usr/lib/dpu.xclbin': No such file or directory
root@xilinx-k26-starterkit-2020_2:~# ls /lib/firmware/xilinx/kv260-smartcam/kv260-smartcam.xclbin
/lib/firmware/xilinx/kv260-smartcam/kv260-smartcam.xclbin
root@xilinx-k26-starterkit-2020_2:~# ln -s /lib/firmware/xilinx/kv260-smartcam/kv260-smartcam.xclbin /usr/lib/dpu.xclbin
root@xilinx-k26-starterkit-2020_2:~# dexplorer --whoami
[DPU IP Spec]
IP Timestamp : 2020-11-02 15:15:00
DPU Core Count : 1
[DPU Core Configuration List]
DPU Core : #0
DPU Enabled : Yes
DPU Arch : B3136
DPU Target Version : v1.4.1
DPU Freqency : 300 MHz
Ram Usage : Low
DepthwiseConv : Enabled
DepthwiseConv+Relu6 : Enabled
Conv+Leakyrelu : Enabled
Conv+Relu6 : Enabled
Channel Augmentation : Enabled
Average Pool : Enabled
root@xilinx-k26-starterkit-2020_2:~#
This confirms that the KV260 smartcam app has a B3136 DPU, with low RAM usage.
Compiling the Model Zoo for Kria
The compilation process went very smoothly with the previously defined arch.json file and the following script:
https://github.com/Avnet/vitis/blob/2020.2/app/zoo/compile_modelzoo.sh
For instructions on how to use this script, please refer to Appendix 1 in my Hackster.IO project:
http://avnet.me/vitis-ai-1.3-project
The resulting vitis_ai_library/models directory was copied to the SD card image’s /usr/share/vitis_ai_library directory.
Since I have built the modelzoo for the B3136 (low ram) DPU architecture, I have made it available here :
http://avnet.me/kv260-b3136lr-modelzoo-v1.3
Copying the Model Zoo to Kria
Before copy the model zoo, we need to determine if there is enough space on the root file system. This can be achieve with the "df" command.
root@xilinx-k26-starterkit-2020_2:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 1490120 4 1490116 1% /dev
/dev/mmcblk0p2 3029196 895236 1957832 32% /
tmpfs 2014784 180 2014604 1% /run
tmpfs 2014784 224 2014560 1% /var/volatile
/dev/mmcblk0p1 1062864 371660 691204 35% /boot
root@xilinx-k26-starterkit-2020_2:~#
The size of the boot partition is only 1GB, and the size of the root file system ( / ) is only 3GB, so clearly the 16GB micro SDcard is not being used to its full capacity.
Since the pre-built model zoo is over 5GB in size, we need to expand the root file system ( / ). I used a script in Xilinx's dpu_optimize package to accomplish this:
root@xilinx-k26-starterkit-2020_2:~# wget https://github.com/Xilinx/Vitis-AI/raw/v1.3/dsa/DPU-TRD/app/dpu_sw_optimize.tar.gz
Connecting to github.com (140.82.114.3:443)
wget: note: TLS certificate validation not implemented
Connecting to raw.githubusercontent.com (185.199.111.133:443)
saving to 'dpu_sw_optimize.tar.gz'
dpu_sw_optimize.tar. 100% |********************************************************************************| 6581 0:00:00 ETA
'dpu_sw_optimize.tar.gz' saved
root@xilinx-k26-starterkit-2020_2:~# tar -xvzf dpu_sw_optimize.tar.gz
dpu_sw_optimize/
dpu_sw_optimize/zynqmp/
dpu_sw_optimize/zynqmp/functions/
dpu_sw_optimize/zynqmp/functions/irps5401
dpu_sw_optimize/zynqmp/functions/ext4_auto_resize.sh
dpu_sw_optimize/zynqmp/functions/zynqmp_qos_en.sh
dpu_sw_optimize/zynqmp/functions/irps5401.c
dpu_sw_optimize/zynqmp/README.md
dpu_sw_optimize/zynqmp/zynqmp_dpu_optimize.sh
root@xilinx-k26-starterkit-2020_2:~# cd dpu_sw_optimize/zynqmp/
root@xilinx-k26-starterkit-2020_2:~/dpu_sw_optimize/zynqmp# ./zynqmp_dpu_optimize.sh
Auto resize ext4 partition ...[✔]
Start QoS config ...[✔]
root@xilinx-k26-starterkit-2020_2:~/dpu_sw_optimize/zynqmp#
root@xilinx-k26-starterkit-2020_2:~/dpu_sw_optimize/zynqmp# cd -
/home/root
root@xilinx-k26-starterkit-2020_2:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 1490120 4 1490116 1% /dev
/dev/mmcblk0p2 14067652 901472 12537864 7% /
tmpfs 2014784 184 2014600 1% /run
tmpfs 2014784 224 2014560 1% /var/volatile
/dev/mmcblk0p1 1062864 371660 691204 35% /boot
root@xilinx-k26-starterkit-2020_2:~#
We now have 12GB available on the root file system. We can copy the model zoo over to the SD card's root file system partition.
The Vitis-AI-Library example applications expect these models to be in the following directory, so that is where I put them.
/usr/share/vitis_ai_library/models
If you have built the model zoo yourself, you can copy it to the SD card using a native linux machine.
$ ls /media/abbeef/root/vitis_ai_library
samples
$ sudo cp -r vitis_ai_library/models /media/abbeef/root/usr/shared/vitis_ai_library/.
Alternatively, you can download and extract it on the Kria device directly using wget and tar:
root@xilinx-k26-starterkit-2020_2:~# wget http://avnet.me/kv260-b3136lr-modelzoo-v1.3 -O kv260-b3136lr-modelzoo-v1.3.tar.xz
Connecting to avnet.me (12.9.136.95:80)
Connecting to avnet.me (12.9.136.95:443)
wget: note: TLS certificate validation not implemented
Connecting to docs.avnet.com (12.9.136.156:443)
saving to 'kv260-b3136lr-modelzoo-v1.3.tar.xz'
kv260-b3136lr-modelz 100% |********************************************************************************| 2121M 0:00:00 ETA
'kv260-b3136lr-modelzoo-v1.3.tar.xz' saved
root@xilinx-k26-starterkit-2020_2:~# mkdir -p /usr/share/vitis_ai_library
root@xilinx-k26-starterkit-2020_2:~# tar -xvJf kv260-b3136lr-modelzoo-v1.3.tar.xz -C /usr/share/vitis_ai_library/
...
The complete list of models in the model zoo can be queried as follows:
root@xilinx-k26-starterkit-2020_2:~# ls /usr/share/vitis_ai_library/models/
ENet_cityscapes_pt inception_v2_tf pointpillars_kitti_12000_0_pt ssd_mobilenet_v1_coco_tf
FPN-resnet18_Endov inception_v3 pointpillars_kitti_12000_1_pt ssd_mobilenet_v2
FPN-resnet18_covid19-seg_pt inception_v3_tf refinedet_VOC_tf ssd_mobilenet_v2_coco_tf
FPN_Res18_Medical_segmentation inception_v3_tf2 refinedet_baseline ssd_pedestrian_pruned_0_97
MLPerf_resnet50_v1.5_tf inception_v4 refinedet_pruned_0_8 ssd_resnet_50_fpn_coco_tf
MT-resnet18_mixed_pt inception_v4_2016_09_09_tf refinedet_pruned_0_92 ssd_traffic_pruned_0_9
RefineDet-Medical_EDD_tf medical_seg_cell_tf2 refinedet_pruned_0_96 ssdlite_mobilenet_v2_coco_tf
SemanticFPN_cityscapes_pt mlperf_ssd_resnet34_tf reid tiny_yolov3_vmss
densebox_320_320 mobilenet_1_0_224_tf2 resnet18 unet_chaos-CT_pt
densebox_640_360 mobilenet_edge_0_75_tf resnet50 vgg_16_tf
face-quality mobilenet_edge_1_0_tf resnet50_tf2 vgg_19_tf
face-quality_pt mobilenet_v1_0_25_128_tf resnet_v1_101_tf vpgnet_pruned_0_99
face_landmark mobilenet_v1_0_5_160_tf resnet_v1_152_tf yolov2_voc
facerec-resnet20_mixed_pt mobilenet_v1_1_0_224_tf resnet_v1_50_tf yolov2_voc_pruned_0_66
facerec_resnet20 mobilenet_v2 resnet_v2_101_tf yolov2_voc_pruned_0_71
facerec_resnet64 mobilenet_v2_1_0_224_tf resnet_v2_152_tf yolov2_voc_pruned_0_77
facereid-large_pt mobilenet_v2_1_4_224_tf resnet_v2_50_tf yolov3_adas_pruned_0_9
facereid-small_pt mobilenet_v2_cityscapes_tf retinaface yolov3_bdd
fpn multi_task salsanext_pt yolov3_voc
hourglass-pe_mpii openpose_pruned_0_3 semantic_seg_citys_tf2 yolov3_voc_tf
inception_resnet_v2_tf personreid-res18_pt sp_net yolov4_leaky_spp_m
inception_v1 personreid-res50_pt squeezenet
inception_v1_tf plate_detect ssd_adas_pruned_0_95
inception_v2 plate_num ssd_inception_v2_coco_tf
Install the VART runtime
The VART runtime and Vitis-AI-Library support can be installed with dnf, if not done so already.
root@xilinx-k26-starterkit-2020_2:~# dnf install vart
Last metadata expiration check: 0:00:54 ago on Tue May 18 10:00:18 2021.
Package vart-1.3.0-r0.0.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
root@xilinx-k26-starterkit-2020_2:~# dnf install vitis-ai-library
Last metadata expiration check: 0:01:00 ago on Tue May 18 10:00:18 2021.
Package vitis-ai-library-1.3.0-r0.0.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
root@xilinx-k26-starterkit-2020_2:~#
Install build tools
In order to build the Vitis-AI-Library examples, we need to install some build tools.
There may be another package that includes the ones I have identified, but installing these packages has worked for me.
root@xilinx-k26-starterkit-2020_2:~# dnf install cmake
root@xilinx-k26-starterkit-2020_2:~# dnf install g++
root@xilinx-k26-starterkit-2020_2:~# dnf install g++-symlinks
root@xilinx-k26-starterkit-2020_2:~# dnf install gcc-symlinks
root@xilinx-k26-starterkit-2020_2:~# dnf install binutils
root@xilinx-k26-starterkit-2020_2:~# dnf install pkgconfig
In addition, the smartcam Kria app has a "development" package define, which also needs to be installed.
root@xilinx-k26-starterkit-2020_2:~# dnf install packagegroup-kv260-smartcam-dev
We also need to install the glog, protobuf, and opencv libraries.
root@xilinx-k26-starterkit-2020_2:~# dnf install libglog-dev
root@xilinx-k26-starterkit-2020_2:~# dnf install libprotobuf-dev
root@xilinx-k26-starterkit-2020_2:~# dnf install packagegroup-petalinux-opencv-dev
And finally, we need to install git.
root@xilinx-k26-starterkit-2020_2:~# dnf install git
Install the Vitis-AI-Library examples
Next, we install the Vitis-AI-Library examples (from the Vitis-AI github repository), along with images and video files (from separate downloadable archives)
root@xilinx-k26-starterkit-2020_2:~# git clone -b v1.3 http://github.com/Xilinx/Vitis-AI
Cloning into 'Vitis-AI'...
warning: redirecting to https://github.com/Xilinx/Vitis-AI/
remote: Enumerating objects: 45300, done.
remote: Counting objects: 100% (1721/1721), done.
remote: Compressing objects: 100% (962/962), done.
remote: Total 45300 (delta 771), reused 1443 (delta 640), pack-reused 43579
Receiving objects: 100% (45300/45300), 1.16 GiB | 8.89 MiB/s, done.
Resolving deltas: 100% (17716/17716), done.
Updating files: 100% (25165/25165), done.
root@xilinx-k26-starterkit-2020_2:~# wget https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_library_r1.3.0_images.tar.gz -O vitis_ai_library_r1.3.0_images.tar.gz
Connecting to www.xilinx.com (23.78.212.102:443)
wget: note: TLS certificate validation not implemented
Connecting to xilinx.entitlenow.com (50.18.203.105:443)
Connecting to xilinx-ax-dl.entitlenow.com (23.41.208.67:443)
saving to 'vitis_ai_library_r1.3.0_images.tar.gz'
vitis_ai_library_r1. 100% |********************************************************************************| 178M 0:00:00 ETA
'vitis_ai_library_r1.3.0_images.tar.gz' saved
root@xilinx-k26-starterkit-2020_2:~# wget https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_library_r1.3.0_video.tar.gz -O vitis_ai_library_r1.3.0_video.tar.gz
Connecting to www.xilinx.com (23.78.212.102:443)
wget: note: TLS certificate validation not implemented
Connecting to xilinx.entitlenow.com (50.18.203.105:443)
Connecting to xilinx-ax-dl.entitlenow.com (23.41.208.67:443)
saving to 'vitis_ai_library_r1.3.0_video.tar.gz'
vitis_ai_library_r1. 100% |********************************************************************************| 683M 0:00:00 ETA
'vitis_ai_library_r1.3.0_video.tar.gz' saved
root@xilinx-k26-starterkit-2020_2:~#
root@xilinx-k26-starterkit-2020_2:~# tar -xzvf vitis_ai_library_r1.3.0_images.tar.gz -C Vitis-AI/demo/Vitis-AI-Library
...
root@xilinx-k26-starterkit-2020_2:~# tar -xzvf vitis_ai_library_r1.3.0_video.tar.gz -C Vitis-AI/demo/Vitis-AI-Library
...
root@xilinx-k26-starterkit-2020_2:~#
Run Benchmarks
Prior to running the Vitis-AI-Library benchmarking applications, we need to load the smartcam app.
root@xilinx-k26-starterkit-2020_2:~# xmutil unloadapp
Removing accel /lib/firmware/xilinx/kv260-dp
root@xilinx-k26-starterkit-2020_2:~# xmutil loadapp kv260-smartcam
[ 1781.374226] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
[ 1781.384313] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/fpga-config-from-dmabuf
[ 1781.395267] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
[ 1781.404839] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/zynqmp-display@fd4a0000/status
[ 1781.415968] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/zynqmp-display@fd4a0000/zynqmp_dp_snd_pcm0/status
[ 1781.428743] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/zynqmp-display@fd4a0000/zynqmp_dp_snd_pcm1/status
[ 1781.441515] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/zynqmp-display@fd4a0000/zynqmp_dp_snd_card/status
[ 1781.454288] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/zynqmp-display@fd4a0000/zynqmp_dp_snd_codec0/status
[ 1781.467831] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay0
[ 1781.477662] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay1
[ 1781.487488] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0
[ 1781.496965] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0
[ 1781.506879] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking1
[ 1781.516792] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay2
[ 1781.526619] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay7
[ 1781.536444] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0
[ 1781.546444] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_1
[ 1781.556445] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_2
[ 1781.566451] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_5
[ 1781.576450] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_6
[ 1781.586450] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay8
[ 1781.596276] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ap1302_clk
[ 1781.606276] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ap1302_vdd
[ 1781.616275] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ap1302_vaa
[ 1781.626274] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ap1302_vddio
[ 1781.636447] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_iic
[ 1781.646187] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/i2c_mux
[ 1781.655925] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ap1302
[ 1781.665578] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/isp_out
[ 1781.675318] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/isp_csiss
[ 1781.685230] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/isp_csiss_out
[ 1781.695489] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/isp_csiss_in
[ 1781.705663] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/isp_fb_wr_csi
[ 1781.715922] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/isp_vcap_csi_in
[ 1781.726356] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay9
[ 1781.736182] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/i2s_audio_formatter
[ 1781.746963] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/audio_rx
[ 1781.756788] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/audio_tx
[ 1781.766615] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay10
[ 1781.776526] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/vcu
[ 1781.785920] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/al5e
[ 1781.795400] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/al5d
[ 1781.804886] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay11
[ 1781.814798] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/zocl
[ 1781.844708] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[ 1782.081422] debugfs: Directory '4-003c' with parent 'regmap' already present!
[ 1789.538930] xlnx_snd_card xlnx_snd_card.1.auto: ASoC: failed to init link xilinx-i2s_playback: -517
[ 1789.548004] xlnx_snd_card xlnx_snd_card.1.auto: xlnx-i2s-snd-card-0 registration failed
[ 1789.556982] xlnx_snd_card xlnx_snd_card.1.auto: ASoC: failed to init link xilinx-i2s_playback: -517
[ 1789.566035] xlnx_snd_card xlnx_snd_card.1.auto: xlnx-i2s-snd-card-0 registration failed
[ 1789.606372] zocl-drm amba:zyxclmm_drm: IRQ index 8 not found
DFX-MGRD> Loaded kv260-smartcam successfully
root@xilinx-k26-starterkit-2020_2:~#
root@xilinx-k26-starterkit-2020_2:~# cd Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification#
We need to build the applications, which can be accomplished with the provided build.sh script:
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./build.sh
The "Inception V4" benchmark can be run with the "inception_v4" model as follows:
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification inception_v4 ./test_performance_classification.list
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 08:54:39.092998 1368 benchmark.hpp:176] writing report to <STDOUT>
I0517 08:54:39.093426 1368 benchmark.hpp:203] waiting for 0/30 seconds, 1 threads running
I0517 08:54:49.093545 1368 benchmark.hpp:203] waiting for 10/30 seconds, 1 threads running
I0517 08:54:59.093717 1368 benchmark.hpp:203] waiting for 20/30 seconds, 1 threads running
I0517 08:55:09.093981 1368 benchmark.hpp:211] waiting for threads terminated
FPS=21.7154
E2E_MEAN=45918.8
DPU_MEAN=44712.8
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification inception_v4 ./test_performance_classification.list -t 2
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 08:55:38.212355 1372 benchmark.hpp:176] writing report to <STDOUT>
I0517 08:55:38.449954 1372 benchmark.hpp:203] waiting for 0/30 seconds, 2 threads running
I0517 08:55:48.450148 1372 benchmark.hpp:203] waiting for 10/30 seconds, 2 threads running
I0517 08:55:58.450333 1372 benchmark.hpp:203] waiting for 20/30 seconds, 2 threads running
I0517 08:56:08.450574 1372 benchmark.hpp:211] waiting for threads terminated
FPS=22.2965
E2E_MEAN=89349.7
DPU_MEAN=88150.2
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification#
The "VGG-16" benchmark can be run with the "vgg_16_tf" model as follows:
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification vgg_16_tf ./test_performance_classification.list
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 08:58:34.406569 1377 benchmark.hpp:176] writing report to <STDOUT>
I0517 08:58:34.406996 1377 benchmark.hpp:203] waiting for 0/30 seconds, 1 threads running
I0517 08:58:44.407114 1377 benchmark.hpp:203] waiting for 10/30 seconds, 1 threads running
I0517 08:58:54.407289 1377 benchmark.hpp:203] waiting for 20/30 seconds, 1 threads running
I0517 08:59:04.407541 1377 benchmark.hpp:211] waiting for threads terminated
FPS=24.6415
E2E_MEAN=40484.6
DPU_MEAN=39740.1
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification vgg_16_tf ./test_performance_classification.list -t 2
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 08:59:13.142040 1379 benchmark.hpp:176] writing report to <STDOUT>
I0517 08:59:13.173197 1379 benchmark.hpp:203] waiting for 0/30 seconds, 2 threads running
I0517 08:59:23.173395 1379 benchmark.hpp:203] waiting for 10/30 seconds, 2 threads running
I0517 08:59:33.173573 1379 benchmark.hpp:203] waiting for 20/30 seconds, 2 threads running
I0517 08:59:43.173820 1379 benchmark.hpp:211] waiting for threads terminated
FPS=25.1091
E2E_MEAN=79404.2
DPU_MEAN=78672.6
The "Tiny Yolo V3" benchmark can be run with the "tiny_yolov3_vmss" model as follows:
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification tiny_yolov3_vmss ./test_performance_classification.list
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 09:01:08.726274 1383 benchmark.hpp:176] writing report to <STDOUT>
I0517 09:01:08.726711 1383 benchmark.hpp:203] waiting for 0/30 seconds, 1 threads running
I0517 09:01:18.726832 1383 benchmark.hpp:203] waiting for 10/30 seconds, 1 threads running
I0517 09:01:28.727010 1383 benchmark.hpp:203] waiting for 20/30 seconds, 1 threads running
I0517 09:01:38.727262 1383 benchmark.hpp:211] waiting for threads terminated
FPS=87.567
E2E_MEAN=11412.4
DPU_MEAN=9558.2
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification tiny_yolov3_vmss ./test_performance_classification.list -t 2
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 09:01:50.013595 1390 benchmark.hpp:176] writing report to <STDOUT>
I0517 09:01:50.048226 1390 benchmark.hpp:203] waiting for 0/30 seconds, 2 threads running
I0517 09:02:00.048419 1390 benchmark.hpp:203] waiting for 10/30 seconds, 2 threads running
I0517 09:02:10.048614 1390 benchmark.hpp:203] waiting for 20/30 seconds, 2 threads running
I0517 09:02:20.048866 1390 benchmark.hpp:211] waiting for threads terminated
FPS=104.659
E2E_MEAN=19094.4
DPU_MEAN=17283.1
The "ResNet-50" benchmark can be run with the "resnet50" model as follows:
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification resnet50 ./test_performance_classification.list
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 09:02:48.036540 1397 benchmark.hpp:176] writing report to <STDOUT>
I0517 09:02:48.036958 1397 benchmark.hpp:203] waiting for 0/30 seconds, 1 threads running
I0517 09:02:58.037081 1397 benchmark.hpp:203] waiting for 10/30 seconds, 1 threads running
I0517 09:03:08.037258 1397 benchmark.hpp:203] waiting for 20/30 seconds, 1 threads running
I0517 09:03:18.037518 1397 benchmark.hpp:211] waiting for threads terminated
FPS=56.6142
E2E_MEAN=17623.9
DPU_MEAN=16854
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification resnet50 ./test_performance_classification.list -t 2
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 09:03:29.841747 1400 benchmark.hpp:176] writing report to <STDOUT>
I0517 09:03:29.959035 1400 benchmark.hpp:203] waiting for 0/30 seconds, 2 threads running
I0517 09:03:39.959229 1400 benchmark.hpp:203] waiting for 10/30 seconds, 2 threads running
I0517 09:03:49.959414 1400 benchmark.hpp:203] waiting for 20/30 seconds, 2 threads running
I0517 09:03:59.959667 1400 benchmark.hpp:211] waiting for threads terminated
FPS=59.2421
E2E_MEAN=33676.1
DPU_MEAN=32919.4
The "SSD Mobilenet-V1" benchmark can be run with the "ssd_mobilenet_v1_coco_tf" model as follows:
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification ssd_mobilenet_v1_coco_tf ./test_performance_classification.list
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 09:04:33.465210 1403 benchmark.hpp:176] writing report to <STDOUT>
I0517 09:04:33.465633 1403 benchmark.hpp:203] waiting for 0/30 seconds, 1 threads running
I0517 09:04:43.465754 1403 benchmark.hpp:203] waiting for 10/30 seconds, 1 threads running
I0517 09:04:53.465931 1403 benchmark.hpp:203] waiting for 20/30 seconds, 1 threads running
I0517 09:05:03.466182 1403 benchmark.hpp:211] waiting for threads terminated
FPS=121.656
E2E_MEAN=8211.38
DPU_MEAN=7106.28
root@xilinx-k26-starterkit-2020_2:~/Vitis-AI-avnet/demo/Vitis-AI-Library/samples/classification# ./test_performance_classification ssd_mobilenet_v1_coco_tf ./test_performance_classification.list -t 2
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0517 09:05:09.751721 1405 benchmark.hpp:176] writing report to <STDOUT>
I0517 09:05:09.794981 1405 benchmark.hpp:203] waiting for 0/30 seconds, 2 threads running
I0517 09:05:19.795178 1405 benchmark.hpp:203] waiting for 10/30 seconds, 2 threads running
I0517 09:05:29.795367 1405 benchmark.hpp:203] waiting for 20/30 seconds, 2 threads running
I0517 09:05:39.795616 1405 benchmark.hpp:211] waiting for threads terminated
FPS=140.663
E2E_MEAN=14201.6
DPU_MEAN=13083.4
Nearly all of the benchmark results were slightly higher than those reported in the WP529 White Paper.
Top Comments