Skip to content

Commit 4fee6ff

Browse files
author
Yaman Umuroglu
committed
[Release] merge dev into master for v0.5b
1 parent 2fab574 commit 4fee6ff

327 files changed

Lines changed: 13180 additions & 12231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/quicktest-dev-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: DockerRunQuicktest
2121
run: |
2222
docker build -t finn_gha -f docker/Dockerfile.finn_ci --build-arg BUILD_PATH=/tmp/finn_gha .
23-
docker run --init --hostname finn_gha -v $(pwd):/workspace/finn -e FINN_INST_NAME=finn_gha finn_gha quicktest.sh
23+
docker run --init --hostname finn_gha -v $(pwd):/workspace/finn -e FINN_BUILD_DIR=/tmp/finn_gha -e FINN_INST_NAME=finn_gha finn_gha quicktest.sh

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
__pycache__/*
4040
.cache/*
4141
.*.swp
42-
*/.ipynb_checkpoints/*
42+
*.ipynb_checkpoints*
4343

4444
# Project files
4545
.ropeproject
@@ -88,6 +88,10 @@ MANIFEST
8888
# datasets for testing
8989
/dataset/
9090
/data/
91+
*.csv
9192

9293
# Google Drive key for dashboard
9394
/gdrive-key/
95+
96+
# generated files as part of end2end notebooks
97+
/notebooks/end2end_example/**/*.onnx

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ inference on FPGAs.
1212
It specifically targets <a href="https://github.com/maltanar/qnn-inference-examples" target="_blank">quantized neural
1313
networks</a>, with emphasis on
1414
generating dataflow-style architectures customized for each network.
15-
The resulting FPGA accelerators can yield very high classification rates, or conversely be run with a slow clock for very low power consumption.
15+
The resulting FPGA accelerators are highly efficient and can yield high throughput and low latency.
1616
The framework is fully open-source in order to give a higher degree of flexibility, and is intended to enable neural network research spanning several layers of the software/hardware abstraction stack.
1717

18-
For more general information about FINN, please visit the [project page](https://xilinx.github.io/finn/), check out the [publications](https://xilinx.github.io/finn/publications) or some of the [demos](https://xilinx.github.io/finn/demos).
18+
We have a separate repository [finn-examples](https://github.com/Xilinx/finn-examples) that houses pre-built examples for several neural networks.
19+
For more general information about FINN, please visit the [project page](https://xilinx.github.io/finn/) and check out the [publications](https://xilinx.github.io/finn/publications).
1920

2021
## Getting Started
2122

22-
Please see the [Getting Started](https://finn.readthedocs.io/en/latest/getting_started.html) page for more information on requirements, installation, and how to run FINN in different modes. Due to the complex nature of the dependencies of the project, we only support Docker-based deployment at this time.
23+
Please see the [Getting Started](https://finn.readthedocs.io/en/latest/getting_started.html) page for more information on requirements, installation, and how to run FINN in different modes. Due to the complex nature of the dependencies of the project, **we only support Docker-based execution of the FINN compiler at this time**.
2324

2425
## What's New in FINN?
2526

27+
* **2020-12-17:** v0.5b (beta) is released, with a new [examples repo](https://github.com/Xilinx/finn-examples) including MobileNet-v1. Read more on the <a href="https://xilinx.github.io/finn/2020/12/17/finn-v05b-beta-is-released.html">release blog post</a>.
2628
* **2020-09-21:** v0.4b (beta) is released. Read more on the <a href="https://xilinx.github.io/finn/2020/09/21/finn-v04b-beta-is-released.html">release blog post</a>.
2729
* **2020-05-08:** v0.3b (beta) is released, with initial support for convolutions, parallel transformations, more flexible memory allocation for MVAUs, throughput testing and many other smaller improvements and bugfixes. Read more on the <a href="https://xilinx.github.io/finn/2020/05/08/finn-v03b-beta-is-released.html">release blog post</a>.
2830
* **2020-04-15:** FINN v0.2.1b (beta): use fixed commit versions for dependency repos, otherwise identical to 0.2b

docker/Dockerfile.finn_ci

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@
2828

2929
FROM pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-devel
3030
MAINTAINER Yaman Umuroglu <yamanu@xilinx.com>
31-
ARG PYTHON_VERSION=3.6
32-
ARG BUILD_PATH
3331

3432
WORKDIR /workspace
3533

3634
RUN apt-get update
3735
RUN apt-get -y upgrade
3836
RUN apt-get install -y build-essential libglib2.0-0 libsm6 libxext6 libxrender-dev
39-
RUN apt-get install -y verilator zsh
40-
RUN apt-get -y install sshpass wget unzip
37+
RUN apt-get install -y verilator zsh nano
38+
RUN apt-get install -y sshpass wget unzip
4139
RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
4240

4341
# XRT deps
4442
RUN wget https://raw.githubusercontent.com/Xilinx/XRT/master/src/runtime_src/tools/scripts/xrtdeps.sh
4543
RUN apt-get update
46-
RUN bash xrtdeps.sh
44+
RUN bash xrtdeps.sh -docker
4745
RUN rm xrtdeps.sh
4846

4947
# cloning dependency repos
48+
# finn-base
49+
RUN git clone https://github.com/Xilinx/finn-base.git /workspace/finn-base
5050
# Brevitas
5151
RUN git clone https://github.com/Xilinx/brevitas.git /workspace/brevitas
5252
# CNPY
@@ -61,22 +61,17 @@ RUN git clone https://bitbucket.org/maltanar/oh-my-xilinx.git /workspace/oh-my-x
6161
COPY requirements.txt .
6262
RUN pip install -r requirements.txt
6363
RUN rm requirements.txt
64-
RUN apt update; apt install nano
6564
RUN pip install pytest-dependency
6665
RUN pip install pytest-xdist
6766
RUN pip install pytest-parallel
6867
RUN pip install -e git+https://github.com/fbcotter/dataset_loading.git@0.0.4#egg=dataset_loading
6968

70-
ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src"
71-
ENV PYTHONPATH "${PYTHONPATH}:/workspace/pyverilator"
72-
ENV VIVADO_IP_CACHE "$BUILD_PATH/vivado_ip_cache"
69+
ENV VIVADO_IP_CACHE "/tmp/vivado_ip_cache"
7370
ENV PATH "${PATH}:/workspace/oh-my-xilinx"
7471
ENV OHMYXILINX "/workspace/oh-my-xilinx"
7572

7673
# colorful terminal output
7774
RUN echo "PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '" >> /root/.bashrc
78-
RUN mkdir -p $BUILD_PATH
79-
RUN mkdir -p $VIVADO_IP_CACHE
8075

8176
WORKDIR /workspace/finn
8277

docker/Dockerfile.finn_dev

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@
2828

2929
FROM pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-devel
3030
MAINTAINER Yaman Umuroglu <yamanu@xilinx.com>
31-
ARG PYTHON_VERSION=3.6
3231
ARG GID
3332
ARG GNAME
3433
ARG UNAME
3534
ARG UID
3635
ARG PASSWD
37-
ARG JUPYTER_PORT
38-
ARG NETRON_PORT
3936

4037
WORKDIR /workspace
4138

@@ -71,6 +68,8 @@ RUN chown -R $UNAME:$GNAME /home/$UNAME
7168
USER $UNAME
7269

7370
# cloning dependency repos (as user)
71+
# finn-base
72+
RUN git clone https://github.com/Xilinx/finn-base.git /workspace/finn-base
7473
# Brevitas
7574
RUN git clone https://github.com/Xilinx/brevitas.git /workspace/brevitas
7675
# CNPY
@@ -84,8 +83,6 @@ RUN git clone https://bitbucket.org/maltanar/oh-my-xilinx.git /workspace/oh-my-x
8483

8584
# for this developer-oriented Docker container we assume the FINN repo is cloned and mounted from the host
8685
# at /workspace/finn -- see run-docker.sh for an example of how to do this.
87-
ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src"
88-
ENV PYTHONPATH "${PYTHONPATH}:/workspace/pyverilator"
8986
ENV PATH "${PATH}:/workspace/oh-my-xilinx:/home/$UNAME/.local/bin"
9087
ENV OHMYXILINX "/workspace/oh-my-xilinx"
9188

@@ -99,10 +96,19 @@ COPY docker/finn_entrypoint.sh /usr/local/bin/
9996
COPY docker/quicktest.sh /usr/local/bin/
10097
RUN chmod 755 /usr/local/bin/finn_entrypoint.sh
10198
RUN chmod 755 /usr/local/bin/quicktest.sh
102-
USER $UNAME
99+
# install vitis deps if required
100+
ARG INSTALL_XRT_DEPS
101+
RUN if [ "$INSTALL_XRT_DEPS" = "1" ] ; then \
102+
echo "Installing XRT dependencies"; \
103+
wget https://raw.githubusercontent.com/Xilinx/XRT/master/src/runtime_src/tools/scripts/xrtdeps.sh; \
104+
apt-get update; \
105+
bash xrtdeps.sh -docker; \
106+
rm xrtdeps.sh; \
107+
else \
108+
echo "Skipping installation of XRT dependencies"; \
109+
fi
103110

104-
EXPOSE $JUPYTER_PORT
105-
EXPOSE $NETRON_PORT
111+
USER $UNAME
106112

107113
ENTRYPOINT ["finn_entrypoint.sh"]
108114
CMD ["bash"]

docker/finn_entrypoint.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ gecho () {
1212

1313
# checkout the correct dependency repo commits
1414
# the repos themselves are cloned in the Dockerfile
15-
BREVITAS_COMMIT=6ffefa8dbf37fdb0f44c994f34604c29fadb16b0
15+
FINN_BASE_COMMIT=1363981654009067790d5f2d0c3dd303b5fa05cb
16+
BREVITAS_COMMIT=aff49758ec445d77c75721c7de3091a2a1797ca8
1617
CNPY_COMMIT=4e8810b1a8637695171ed346ce68f6984e585ef4
1718
HLSLIB_COMMIT=cfafe11a93b79ab1af7529d68f08886913a6466e
18-
PYVERILATOR_COMMIT=c97a5ba41bbc7c419d6f25c74cdf3bdc3393174f
19+
PYVERILATOR_COMMIT=e2ff74030de3992dcac54bf1b6aad2915946e8cb
1920
OMX_COMMIT=1bae737669901e762f581af73348332b5c4b2ada
2021

2122
gecho "Setting up known-good commit versions for FINN dependencies"
23+
# finn-base
24+
gecho "finn-base @ $FINN_BASE_COMMIT"
25+
git -C /workspace/finn-base pull --quiet
26+
git -C /workspace/finn-base checkout $FINN_BASE_COMMIT --quiet
27+
pip install --user -e /workspace/finn-base
2228
# Brevitas
2329
gecho "brevitas @ $BREVITAS_COMMIT"
2430
git -C /workspace/brevitas pull --quiet
@@ -36,10 +42,15 @@ git -C /workspace/finn-hlslib checkout $HLSLIB_COMMIT --quiet
3642
gecho "PyVerilator @ $PYVERILATOR_COMMIT"
3743
git -C /workspace/pyverilator pull --quiet
3844
git -C /workspace/pyverilator checkout $PYVERILATOR_COMMIT --quiet
45+
pip install --user -e /workspace/pyverilator
3946
# oh-my-xilinx
4047
gecho "oh-my-xilinx @ $OMX_COMMIT"
4148
git -C /workspace/oh-my-xilinx pull --quiet
4249
git -C /workspace/oh-my-xilinx checkout $OMX_COMMIT --quiet
50+
# remove old version egg-info, if any
51+
rm -rf $FINN_ROOT/src/FINN.egg-info
52+
# run pip install for finn
53+
pip install --user -e $FINN_ROOT
4354

4455
if [ ! -z "$VIVADO_PATH" ];then
4556
# source Vivado env.vars
@@ -50,6 +61,8 @@ fi
5061
# download PYNQ board files if not already there
5162
if [ ! -d "/workspace/finn/board_files" ]; then
5263
gecho "Downloading PYNQ board files for Vivado"
64+
OLD_PWD=$(pwd)
65+
cd /workspace/finn
5366
wget -q https://github.com/cathalmccabe/pynq-z1_board_files/raw/master/pynq-z1.zip
5467
wget -q https://d2m32eurp10079.cloudfront.net/Download/pynq-z2.zip
5568
unzip -q pynq-z1.zip
@@ -59,21 +72,22 @@ if [ ! -d "/workspace/finn/board_files" ]; then
5972
mv pynq-z2/ board_files/
6073
rm pynq-z1.zip
6174
rm pynq-z2.zip
75+
cd $OLD_PWD
6276
fi
6377
if [ ! -d "/workspace/finn/board_files/ultra96v1" ]; then
6478
gecho "Downloading Avnet BDF files into board_files"
79+
OLD_PWD=$(pwd)
80+
cd /workspace/finn
6581
git clone https://github.com/Avnet/bdf.git
6682
mv /workspace/finn/bdf/* /workspace/finn/board_files/
6783
rm -rf /workspace/finn/bdf
84+
cd $OLD_PWD
6885
fi
6986
if [ ! -z "$VITIS_PATH" ];then
7087
# source Vitis env.vars
7188
export XILINX_VITIS=$VITIS_PATH
7289
source $VITIS_PATH/settings64.sh
7390
if [ ! -z "$XILINX_XRT" ];then
74-
gecho "For VitisBuild, please ensure the XRT dependencies are correctly installed"
75-
gecho "by downloading and running:"
76-
gecho "https://raw.githubusercontent.com/Xilinx/XRT/master/src/runtime_src/tools/scripts/xrtdeps.sh"
7791
# source XRT
7892
source $XILINX_XRT/setup.sh
7993
fi

docs/ARC2018.pdf

-5.89 MB
Binary file not shown.

docs/ASAP2018.pdf

-5.7 MB
Binary file not shown.

docs/BigDataBelfast2018.pdf

-3.43 MB
Binary file not shown.

docs/DAMON2019_Blott_final.pdf

-5.53 MB
Binary file not shown.

0 commit comments

Comments
 (0)