In this tutorial, we'll use Vitis 2020.2 and Vitis-AI v1.3 for demonstration. The tutorial will be updated when Vitis tools have updates.
Type | Version |
---|---|
Vitis Software Platform | 2020.2 |
Vitis-AI | v1.3 |
PetaLinux | 2020.2 |
The host OS can be a natively installed OS, or installed in a virtual machine. Please check Table 1 in Vitis Release Notes for supported host operating systems. It needs to have at least 100GB hard disk to install all the tools, models and datasets. 16GB DDR memory is preferred for development flow.
-
Download the Vitis Software Platform from [Xilinx Download Center](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vitis.html.
-
Install the Vitis Software Platform
- Run
./xsetup
in extracted Vitis installer tar. - Ensure Devices -> Install devices for Alveo and Xilinx Edge acceleration platforms is selected during installation.
- Refer to detailed Vitis User Guided)
- Run
-
Install Vitis dependent packages
sudo <install_dir>/Vitis/<release>/scripts/installLibs.sh
The installLibs.sh script from Vitis installation directory can detect the current OS release and install required dependencies. Please check the script for details about what will be installed.
Note: PetaLinux is only needed for Platform Development for Customization Flow.
-
Download PetaLinux from Xilinx Download Center
-
Install PetaLinux dependencies according to UG1144 Table 2.
-
Ubuntu
sudo apt install iproute gcc g++ net-tools libncurses5-dev zlib1g:i386 libssl-dev flex bison libselinux1 xterm autoconf libtool texinfo zlib1g-dev gcc-multilib build-essential screen pax gawk python
-
CentOS
sudo yum install iproute gcc gcc-++ net-tools libncurses5-devel zlib-devel openssl-devel flex bison libselinux xterm autoconf libtool texinfo SDL-devel glibc-devel glibc glib2-devel automake screen pax libstdc++ gawk python
-
-
Install PetaLinux
./petalinux-v2020.2-final-installer.run
-
Setup PetaLinux requirements
-
Ubuntu: change shell from dash to bash
sudo dpkg-reconfigure dash
-
-
Launch a bash terminal window and run the following commands to initialize Vitis and PetaLinux environment.
# Load Vitis environment source /tools/Xilinx/Vitis/2020.2/settings64.sh # Load PetaLinux environment source /opt/petalinux-v2020.2/settings.sh
The Vitis™ AI development environment is Xilinx’s development platform for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards. It consists of optimized IP, tools, libraries, models, and example designs. It is designed with high efficiency and ease of use in mind, unleashing the full potential of AI acceleration on Xilinx FPGA and ACAP.
Please visit https://www.xilinx.com/products/design-tools/vitis/vitis-ai.html for more information about Vitis AI.
Vitis AI is released as GitHub repository and Docker.
Follow the instructions below to setup the Vitis AI environment step by step.
Please use x86 processor based Ubuntu or CentOS as the host operating system. If you have a nVidia graphics card with CUDA support, it will be very helpful to reduce the running time.
Git package is needed at the host machine. For Ubuntu, use following command to install:
sudo apt update
sudo apt install git
For CentOS, use following command to install:
sudo yum install git
Docker environment is needed at host side. For docker installation without GPU support, please refer to following link:
- Ubuntu: https://docs.docker.com/engine/install/ubuntu
- CentOS: https://docs.docker.com/engine/install/centos
For docker installation with nVidia GPU support, please refer to following link:
- Ubuntu and CentOS: https://github.com/NVIDIA/nvidia-docker
Go to your working directory, say ~/workspace, then use following command to get the Vitis AI repository.
git clone https://github.com/Xilinx/Vitis-AI.git
After that, you will get the Vitis AI directory ~/workspace/Vitis-AI.
There are two docker available for user to choose: CPU docker is for users without a nVidia graphics card; GPU docker is for those have one. The CPU docker can be pulled Docker Hub or you can build it with the provided Dockerfile. For GPU docker, you have to build it by yourself with the provided Dockerfile.
To get the CPU docker from Docker Hub, use following command:
docker pull xilinx/vitis-ai:latest
To build it by yourself, use following comamnd:
cd ~/workspace/Vitis-AI/setup/docker
./docker_build_cpu.sh
In either way, you could finally get the docker image vitis-ai:latest settled on your host.
You have to build the docker using following comamnd:
cd ~/workspace/Vitis-AI/setup/docker
./docker_build_gpu.sh
After that, you could get the docker image vitis-ai-gpu:latest on your host.
Copyright© 2020 Xilinx