Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 3.54 KB

README.md

File metadata and controls

68 lines (50 loc) · 3.54 KB

This directory contains instructions and examples for running DPUCZDX8G on Zynq Ultrascale+ MPSoC platforms. It can also be applied to Zynq-7000 platforms. DPUCZDX8G 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: DPUCZDX8G Overview

Assume you have run the docker and the current working directory is /workspace

Step1: Setup cross-compiler for Vitis AI DNNDK and make samples

  1. Download sdk-2020.1.0.0.sh

  2. Run the command below to install Arm GCC cross-compilation toolchain environment

./sdk-2020.1.0.0.sh
  1. Run the command below to setup environment
source /opt/petalinux/2020.1/environment-setup-aarch64-xilinx-linux
  1. 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

Step2: Setup Evaluation Board and run Vitis AI DNNDK samples

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. Follow the steps below to run the samples. It should be noted that the above board images have placed DNNDK package and samples on path /home/root/Vitis-AI/mpsoc, you can skip steps 1 and 2 if you don't make changes.

  1. Copy the package vitis-ai_v1.2_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.2_dnndk.tar.gz
cd vitis-ai_v1.2_dnndk
./install.sh
  1. Copy the Vitis-AI/mpsoc/vitis_ai_dnndk_samples folder from host to the /home/root directory of the evaluation board

  2. Download vitis-ai_v1.2_dnndk_sample_img.tar.gz package to /home/root of the evaluation board and run command below

tar -xzvf vitis-ai_v1.2_dnndk_sample_img.tar.gz
  1. Run the samples on evaluation board
cd /home/root/vitis-ai_v1.2_dnndk_sample/resnet50
./resnet50
  1. Run the other samples according to the following chapters of the Vitis AI User Guide, Quick Start -> Running Examples -> Legacy DNNDK Examples. For video input, only webm and raw format are supported by default with the above system image. If you want to support video data in other formats, you need to install the relevant packages on the system.

  2. If you use your own system image, you may need to copy dpu.xclbin to /usr/lib first. Such as

cp /media/sd-mmcblk0p1/dpu.xclbin /usr/lib/

References