GithubHelp home page GithubHelp logo

silky / resnet50-pynq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xilinx/resnet50-pynq

0.0 1.0 0.0 8.71 MB

Quantized ResNet50 Dataflow Acceleration on Alveo, with PYNQ

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.07% Tcl 0.41% Jupyter Notebook 0.10% Python 0.17% C++ 77.94% C 5.17% Objective-C 16.15%

resnet50-pynq's Introduction

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.

Repo organization

The repository is organized as follows:

  • src: contains source code and submodules
    • hls: HLS custom building blocks and submodules to FINN librares (FINN and FINN-HLSLib)
    • w1a2-v1.0: pre-build weights, thresholds, directives and configuration files for Binary ResNet50
  • 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

See the specific Compile and Link documentation for further info.

Running the Demo

After you have built the accelerator, you can install the required files in the host folder. Move in the cloned repo and do make install

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

Install the resnet50-pynq package using pip:

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 get-notebooks command.

Supported Boards/Shells

Currently, we distribute the overlay only for the following Alveo boards and shells:

Shell Board
xilinx_u250_xdma_201830_2 Xilinx Alveo U250

Designs are built using Vitis 2019.2.

Author

Lucian Petrica @ Xilinx Research Labs.

resnet50-pynq's People

Contributors

durgabhavaniv avatar quetric avatar

Watchers

 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.