diff --git a/README.md b/README.md index 04f8f725..a2aa46a8 100644 --- a/README.md +++ b/README.md @@ -125,15 +125,15 @@ dummy_out = accel.execute(dummy_in) ## Example Neural Network Accelerators | Dataset | Topology | Quantization | Supported boards | Supported build flows |:----------------------------------------------------------------:|:-------------------------:|:------------------------------------------------------------:|:------------------:|:------------------:| -| CIFAR-10 | CNV (VGG-11-like) | several variants:
1/2-bit weights/activations | Pynq-Z1
ZCU104
Ultra96
U250 | Pynq-Z1
ZCU104
Ultra96
U250 | -| MNIST | 3-layer fully-connected | several variants:
1/2-bit weights/activations | Pynq-Z1
ZCU104
Ultra96
U250 | Pynq-Z1
ZCU104
Ultra96
U250 | +| CIFAR-10 | CNV (VGG-11-like) | several variants:
1/2-bit weights/activations | Pynq-Z1
Pynq-Z2
ZCU104
Ultra96
U250 | Pynq-Z1
ZCU104
Ultra96
U250 | +| MNIST | 3-layer fully-connected | several variants:
1/2-bit weights/activations | Pynq-Z1
Pynq-Z2
ZCU104
Ultra96
U250 | Pynq-Z1
ZCU104
Ultra96
U250 | | ImageNet | MobileNet-v1 | 4-bit weights & activations
8-bit first layer weights | Alveo U250 | Alveo U250 | | ImageNet | ResNet-50 | 1-bit weights 2-bit activations
4-bit residuals
8-bit first/last layer weights | Alveo U250 | Alveo U250 | | RadioML 2018 | 1D CNN (VGG10) | 4-bit weights & activations | ZCU104 | ZCU104 | -| MaskedFace-Net | [BinaryCoP](https://arxiv.org/pdf/2102.03456)
*Contributed by TU Munich+BMW* | 1-bit weights & activations | Pynq-Z1 | Pynq-Z1 | -| Google Speech Commands v2 | 3-layer fully-connected | 3-bit weights & activations | Pynq-Z1 | Pynq-Z1 | -| UNSW-NB15 | 4-layer fully-connected | 2-bit weights & activations | Pynq-Z1
ZCU104
Ultra96 | Pynq-Z1
ZCU104
Ultra96 | -| GTSRB | CNV (VGG-11-like) | 1-bit weights & activations | Pynq-Z1 | Pynq-Z1 | +| MaskedFace-Net | [BinaryCoP](https://arxiv.org/pdf/2102.03456)
*Contributed by TU Munich+BMW* | 1-bit weights & activations | Pynq-Z1
Pynq-Z2 | Pynq-Z1 | +| Google Speech Commands v2 | 3-layer fully-connected | 3-bit weights & activations | Pynq-Z1
Pynq-Z2 | Pynq-Z1 | +| UNSW-NB15 | 4-layer fully-connected | 2-bit weights & activations | Pynq-Z1
Pynq-Z2
ZCU104
Ultra96 | Pynq-Z1
ZCU104
Ultra96 | +| GTSRB | CNV (VGG-11-like) | 1-bit weights & activations | Pynq-Z1
Pynq-Z2 | Pynq-Z1 | *Please note that you can target other boards (such as the Pynq-Z2 or ZCU102) by changing the build script manually, but these accelerators have not been tested.* @@ -145,7 +145,7 @@ We welcome community contributions to add more examples to this repo! `finn-examples` provides pre-built FPGA bitfiles for the following boards: -* **Edge:** Pynq-Z1, Ultra96 and ZCU104 +* **Edge:** Pynq-Z1, Pynq-Z2, Ultra96 and ZCU104 * **Datacenter:** Alveo U250 It's possible to generate Vivado IP for the provided examples to target *any* diff --git a/finn_examples/models.py b/finn_examples/models.py index 0db17ecd..1e2e6ea1 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -28,6 +28,7 @@ import pkg_resources as pk +import logging import os import platform import pynq @@ -199,6 +200,10 @@ def find_bitfile(model_name, target_platform, bitfile_path): if bitfile_path is not None: return bitfile_path else: + if target_platform == "Pynq-Z2": + # Pynq Z2 board can use Pynq Z1 bitfiles + logging.info(f"Requested platform Pynq-Z2 not built, using Pynq-Z1") + target_platform = "Pynq-Z1" bitfile_exts = {"edge": "bit", "pcie": "xclbin"} bitfile_ext = bitfile_exts[get_edge_or_pcie()] bitfile_name = "%s.%s" % (model_name, bitfile_ext)