Skip to content

Commit

Permalink
Revert "Merge branch 'dev' into main"
Browse files Browse the repository at this point in the history
This reverts commit 00aa289, reversing
changes made to 39376a9.
  • Loading branch information
auphelia committed Jun 28, 2022
1 parent 00aa289 commit c98c221
Show file tree
Hide file tree
Showing 30 changed files with 444 additions and 1,563 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<img align="left" src="https://raw.githubusercontent.com/Xilinx/finn/github-pages/docs/img/finn-stack.png" alt="drawing" style="margin-right: 20px" width="250"/>

[![Gitter](https://badges.gitter.im/xilinx-finn/community.svg)](https://gitter.im/xilinx-finn/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![GitHub Discussions](https://img.shields.io/github/discussions/Xilinx/finn)](https://github.com/Xilinx/finn/discussions)
[![ReadTheDocs](https://readthedocs.org/projects/finn/badge/?version=latest&style=plastic)](http://finn.readthedocs.io/)

FINN is an experimental framework from Xilinx Research Labs to explore deep neural network
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.finn
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ RUN pip install -e git+https://github.com/fbcotter/dataset_loading.git@0.0.4#egg

# git-based Python repo dependencies
# these are installed in editable mode for easier co-development
ARG FINN_BASE_COMMIT="7cd7e00ba6709a85073ba22beeb5827e684fe085"
ARG QONNX_COMMIT="76c165fe7656d9bb3b826e98ac452085f1544f54"
ARG FINN_BASE_COMMIT="e8facdd719b55839cca46da2cc4f4a4a372afb41"
ARG QONNX_COMMIT="9f9eff95227cc57aadc6eafcbd44b7acda89f067"
ARG FINN_EXP_COMMIT="af6102769226b82b639f243dc36f065340991513"
ARG BREVITAS_COMMIT="a5b71d6de1389d3e7db898fef72e014842670f03"
ARG PYVERILATOR_COMMIT="0c3eb9343500fc1352a02c020a736c8c2db47e8e"
ARG CNPY_COMMIT="4e8810b1a8637695171ed346ce68f6984e585ef4"
ARG HLSLIB_COMMIT="bcca5d2b69c88e9ad7a86581ec062a9756966367"
ARG HLSLIB_COMMIT="966d17d3fddd801927b2167627d23a9a15ed1461"
ARG OMX_COMMIT="1dfc4aa2f2895632742cd5751520c6b472feb74e"
ARG AVNET_BDF_COMMIT="2d49cfc25766f07792c0b314489f21fe916b639b"

Expand Down
239 changes: 127 additions & 112 deletions notebooks/end2end_example/cybersecurity/1-train-mlp-with-brevitas.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ numpy==1.22.0
onnx==1.7.0
onnxoptimizer
onnxruntime==1.4.0
pre-commit==2.9.2
pre-commit==2.6.0
protobuf==3.20.1
pyscaffold==3.2.1
scipy==1.5.2
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ console_scripts =
[test]
# py.test options when running `python setup.py test`
# addopts = --verbose
extras = True

[tool:pytest]
# Options for py.test:
Expand Down
15 changes: 1 addition & 14 deletions src/finn/builder/build_dataflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from typing import Any, List, Optional

from finn.transformation.fpgadataflow.vitis_build import VitisOptStrategy
from finn.util.basic import alveo_default_platform, alveo_part_map, pynq_part_map
from finn.util.basic import alveo_part_map, pynq_part_map


class ShellFlowType(str, Enum):
Expand Down Expand Up @@ -257,8 +257,6 @@ class DataflowBuildConfig:
#: Which Vitis platform will be used.
#: Only relevant when `shell_flow_type = ShellFlowType.VITIS_ALVEO`
#: e.g. "xilinx_u250_xdma_201830_2"
#: If not specified but "board" is specified, will use the FINN
#: default (if any) for that Alveo board
vitis_platform: Optional[str] = None

#: Path to JSON config file assigning each layer to an SLR.
Expand Down Expand Up @@ -358,17 +356,6 @@ def _resolve_vitis_opt_strategy(self):
}
return name_to_strategy[self.vitis_opt_strategy]

def _resolve_vitis_platform(self):
if self.vitis_platform is not None:
return self.vitis_platform
elif (self.vitis_platform is None) and (self.board is not None):
return alveo_default_platform[self.board]
else:
raise Exception(
"Could not resolve Vitis platform:"
" need either board or vitis_platform specified"
)

def _resolve_verification_steps(self):
if self.verify_steps is None:
return []
Expand Down
4 changes: 2 additions & 2 deletions src/finn/builder/build_dataflow_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def step_set_fifo_depths(model: ModelWrapper, cfg: DataflowBuildConfig):
InsertAndSetFIFODepths(
cfg._resolve_fpga_part(),
cfg._resolve_hls_clk_period(),
vivado_ram_style=cfg.large_fifo_mem_style,
vivado_ram_style=cfg.large_fifo_mem_style.value,
)
)
else:
Expand Down Expand Up @@ -644,7 +644,7 @@ def step_synthesize_bitfile(model: ModelWrapper, cfg: DataflowBuildConfig):
VitisBuild(
cfg._resolve_fpga_part(),
cfg.synth_clk_period_ns,
cfg._resolve_vitis_platform(),
cfg.vitis_platform,
strategy=cfg._resolve_vitis_opt_strategy(),
enable_debug=cfg.enable_hw_debug,
floorplan_file=cfg.vitis_floorplan_file,
Expand Down
2 changes: 0 additions & 2 deletions src/finn/custom_op/fpgadataflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

from finn.custom_op.fpgadataflow.addstreams_batch import AddStreams_Batch
from finn.custom_op.fpgadataflow.channelwise_op_batch import ChannelwiseOp_Batch
from finn.custom_op.fpgadataflow.concat import StreamingConcat
from finn.custom_op.fpgadataflow.convolutioninputgenerator import (
ConvolutionInputGenerator,
)
Expand Down Expand Up @@ -84,4 +83,3 @@
custom_op["StreamingDataflowPartition"] = StreamingDataflowPartition
custom_op["UpsampleNearestNeighbour_Batch"] = UpsampleNearestNeighbour_Batch
custom_op["Lookup"] = Lookup
custom_op["StreamingConcat"] = StreamingConcat
Loading

0 comments on commit c98c221

Please sign in to comment.