Skip to content

Commit

Permalink
Merge pull request #106 from Xilinx/dev
Browse files Browse the repository at this point in the history
Release merge for v0.0.7
  • Loading branch information
auphelia authored Aug 15, 2024
2 parents 6588177 + 2b07fde commit 855b686
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 148 deletions.
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors
============

* Mirza Mrahorovic (@mmrahorovic) (maintainer)
* Mirza Mrahorovic (@mmrahorovic)
* Jakoba Petri-Koenig (@auphelia)
* Yaman Umuroglu (@maltanar)
* Lucian Petrica (@quetric)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<a>
<img src="https://img.shields.io/github/v/release/Xilinx/finn-examples?color=%09%23228B22&display_name=tag&label=Release" />
</a>
<a href="/Xilinx/finn/tree/v0.9">
<img src="https://img.shields.io/badge/FINN-v0.10-blue" />
<a href="/Xilinx/finn/tree/v0.10.1">
<img src="https://img.shields.io/badge/FINN-v0.10.1-blue" />
</a>
<a href="https://github.com/Xilinx/PYNQ/tree/v3.0.1">
<img src="https://img.shields.io/badge/PYNQ-v3.0.1-blue" />
Expand Down Expand Up @@ -79,7 +79,7 @@ jupyter-notebook --no-browser --allow-root --port=8888

First, create & source a virtual environment:
```shell
conda create -n <virtual-env> python=3.10
conda create -n <virtual-env> python=3.8
conda activate <virtual-env>
```

Expand Down
4 changes: 1 addition & 3 deletions build/cybersecurity-mlp/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from finn.util.basic import alveo_default_platform
import os
import shutil
from custom_steps import custom_step_mlp_export

# Which platforms to build the networks for
zynq_platforms = ["Pynq-Z1", "Ultra96", "ZCU104"]
Expand Down Expand Up @@ -90,8 +89,7 @@ def platform_to_shell(platform):
save_intermediate_models=True,
)

# Export MLP model to FINN-ONNX
model = custom_step_mlp_export(model_name)
model = "models/%s.onnx" % model_name
# Launch FINN compiler to generate bitfile
build.build_dataflow_cfg(model, cfg)
# Copy bitfiles into release dir if found
Expand Down
118 changes: 0 additions & 118 deletions build/cybersecurity-mlp/custom_steps.py

This file was deleted.

4 changes: 4 additions & 0 deletions build/cybersecurity-mlp/models/download-model.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/onnx-models-cybersecurity.zip
unzip -j onnx-models-cybersecurity.zip
3 changes: 2 additions & 1 deletion build/gtsrb/models/download-model.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
wget https://github.com/fastmachinelearning/qonnx_model_zoo/raw/main/models/GTSRB/Brevitas_CNV1W1A/cnv_1w1a_gtsrb.onnx
wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/onnx-models-gtsrb.zip
unzip -j onnx-models-gtsrb.zip
2 changes: 1 addition & 1 deletion build/kws/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def step_preprocess(model: ModelWrapper, cfg: DataflowBuildConfig):
build_cfg.VerificationStepType.FOLDED_HLS_CPPSIM,
]

model_name = "MLP_W3A3_python_speech_features_pre-processing_QONNX"
model_name = "MLP_W3A3_python_speech_features_pre-processing_QONNX_opset-11"
model_file = "models/" + model_name + ".onnx"

# Change the ONNX opset from version 9 to 11, which adds support for the TopK node
Expand Down
3 changes: 2 additions & 1 deletion build/kws/models/download-model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@

# Download validation data and model
wget https://github.com/Xilinx/finn-examples/releases/download/kws/python_speech_preprocessing_all_validation_KWS_data.npz
wget https://github.com/Xilinx/finn-examples/releases/download/kws/MLP_W3A3_python_speech_features_pre-processing_QONNX.onnx
wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/onnx-models-kws.zip
unzip -j onnx-models-kws.zip
2 changes: 1 addition & 1 deletion build/mobilenet-v1/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def select_build_steps(platform):
specialize_layers_config_file="specialize_layers_config/%s_specialize_layers.json"
% platform_name,
)
model_file = "models/%s_pre_post_tidy.onnx" % model_name
model_file = "models/%s_pre_post_tidy_opset-11.onnx" % model_name
build.build_dataflow_cfg(model_file, cfg)

# copy bitfiles and runtime weights into release dir if found
Expand Down
4 changes: 2 additions & 2 deletions build/mobilenet-v1/models/download-model.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.1a/onnx-models-mobilenetv1.zip
unzip onnx-models-mobilenetv1.zip
wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/onnx-models-mobilenetv1.zip
unzip -j onnx-models-mobilenetv1.zip
4 changes: 2 additions & 2 deletions build/resnet50/models/download-model.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.1a/onnx-models-resnet50.zip
unzip onnx-models-resnet50.zip
wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/onnx-models-resnet50.zip
unzip -j onnx-models-resnet50.zip
3 changes: 2 additions & 1 deletion build/vgg10-radioml/models/download-model.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh

wget https://github.com/Xilinx/finn-examples/releases/download/radioml/radioml_w4a4_small_tidy.onnx
wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/onnx-models-radioml.zip
unzip -j onnx-models-radioml.zip
16 changes: 8 additions & 8 deletions finn_examples/bitfiles/bitfiles.zip.link
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"Pynq-Z1": {
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.6/Pynq-Z1.zip",
"md5sum": "54b4691e5195ff10fb0c5339b78d6ea5"
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/Pynq-Z1.zip",
"md5sum": "402ab9dfa4612ae340715bf80e4717bd"
},
"Ultra96": {
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.6/Ultra96.zip",
"md5sum": "a297d1f5657f624ffce16c901f1f3f30"
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/Ultra96.zip",
"md5sum": "f777342ebc7f589950cf96843aeb6781"
},
"ZCU104": {
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.6/ZCU104.zip",
"md5sum": "17dd6ba3d24002275b6622ae0c098378"
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/ZCU104.zip",
"md5sum": "0e701e154a78e050cea69d2c9efefccf"
},
"xilinx_u250_xdma_201830_2": {
"url": "https://github.com/Xilinx/finn-examples/releases/download/rn50-u250/xilinx_u250_xdma_201830_2.zip",
"md5sum": "042cc5602c8a39d7541f1d79946c0b68"
},
"xilinx_u250_gen3x16_xdma_2_1_202010_1": {
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.6/xilinx_u250_gen3x16_xdma_2_1_202010_1.zip",
"md5sum": "59a61f233376ab0e340835034db50449"
"url": "https://github.com/Xilinx/finn-examples/releases/download/v0.0.7a/xilinx_u250_gen3x16_xdma_2_1_202010_1.zip",
"md5sum": "59d0089ebc135b0509c8ee5a8666b88f"
}
}
4 changes: 2 additions & 2 deletions finn_examples/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def mobilenetv1_w4a4_imagenet(target_platform=None, bitfile_path=None, rt_weight
def resnet50_w1a2_imagenet(target_platform=None, bitfile_path=None, rt_weights_path=None):
target_platform = resolve_target_platform(target_platform)
driver_mode = get_driver_mode()
model_name = "resnet50-w1a2"
model_name = "resnet50_w1a2"
filename = find_bitfile(model_name, target_platform, bitfile_path)
return FINNExampleOverlay(
filename,
Expand Down Expand Up @@ -393,6 +393,6 @@ def mlp_w2a2_unsw_nb15(target_platform=None, bitfile_path=None):
def cnv_w1a1_gtsrb(target_platform=None, bitfile_path=None):
target_platform = resolve_target_platform(target_platform)
driver_mode = get_driver_mode()
model_name = "cnv-gtsrb-w1a1"
model_name = "cnv_1w1a_gtsrb"
filename = find_bitfile(model_name, target_platform, bitfile_path)
return FINNExampleOverlay(filename, driver_mode, _gtsrb_cnv_io_shape_dict)
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"ok = 0\n",
"nok = 0\n",
"for i in range(n_batches):\n",
" ibuf_normal = batch_imgs[i].reshape(accel.ibuf_packed_device.shape)\n",
" ibuf_normal = batch_imgs[i].reshape(np.shape(accel.ibuf_packed_device))\n",
" exp = batch_labels[i]\n",
" # to avoid the slower software implementation during data unpacking,\n",
" # we make manual calls to buffer copies and execute_on_buffers\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel", "pynq>=2.5.1"]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel", "pynq>=2.5.1", "ipython"]

[tool.setuptools_scm]
write_to = "finn_examples/_version.py"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from pynqutils.setup_utils import build_py as _build_py

__author__ = "Yaman Umuroglu"
__copyright__ = "Copyright 2020-2021, Xilinx"
__copyright__ = "Copyright 2020-2022, Xilinx, 2022-2024, Advanced Micro Devices"
__email__ = "yamanu@xilinx.com"


Expand Down Expand Up @@ -120,7 +120,7 @@ def extend_package(path):
install_requires=[
"pynq>=2.5.1",
"bitstring>=3.1.7",
"numpy",
"numpy==1.24.1",
"finn-dataset_loading==0.0.5", # noqa
],
extras_require={
Expand Down

0 comments on commit 855b686

Please sign in to comment.