Giter Site home page Giter Site logo

amanda-barbara / vitis-ai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xilinx/vitis-ai

0.0 0.0 0.0 1.32 GB

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.

Home Page: https://www.xilinx.com/ai

License: Apache License 2.0

Shell 0.46% Makefile 0.19% C++ 51.55% Tcl 3.78% V 2.41% SystemVerilog 3.00% CMake 0.34% Python 28.07% C 0.62% CSS 0.01% HTML 2.61% Jupyter Notebook 4.21% Perl 0.03% Dockerfile 0.05% Cuda 0.24% MATLAB 0.02% Starlark 1.94% Batchfile 0.02% MLIR 0.35% SWIG 0.10%

vitis-ai's Introduction


Xilinx® Vitis™ AI is a development stack 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.



Vitis AI is composed of the following key components:
  • AI Model Zoo - A comprehensive set of pre-optimized models that are ready to deploy on Xilinx devices.
  • AI Optimizer - An optional model optimizer that can prune a model by up to 90%. It is separately available with commercial licenses.
  • AI Quantizer - A powerful quantizer that supports model quantization, calibration, and fine tuning.
  • AI Compiler - Compiles the quantized model to a high-efficient instruction set and data flow.
  • AI Profiler - Perform an in-depth analysis of the efficiency and utilization of AI inference implementation.
  • AI Library - Offers high-level yet optimized C++ APIs for AI applications from edge to cloud.
  • DPU - Efficient and scalable IP cores can be customized to meet the needs for many different applications.
    • For more details on the different DPUs available, refer to DPU Naming.

Learn More: Vitis AI Overview

  • Release Notes
  • Support new platforms, including Versal ACAP platforms VCK190, VCK5000 and Kria SoM
  • Better Pytorch and Tensorflow model support: Pytorch 1.5-1.7.1, improved quantization for Tensorflow 2.x models
  • New models, including 4D Radar detection, Image-Lidar sensor fusion, 3D detection & segmentation, multi-task, depth estimation, super resolution for automotive, smart medical and industrial vision applications
  • New Graph Runner API to deploy models with multiple subgraphs
  • DPUCADX8G (DPUv1)deprecated with DPUCADF8H (DPUv3Int8)
  • DPUCAHX8H (DPUv3E) and DPUCAHX8L (DPUv3ME) release with xo
  • Classification & Detection WAA examples for Versal (VCK190)

Getting Started

Two options are available for installing the containers with the Vitis AI tools and resources.

Installation

  • Install Docker - if Docker not installed on your machine yet

  • Ensure your linux user is in the group docker

  • At least 100GB of disk space for the disk partition running Docker

  • Clone the Vitis-AI repository to obtain the examples, reference code, and scripts.

    git clone --recurse-submodules https://github.com/Xilinx/Vitis-AI  
    
    cd Vitis-AI

Note: The following commands are for the latest version of Vitis AI. For details and history click Run Docker Container

Using Pre-built Docker

Download the latest Vitis AI Docker with the following command. This container runs on CPU.

docker pull xilinx/vitis-ai-cpu:latest  

To run the docker, use command:

./docker_run.sh xilinx/vitis-ai-cpu:latest

Building Docker from Recipe

There are two types of docker recipes provided - CPU recipe and GPU recipe. If you have a compatible nVidia graphics card with CUDA support, you could use GPU recipe; otherwise you could use CPU recipe.

CPU Docker

Use below commands to build the CPU docker:

cd setup/docker
./docker_build_cpu.sh

To run the CPU docker, use command:

./docker_run.sh xilinx/vitis-ai-cpu:latest

GPU Docker

Use below commands to build the GPU docker:

cd setup/docker
./docker_build_gpu.sh

To run the GPU docker, use command:

./docker_run.sh xilinx/vitis-ai-gpu:latest

Please use the file ./docker_run.sh as a reference for the docker launching scripts, you could make necessary modification to it according to your needs.

Installing Patch in Docker

You can install Anaconda packages in a conda environment this way:

Vitis-AI /workspace > sudo conda install -n vitis-ai-caffe https://www.xilinx.com/bin/public/openDownload?filename=unilog-1.3.2-h7b12538_35.tar.bz2

For a downloaded file:

sudo conda install -n vitis-ai-caffe ./<conda_package>.tar.bz2

X11 Support for Running Vitis AI Docker with Alveo

If you are running Vitis AI docker with Alveo card and want to use X11 support for graphics (for example, some demo applications in VART and Vitis-AI-Library for Alveo need to display images or video), please add following line into the docker_run_params variable definition in docker_run.sh script:

-e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/tmp/.Xauthority \

And after the docker starts up, run following command lines:

cp /tmp/.Xauthority ~/
sudo chown vitis-ai-user:vitis-ai-group ~/.Xauthority

Please note before running this script, please make sure either you have local X11 server running if you are using Windows based ssh terminal to connect to remote server, or you have run xhost + command at a command terminal if you are using Linux with Desktop. Also if you are using ssh to connect to the remote server, remember to enable X11 Forwarding option either with Windows ssh tools setting or with -X options in ssh command line.

Get Started with Examples

Programming with Vitis AI

Vitis AI offers a unified set of high-level C++/Python programming APIs to run AI applications across edge-to-cloud platforms, including DPU for Alveo, and DPU for Zynq Ultrascale+ MPSoC and Zynq-7000. It brings the benefits to easily port AI applications from cloud to edge and vice versa. 10 samples in VART Samples are available to help you get familiar with the unfied programming APIs.

ID Example Name Models Framework Notes
1 resnet50 ResNet50 Caffe Image classification with VART C++ APIs.
2 resnet50_pt ResNet50 Pytorch Image classification with VART extension C++ APIs.
3 resnet50_ext ResNet50 Caffe Image classification with VART extension C++ APIs.
4 resnet50_mt_py ResNet50 TensorFlow Multi-threading image classification with VART Python APIs.
5 inception_v1_mt_py Inception-v1 TensorFlow Multi-threading image classification with VART Python APIs.
6 pose_detection SSD, Pose detection Caffe Pose detection with VART C++ APIs.
7 video_analysis SSD Caffe Traffic detection with VART C++ APIs.
8 adas_detection YOLO-v3 Caffe ADAS detection with VART C++ APIs.
9 segmentation FPN Caffe Semantic segmentation with VART C++ APIs.
10 squeezenet_pytorch Squeezenet Pytorch Image classification with VART C++ APIs.

For more information, please refer to Vitis AI User Guide

References

Questions and Support

vitis-ai's People

Contributors

qianglin-xlnx avatar andyluo7 avatar mahadurkarm avatar kamranjk avatar hanxue avatar anushaperla avatar nkpavan avatar wangxd-xlnx avatar jiaz-xlnx avatar sumitn-xilinx avatar wanghy-xlnx avatar bryanloz-xilinx avatar shua1zhang avatar abid-k avatar wilderfield avatar durgabhavaniv avatar mahinlma avatar davidxudong avatar mahadurkar avatar naal-xlnx avatar xiaoqun2011 avatar janifer112x avatar giorgiob-xilinx avatar eemars avatar woinck avatar varunsh-xilinx avatar titechtraj avatar rampagee avatar erihsu avatar elliott-xilinx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.