This directory contains instructions and examples for running DPU-v2 on Zynq Ultrascale+ MPSoC platforms. It can also be applied to Zynq-7000 platforms. DPU-v2 is a configurable computation engine dedicated for convolutional neural networks. It includes a set of highly optimized instructions, and supports most convolutional neural networks, such as VGG, ResNet, GoogleNet, YOLO, SSD, MobileNet, FPN, and others. With Vitis-AI, Xilinx has integrated all the edge and cloud solutions under a unified API and toolset.
Learn More: DPU-v2 Overview
Assume you have run the docker and the current working directory is /workspace
-
Download sdk.sh
-
Run the command below to install Arm GCC cross-compilation toolchain environment
./sdk.sh
- Run the command below to setup environment
source /opt/petalinux/2019.2/environment-setup-aarch64-xilinx-linux
- Download DNNDK runtime package vitis-ai_v1.1_dnndk.tar.gz and install it into PetaLinux system sysroot
tar -xzvf vitis-ai_v1.1_dnndk.tar.gz
cd vitis-ai_v1.1_dnndk
sudo ./install.sh $SDKTARGETSYSROOT
- Cross compile samples
cd Vitis-AI/mpsoc/vitis_ai_dnndk_samples/resnet50
# For ZCU102 evaluation board,
./build.sh zcu102
# or for ZCU104 evaluation board
./build.sh zcu104
Download the prebuilt ZCU102 board image or ZCU104 board image and flash it to SD card (16GB recommanded) using Etcher or Win32DiskImager. Note that you may need to run command irps5401 first to trigger the power management patch for ZCU104 to avoid system hang or power off issue when running samples.
- Copy the package vitis-ai_v1.1_dnndk.tar.gz to /home/root directory of the evaluation board, and follow the steps below to set up the environment on the board
tar -xzvf vitis-ai_v1.1_dnndk.tar.gz
cd vitis-ai_v1.1_dnndk
./install.sh
-
Copy the Vitis-AI/mpsoc/vitis_ai_dnndk_samples folder from host to the /home/root directory of the evaluation board
-
Download vitis-ai_v1.1_dnndk_sample_img.tar.gz package to /home/root of the evaluation board and run command below
tar -xzvf vitis-ai_v1.1_dnndk_sample_img.tar.gz
- Run the samples on evaluation board
cd /home/root/vitis-ai_v1.1_dnndk_sample/resnet50
./resnet50