🚫 This repository has been archived. For up-to-date ResNet50 dataflow FPGA acceleration, please see FINN Examples.
Quantized ResNet50 Dataflow Acceleration on Alveo
This repository contains an implementations of a binary ResNet50 FINN-style dataflow accelerator targeting Alveo boards. It is intended as a showcase of achievable throughput and latency for ImageNet clasiffication on FPGA, using dataflow execution and on-chip weight storage.
The repository is organized as follows:
- src: contains source code and submodules
- compile: contains scripts for accelerator compilation (Vivado HLS CSynth + Vivado Synthesis)
- link: contains scripts for accelerator linking into the Alveo platform with Vitis
- host: python and Jupyter host code, using PYNQ for Alveo
Building the Accelerator
The Accelerator is built using Vitis 2019.2. We recommend using this version, otherwise changes might be required to source and/or Makefiles for things to work.
To build the accelerator, clone the repository (using
--recursive to pull submodules), after which:
cd ResNet50-PYNQ/compile make NET=w1a2_v1.0 cd ../link make
Running the Demo
After you have built the accelerator, you can
install the required files in
host folder. Move in the cloned repo and do
cd ResNet50-PYNQ make install
You can then run the included Jupyter notebook or the Python multithreaded inference example. If you want to use the distributed PYNQ python package, please read below. If you want to run example Python inference code, please see the host code documentation.
PYNQ quick start
resnet50-pynq package using
pip install resnet50-pynq
After the package is installed, to get your own copy of the available notebooks run:
pynq get-notebooks ResNet50
You can then try things out by doing:
cd pynq-notebooks jupyter notebook
There are a number of additional options for the
pynq get-notebooks command,
you can list them by typing
pynq get-notebooks --help
You can also refer to the official
PYNQ documentation for more information
regarding the PYNQ Command Line Interface and in particular the
Currently, we distribute the overlay only for the following Alveo boards and shells:
|xilinx_u250_xdma_201830_2||Xilinx Alveo U250|
Designs are built using Vitis 2019.2.
Lucian Petrica @ Xilinx Research Labs.