All Projects → danielholanda → Leflow

danielholanda / Leflow

Licence: other
Enabling Flexible FPGA High-Level Synthesis of Tensorflow Deep Neural Networks

Labels

Projects that are alternatives of or similar to Leflow

Openpiton
The OpenPiton Platform
Stars: ✭ 282 (-31.88%)
Mutual labels:  verilog
Mor1kx
mor1kx - an OpenRISC 1000 processor IP core
Stars: ✭ 326 (-21.26%)
Mutual labels:  verilog
Microwatt
A tiny Open POWER ISA softcore written in VHDL 2008
Stars: ✭ 383 (-7.49%)
Mutual labels:  verilog
Verilogboy
A Pi emulating a GameBoy sounds cheap. What about an FPGA?
Stars: ✭ 287 (-30.68%)
Mutual labels:  verilog
Reduceron
FPGA Haskell machine with game changing performance. Reduceron is Matthew Naylor, Colin Runciman and Jason Reich's high performance FPGA softcore for running lazy functional programs, including hardware garbage collection. Reduceron has been implemented on various FPGAs with clock frequency ranging from 60 to 150 MHz depending on the FPGA. A high degree of parallelism allows Reduceron to implement graph evaluation very efficiently. This fork aims to continue development on this, with a view to practical applications. Comments, questions, etc are welcome.
Stars: ✭ 308 (-25.6%)
Mutual labels:  verilog
Riscv Formal
RISC-V Formal Verification Framework
Stars: ✭ 328 (-20.77%)
Mutual labels:  verilog
Icezum
🌟 IceZUM Alhambra: an Arduino-like Open FPGA electronic board
Stars: ✭ 280 (-32.37%)
Mutual labels:  verilog
Mips Cpu
MIPS CPU implemented in Verilog
Stars: ✭ 409 (-1.21%)
Mutual labels:  verilog
Riffa
The RIFFA development repository
Stars: ✭ 320 (-22.71%)
Mutual labels:  verilog
Apio
🌱 Open source ecosystem for open FPGA boards
Stars: ✭ 366 (-11.59%)
Mutual labels:  verilog
Openlane
OpenLANE is an automated RTL to GDSII flow based on several components including OpenROAD, Yosys, Magic, Netgen, Fault and custom methodology scripts for design exploration and optimization.
Stars: ✭ 293 (-29.23%)
Mutual labels:  verilog
Beagle sdr gps
KiwiSDR: BeagleBone web-accessible shortwave receiver and software-defined GPS
Stars: ✭ 300 (-27.54%)
Mutual labels:  verilog
Verilog Axi
Verilog AXI components for FPGA implementation
Stars: ✭ 349 (-15.7%)
Mutual labels:  verilog
Ucr Eecs168 Lab
The lab schedules for EECS168 at UC Riverside
Stars: ✭ 285 (-31.16%)
Mutual labels:  verilog
Awesome Hdl
Hardware Description Languages
Stars: ✭ 385 (-7%)
Mutual labels:  verilog
Netfpga
NetFPGA 1G infrastructure and gateware
Stars: ✭ 280 (-32.37%)
Mutual labels:  verilog
Fpga Imaging Library
An open source library for image processing on FPGA.
Stars: ✭ 325 (-21.5%)
Mutual labels:  verilog
Cascade
A Just-In-Time Compiler for Verilog from VMware Research
Stars: ✭ 413 (-0.24%)
Mutual labels:  verilog
Scr1
SCR1 is a high-quality open-source RISC-V MCU core in Verilog
Stars: ✭ 393 (-5.07%)
Mutual labels:  verilog
Serv
SERV - The SErial RISC-V CPU
Stars: ✭ 358 (-13.53%)
Mutual labels:  verilog

LeFlow

LeFLow is an open-source tool-flow that maps numerical computation models written in Tensorflow to synthesizable hardware. Our flow bridges Google's XLA compiler LegUp high-level synthesis tool to automatically generate verilog from a Tensorflow specification.

See publication here: https://arxiv.org/abs/1807.05317.

Demo Videos

Demo 1 - Overview

Demo 2 - DNN for Classifying Google's Quick Draw Dataset

Installing dependencies

LegUp

LeFlow was built to be compatible with LegUp 4.0. We recommend downloading the virtual machine available at legup.eecg.utoronto.ca.

Tensorflow

LeFlow makes some minor changes on Tensorflow to ensure that only Kernels supported by LegUp are used by Tensorflow's XLA. To install the modified version of Tensorflow in the Legup 4.0 virtual machine follow the instructions below.

sudo apt-get install python-pip
sudo python -m pip install --upgrade pip
sudo pip install tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl --ignore-installed six

The whl file and instruction for compiling Tensorflow from scratch can be found on the src/tensorflow folder.

LeFlow settings

Before running LeFlow for the first time go to src\LeFlow and set up your python path and the examples directory of Legup. It is also important to make the LeFlow file an executable using the command

chmod +x LeFlow

Testing your installation

LeFlow comes to 15 building blocks that are contained inside of the tests folder and used for testing. You should try those tests first before jumping to the more complex examples. The automated testing will generate circuit, test it with Modelsim and make sure that the results match the original Tensorflow results.

  • To test your installation, go into the test directory and run
    python test_all.py --fast
    

All the tests should take less than a minute. For a more complete test, just run the same python script without the "--fast" option.

If one of the tests fail you have a problem with your installation. Please also make sure that the code works with Tesorflow before trying to generate a circuit using LeFlow.

Getting Started

Running a single example

To begin running examples with LeFlow tool, do the following:

  • Enter the ./test directory and select an example directory (i.e. myAdd)
  • To generate hardware from Tensorflow implementation run
    ../../src/LeFlow myAdd.py
    
  • To test generated hardware using Modelsim run
    ../../src/LeFlow myAdd.py --modelsim_only  
    
  • To do both above actions with a single command, run
    ../../src/LeFlow myAdd.py --modelsim 
    

Contents:

  • src -- includes source code for LeFlow
  • test -- simple examples that be run to test the tool
  • examples -- complicated examples that can take a significant amount of time to run

Authors

  • Daniel Holanda Noronha - danielhn-at-ece.ubc.ca
  • Bahar Salehpour
  • Steve Wilton

Citing LeFlow

Please cite LeFlow in your publications if it helps your research work:

@ARTICLE{leflow,
     author = {{Noronha}, D.~H. and {Salehpour}, B. and {Wilton}, S.~J.~E.},
     title = "{LeFlow: Enabling Flexible FPGA High-Level Synthesis of Tensorflow Deep Neural Networks}",
     journal = {ArXiv e-prints},
     archivePrefix = "arXiv",
     eprint = {1807.05317},
     keywords = {Computer Science - Machine Learning, Statistics - Machine Learning},
     year = 2018,
     month = jul,
     adsurl = {http://adsabs.harvard.edu/abs/2018arXiv180705317N}
} 

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].