LogicNets is a methodology for designing, training and deploying sparse, quantized neural networks based on hardware building blocks. They are able to achieve extremely high throughput and low latency on Xilinx FPGAs.
This project provides a set of library components and examples to help you design, train and deploy your own LogicNets networks. Note, this is considered to be an \'alpha\' release: expect API changes and issues. You can learn more about LogicNets from this paper, or from the following YouTube videos:
There are two main ways to install LogicNets:
Follow the steps below to install LogicNets within a docker
container:
git clone git@github.com:Xilinx/logicnets.git
VIVADO_SETTINGS_FILE
which points to the settings64.sh
in your Vivado installation (e.g., export VIVADO_SETTINGS_FILE=/path/to/Vivado/settings64.sh
)XILINXD_LICENSE_FILE
or LM_LICENSE_FILE
variables to point to a specific license server./docker/run-docker.sh
from the root directory of the LogicNets repositoryYou are now ready to run an example, browse to /workspace/logicnets/examples/jet_substructure/
and start training a LogicNets network!
Note, a license is not required to run any of the provided examples.
A manual installation is not recommended for beginners. We will only provide limited support for people wishing to pursue a manual installation. People wanting to pursue a manual installation may want to look at the LogicNets Dockerfile, as this contains details for a full environmental setup (including the installation of dependencies of dependencies).
The basic steps for a manual installation are as follows:
oh-my-xilinx
by cloning this repository and creating the environment variable OHMYXILINX
which points to its root directory (e.g., export OHMYXILINX=/path/to/oh-my-xilinx
)
oh-my-xilinx
requires zsh
, on Ubuntu, this can be installed as follows: sudo apt-get install zsh
Nitro-Parts-lib-Xilinx
by cloning this repository and creating the environment variable NITROPARTSLIB
which points to its root directory (e.g., export NITROPARTSLIB=/path/to/Nitro-Parts-lib-Xilinx
)verilator
, on Ubuntu, this can be done as follows: sudo apt-get install verilator build-essential
python3
, pytorch
, brevitas
and pyverilator
using conda
and/or pip
or your preferred methodlogicnets
using: pip install --upgrade git+https://github.com/Xilinx/logicnets.git
Alternatively, instead of the last step you can clone the LogicNets repository and install as follows:
pip install .
Note, to install the dependencies for all the examples, you can run the following:
pip install .[example-all]
Currently, we have the following examples, located in ./examples/
:
More examples coming soon.
Documentation site coming soon.
If you find this work useful for your research, please consider citing our paper from FPL'20 below:
@inproceedings{umuroglu2020logicnets,
author = {Umuroglu, Yaman and Akhauri, Yash and Fraser, Nicholas J and Blott, Michaela},
booktitle = {Proceedings of the International Conference on Field-Programmable Logic and Applications},
title = {LogicNets: Co-Designed Neural Networks and Circuits for Extreme-Throughput Applications},
year = {2020},
pages = {291-297},
publisher = {IEEE Computer Society},
address = {Los Alamitos, CA, USA},
month = {sep}
}