Code Monkey home page Code Monkey logo

finn-examples's Introduction

Dataflow Accelerator Examples

for PYNQ on Zynq and Alveo

drawing

This repository contains a variety of customized FPGA neural network accelerator examples built using the FINN compiler, which targets few-bit quantized neural networks with emphasis on generating dataflow-style architectures customized for each network.

The examples here come with pre-built bitfiles, PYNQ Python drivers and Jupyter notebooks to get started, and you can rebuild them from source. Both PYNQ on Zynq and Alveo are supported.

Need help with a problem in this repo, or got a question? Feel free to ask for help in the GitHub discussions. In the past, we also had a Gitter channel. Please be aware that this is no longer maintained by us but can still be used to search for questions previous users had.

Quickstart

We recommend PYNQ version 3.0.1, but older installations of PYNQ should also work. For PYNQ v2.6.1, please refer for set-up instructions to FINN-examples v0.0.5.

Zynq

For ZYNQ boards, all commands below must be prefixed with sudo or by first going into sudo su.

First, source the PYNQ and XRT virtual environment:

source /etc/profile.d/pynq_venv.sh
source /etc/profile.d/xrt_setup.sh

Next, ensure that your pip and setuptools installations are up-to-date on your PYNQ board:

python3 -m pip install pip==23.0 setuptools==67.1.0

Since we are going to install finn-examples without build-isolation, we need to ensure all dependencies are installed. For that, install setuptools_csm as well:

python3 -m pip install setuptools_scm==7.1.0

Install the finn-examples package using pip:

# remove previous versions with: pip3 uninstall finn-examples
pip3 install finn-examples --no-build-isolation
# to install particular git branch:
# pip3 install git+https://github.com/Xilinx/finn-examples.git@dev --no-build-isolation

Retrieve the example Jupyter notebooks using the PYNQ get-notebooks command. An example of how to run the Jupyter notebook server, assuming we are forwarding port 8888 from the target to some port on our local machine, is also shown below:

# on PYNQ boards, first cd /home/xilinx/jupyter_notebooks
pynq get-notebooks --from-package finn-examples -p . --force
jupyter-notebook --no-browser --allow-root --port=8888

Alveo

For Alveo we recommend setting up everything inside a virtualenv as described here.

First, create & source a virtual environment:

conda create -n <virtual-env> python=3.10
conda activate <virtual-env>

Next, ensure that your pip and setuptools installations are up-to-date:

python3 -m pip install --upgrade pip==23.0 setuptools==67.2.0

Finally, we can now install Pynq, FINN-examples and Jupyter (please note to source the XRT environment before):

pip3 install pynq==3.0.1
python3 -m pip install setuptools_scm==7.1.0 ipython==8.9.0
pip3 install finn-examples --no-build-isolation
# to install particular git branch:
# pip3 install git+https://github.com/Xilinx/finn-examples.git@dev --no-build-isolation
python3 -m pip install jupyter==1.0.0

Retrieve the example Jupyter notebooks using the PYNQ get-notebooks command. An example of how to run the Jupyter notebook server is also shown below:

pynq get-notebooks --from-package finn-examples -p . --force
jupyter-notebook --no-browser --port=8888

You can now navigate the provided Jupyter notebook examples, or just use the provided accelerators as part of your own Python program:

from finn_examples import models
import numpy as np

# instantiate the accelerator
accel = models.cnv_w2a2_cifar10()
# generate an empty numpy array to use as input
dummy_in = np.empty(accel.ishape_normal(), dtype=np.uint8)
# perform inference and get output
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


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 -


RadioML 2018
1D CNN (VGG10) 4-bit weights & activations ZCU104 ZCU104


MaskedFace-Net
BinaryCoP
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

Please note that the build flow for ResNet-50 for the Alveo U250 has known issues and we're currently working on resolving them. However, you can still execute the associated notebook, as we provide a pre-built FPGA bitfile generated with an older Vivado (/FINN) version targeting the xilinx_u250_xdma_201830_2 platform.
Furthermore, 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.

We welcome community contributions to add more examples to this repo!

Supported Boards

Note that the larger NNs are only available on Alveo or selected Zynq boards.

finn-examples provides pre-built FPGA bitfiles for the following boards:

  • Edge: Pynq-Z1, Ultra96 and ZCU104
  • Datacenter: Alveo U250

It's possible to generate Vivado IP for the provided examples to target any modern Xilinx FPGA of sufficient size. In this case you'll have to manually integrate the generated IP into your design using Vivado IPI. You can read more about this here.

Rebuilding the bitfiles

All of the examples here are built using the FINN compiler, and can be re-built or customized. See the build/README.md for more details.

finn-examples's People

Contributors

auphelia avatar fpjentzsch avatar heborras avatar maltanar avatar mgehre-amd avatar mmrahorovic avatar naelf avatar quetric avatar rpitonak avatar tobi-alonso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

finn-examples's Issues

How to dump the weights of the pretrained model

Hi, All

I want to dump the weights of the pre-trained model for those three examples. Is it possible to get these weights without connecting the PYNQ-board? (i.e., stand-alone execution on host CPU only)

Thanks!

Rebuild resnet50 failed in step_resnet50_set_fifo_depths [9/13]

When I rebuild resnet50 following the readme. After I run "./run-docker.sh build_custom ~/master/develop/finn-examples/build/resnet50", the script throw error and stop into pdb.
The Error information is as follows:

Running step: step_resnet50_set_fifo_depths [9/13]
Traceback (most recent call last):
  File "/workspace/finn/src/finn/builder/build_dataflow.py", line 128, in build_dataflow_cfg
    model = transform_step(model, cfg)
  File "/workspace/master/develop/finn-examples/build/resnet50/custom_steps.py", line 274, in step_resnet50_set_fifo_depths
    model = model.transform(
  File "/home/jumpchan/.local/lib/python3.8/site-packages/finn/core/modelwrapper.py", line 139, in transform
    (transformed_model, model_was_changed) = transformation.apply(
  File "/workspace/finn/src/finn/transformation/fpgadataflow/set_fifo_depths.py", line 322, in apply
    current_state = sim.internals["finn_design_i"][key]["inst"][
  File "/workspace/pyverilator/pyverilator/pyverilator.py", line 170, in __getitem__
    raise ValueError("'Collection' object has no item '%s'" % name)
ValueError: 'Collection' object has no item 'StreamingFIFO_1'
> /workspace/pyverilator/pyverilator/pyverilator.py(170)__getitem__()
-> raise ValueError("'Collection' object has no item '%s'" % name)
(Pdb)

Looks like the "StreamingFIFO_1" is not found. But I can not locate who wants "StreamingFIFO_1", and where the "StreamingFIFO_1" item should be? Could you help me with that?

My environment is:

Ubuntu 18.04
Vitis 2020.1
XRT_DEB_VERSION=xrt_202010.2.6.655_18.04-amd64-xrt
Card is U250

Looking forward to your reply! @maltanar @stsoe @Tobi-Alonso @quetric @ashokkuxilinx Thank you for your time!

"mobilenetv1-w4a4.bit" Not Found

Hi, When I run 2_imagenet_with_mobilenet_v1.ipynb, line 2:
accel = models.mobilenetv1_w4a4_imagenet()
Error like:
KeyError: 'finn_examples/bitfiles/Pynq-Z2/mobilenetv1-w4a4.bit'
I found:
image
So, can you update this model? Thank you very much.

How to use bincop-cnv (mask detection) on Pynq-Z2 (version 2.7)?

I have installed finn-examples on Pynq-Z2 (version 2.7), but I cannot run the notebook 3_binarycop_mask_detection.ipynb

The error is:
Exception: Bitfile for model = bincop-cnv target platform = Pynq-Z2 not found. Looked in: ['/usr/local/share/pynq-venv/lib/python3.8/site-packages/finn_examples/bitfiles/Pynq-Z2/bincop-cnv.bit', '/usr/local/share/pynq-venv/lib/python3.8/site-packages/finn_examples/bitfiles/bitfiles.zip.d/Pynq-Z2/bincop-cnv.bit']

Is there a way to run this example on Pynq-Z2 too?

MobileNet Example(Maxpool Version) doesn't work

Hello!
I have successfully completed the following workflow:

  1. Extract Brevitas model at Brevitas Example in ONNX format using a slightly modified version of the test_brevitas_mobilenet function at finn/tests/brevitas/test_brevitas_mobilenet.py.
  2. Compile the extracted ONNX Graph to HW following the example at build/mobilenet-v1.

In this process, I wanted to make slight modifications to the Brevitas model at Brevitas Example by replacing TruncAvgPool2d with QuantMaxPool2d.
Then, I attempted to extract the modified model in ONNX format and synthesize it to HW following the example at finn-examples/build/mobilenet-v1.

However, during the partitioning process (I'm not exactly sure what this operation entails), I encountered an AssertionError: cycle-free graph violated: partition depends on itself error(self.partitioning(node) != partition_id is False, so asserted).
I'm wondering meaning of the error and how I can successfully synthesize the modified model to HW. Please help!

Let me show you some details.

Modified Brevitas Model(only the modified parts are provided compared to Brevitas Example):

class MobileNet_ori(nn.Module):

    def __init__(
            self,
            channels,
            first_stage_stride,
            act_bit_width,
            weight_bit_width,
            round_average_pool=True,
            weight_quant=CommonIntWeightPerChannelQuant,
            first_layer_bit_width=8,
            first_layer_weight_quant=CommonIntWeightPerChannelQuant,
            last_layer_weight_quant=CommonIntWeightPerTensorQuant,
            last_layer_bit_width=8,
            avg_pool_kernel_size=7,
            first_layer_stride=2,
            in_channels=3,
            num_classes=1000):
        super(MobileNet_ori, self).__init__()
        init_block_channels = channels[0][0]

        self.features = Sequential()
        init_block = ConvBlock(
            in_channels=in_channels,
            out_channels=init_block_channels,
            kernel_size=3,
            stride=first_layer_stride,
            weight_bit_width=first_layer_bit_width,
            weight_quant=first_layer_weight_quant,
            act_bit_width=act_bit_width,
            activation_scaling_per_channel=True)
        self.features.add_module('init_block', init_block)
        in_channels = init_block_channels
        for i, channels_per_stage in enumerate(channels[1:]):
            stage = Sequential()
            pw_activation_scaling_per_channel = i < len(channels[1:]) - 1
            for j, out_channels in enumerate(channels_per_stage):
                stride = 2 if (j == 0) and ((i != 0) or first_stage_stride) else 1
                mod = DwsConvBlock(
                    in_channels=in_channels,
                    out_channels=out_channels,
                    stride=stride,
                    act_bit_width=act_bit_width,
                    weight_bit_width=weight_bit_width,
                    weight_quant=weight_quant,
                    pw_activation_scaling_per_channel=pw_activation_scaling_per_channel)
                stage.add_module('unit{}'.format(j + 1), mod)
                in_channels = out_channels
            self.features.add_module('stage{}'.format(i + 1), stage)
        # Exporting to torch or ONNX qcdq requires round
        avgpool_float_to_int_impl_type = 'ROUND' if round_average_pool else 'FLOOR'
        self.final_pool = QuantMaxPool2d(
            kernel_size=avg_pool_kernel_size,
            stride=1)            
        # self.final_pool = TruncAvgPool2d(
        #     kernel_size=avg_pool_kernel_size,
        #     stride=1,
        #     bit_width=last_layer_bit_width,
        #     float_to_int_impl_type=avgpool_float_to_int_impl_type)
        self.output = QuantLinear(
            in_channels,
            num_classes,
            bias=True,
            bias_quant=IntBias,
            weight_quant=last_layer_weight_quant,
            weight_bit_width=last_layer_bit_width)

    def forward(self, x):
        # print("x input",x.shape)
        x = self.features(x)
        # print("features",x.shape)
        x = self.final_pool(x)
        # print("final_pool",x.shape)
        x = x.view(x.size(0), -1)
        # print("view",x.shape)
        out = self.output(x)
        # print("output",x.shape)
        return out


def quant_mobilenet_v1_ori():

    channels = [[32], [64], [128, 128], [256, 256], [512, 512, 512, 512, 512, 512], [1024, 1024]]
    first_stage_stride = False
    width_scale = 1.0
    bit_width = 8
    round_avgpool = False

    if width_scale != 1.0:
        channels = [[int(cij * width_scale) for cij in ci] for ci in channels]

    net = MobileNet_ori(
        channels=channels,
        first_stage_stride=first_stage_stride,
        round_average_pool=round_avgpool,
        act_bit_width=bit_width,
        weight_bit_width=bit_width,
        last_layer_bit_width=bit_width)

    return net

Modified test_brevitas_mobilenet function at finn/tests/brevitas/test_brevitas_mobilenet.py

def test_brevitas_mobilenet_custom_dirty(mobilenet, img_torch, img_size, model_name):
    mobilenet = mobilenet.eval()

    # export preprocess
    export_onnx_path = make_build_dir("test_brevitas_"+ model_name +"-custom_")
    print("export_onnx_path:", export_onnx_path)
    preproc_onnx = export_onnx_path + "/quant_"+model_name+"-custom_preproc.onnx"
    print("preproc_onnx:",preproc_onnx)
    
    lower_bound = 0.406
    upper_bound = 0.485
    ch = img_size[0]
    random_list = np.random.uniform(low=lower_bound, high=upper_bound, size=ch).tolist()
    mean = random_list if ch!=3 else [0.485, 0.456, 0.406] # correct inferrence is not my interest, so use random value.
    std = 0.226
    preproc = NormalizePreProc(mean, std, ch)
    print("ch is",ch,"H is",img_size[1],"W is",img_size[2])
    export_qonnx(preproc, torch.randn(1, ch, img_size[1], img_size[2]), preproc_onnx)
    qonnx_cleanup(preproc_onnx, out_file=preproc_onnx)
    preproc_model = ModelWrapper(preproc_onnx)
    preproc_model = preproc_model.transform(ConvertQONNXtoFINN())
    # set input finn datatype to UINT8
    preproc_model.set_tensor_datatype(preproc_model.graph.input[0].name, DataType["UINT8"])
    preproc_model = preproc_model.transform(InferShapes())
    preproc_model = preproc_model.transform(GiveUniqueNodeNames())
    preproc_model = preproc_model.transform(GiveUniqueParameterTensors())
    preproc_model = preproc_model.transform(GiveReadableTensorNames())

    finn_onnx = export_onnx_path + "/quant_"+model_name+"-custom_exported.onnx"
    # mobilenet = get_test_model_trained("mobilenet", 4, 4)
    export_qonnx(mobilenet, torch.randn(1, ch, img_size[1], img_size[2]), finn_onnx)
    qonnx_cleanup(finn_onnx, out_file=finn_onnx)

    # do forward pass in PyTorch/Brevitas
    input_tensor = preproc.forward(img_torch)
    expected = mobilenet.forward(input_tensor).detach().numpy()
    expected_topk = expected.flatten()
    expected_top5 = np.argsort(expected_topk)[-5:]
    expected_top5 = np.flip(expected_top5)
    expected_top5_prob = []
    for index in expected_top5:
        expected_top5_prob.append(expected_topk[index])

    model = ModelWrapper(finn_onnx)
    model = model.transform(ConvertQONNXtoFINN())
    model = model.transform(InferShapes())
    model = model.transform(FoldConstants())
    model = model.transform(InsertTopK())
    # get initializer from Mul that will be absorbed into topk
    a0 = model.get_initializer(model.graph.node[-2].input[1])
    model = model.transform(absorb.AbsorbScalarMulAddIntoTopK())
    model = model.transform(InferShapes())
    model = model.transform(InferDataTypes())
    model = model.transform(InferDataLayouts())
    model = model.transform(GiveUniqueNodeNames())
    model = model.transform(GiveUniqueParameterTensors())
    model = model.transform(GiveReadableTensorNames())
    model.save(export_onnx_path + "/quant_"+model_name+"-custom_wo_preproc.onnx")
    model = model.transform(MergeONNXModels(preproc_model))
    model.save(export_onnx_path + "/quant_"+model_name+"-custom.onnx")
    idict = {model.graph.input[0].name: img_np}
    odict = oxe.execute_onnx(model, idict, True)
    produced = odict[model.graph.output[0].name]
    produced_prob = odict["TopK_0_out0"] * a0
    print(produced.flatten(), expected_top5)
    assert (produced.flatten() == expected_top5).all()
    assert np.isclose(produced_prob.flatten(), expected_top5_prob, atol=2.2 * 1e-1).all()

    return model

img_np = np.random.randint(0, 256, size=(1, 3, 224, 224)).astype(np.float32)
img_torch = torch.from_numpy(img_np).float()
model = test_brevitas_mobilenet_custom_dirty(quant_mobilenet_v1_ori(), img_torch = img_torch, img_size = (3,224,224), model_name = "mobilenet_v1_max")

The error message:

Running step: step_mobilenet_streamline [1/14]
Running step: step_mobilenet_lower_convs [2/14]
Running step: step_mobilenet_convert_to_hls_layers_separate_th [3/14]
Running step: step_create_dataflow_partition [4/14]
Traceback (most recent call last):
  File "/home/vboxuser/Desktop/FINN/finn-examples-main/build/finn/src/finn/builder/build_dataflow.py", line 177, in build_dataflow_cfg
    model = transform_step(model, cfg)
  File "/home/vboxuser/Desktop/FINN/finn-examples-main/build/finn/src/finn/builder/build_dataflow_steps.py", line 379, in step_create_dataflow_partition
    parent_model = model.transform(
  File "/home/vboxuser/Desktop/FINN/finn-examples-main/build/finn/deps/qonnx/src/qonnx/core/modelwrapper.py", line 146, in transform
    (transformed_model, model_was_changed) = transformation.apply(transformed_model)
  File "/home/vboxuser/Desktop/FINN/finn-examples-main/build/finn/src/finn/transformation/fpgadataflow/create_dataflow_partition.py", line 80, in apply
    parent_model = model.transform(
  File "/home/vboxuser/Desktop/FINN/finn-examples-main/build/finn/deps/qonnx/src/qonnx/core/modelwrapper.py", line 146, in transform
    (transformed_model, model_was_changed) = transformation.apply(transformed_model)
  File "/home/vboxuser/Desktop/FINN/finn-examples-main/build/finn/deps/qonnx/src/qonnx/transformation/create_generic_partitions.py", line 120, in apply
    assert (
AssertionError: cycle-free graph violated: partition depends on itself

Installing finn-examples fails on Pynq Z2 (version 2.7)

After managing to rebuild the BNN images for the Pynq Z2 boards I'm having issues with deploying them.
Unfortunatelfy the pip3 install git+https://github.com/Xilinx/finn-examples.git@dev -v command fails with the following error:

arm-linux-gnueabihf-gcc: fatal error: Killed signal terminated program as
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for pandas
  Successfully built pynq cffi numpy
  Failed to build pandas
  ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly

Are there any steps missing in the quickstart section of the README?

Complete log can be found here: https://gist.github.com/developandplay/128bb4974966d83b2a1217d26008ff60

Can not retrieve the example Jupyter notebooks

Hi everybody,
I'm currently trying to setup finn-examples on my Pynq-Z1 board. I successfully executed python3 -m pip install --upgrade pip setuptools and pip3 install finn-examples. On the next step I try pynq get-notebooks --from-package finn-examples -p . command and receive an error. Executing the same command with sudo it says that no notebooks are available. See the following screenshot.

Bildschirmfoto von 2021-03-14 13-19-47

Can somebody help me here?

Problem running FINN examples

I have XRT version 2.11.634 and I am reciving this error while trying to run 1_cifar10_with_cnv_networks, can anyone specify what needs to be done in order to run this notebook?

Below are the cells that I run so far:
from finn_examples import models
print(list(filter(lambda x: "cifar10" in x, dir(models))))

accel = models.cnv_w1a1_cifar10()

XRT build version: 2.11.634
Build hash: 5ad5998d67080f00bca5bf15b3838cf35e0a7b26
Build date: 2021-06-09 05:08:58
Git branch: 2021.1
PID: 69674
UID: 1004
[Wed Mar 13 13:50:12 2024 GMT]
HOST: cauchy
EXE: /usr/local/bin/python3.9
[XRT] ERROR: See dmesg log for details. err=-2

RuntimeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 accel = models.cnv_w1a1_cifar10()

File ~/.local/lib/python3.9/site-packages/finn_examples/models.py:274, in cnv_w1a1_cifar10(target_platform)
272 model_name = "cnv-w1a1"
273 filename = find_bitfile(model_name, target_platform)
--> 274 return FINNExampleOverlay(filename, driver_mode, _cifar10_cnv_io_shape_dict)

File ~/.local/lib/python3.9/site-packages/finn_examples/driver.py:80, in FINNExampleOverlay.init(self, bitfile_name, platform, io_shape_dict, batch_size, fclk_mhz, device, download, runtime_weight_dir)
48 def init(
49 self,
50 bitfile_name,
(...)
57 runtime_weight_dir="runtime_weights/",
58 ):
59 """Initialize the FINN accelerator.
60
61 Parameters
(...)
78 Path to runtime weights folder.
79 """
---> 80 super().init(bitfile_name, download=download, device=device)
81 self.runtime_weight_dir = runtime_weight_dir
82 self._io_shape_dict = io_shape_dict

File ~/.local/lib/python3.9/site-packages/pynq/overlay.py:348, in Overlay.init(self, bitfile_name, dtbo, download, ignore_version, device, gen_cache)
345 self.systemgraph = None
347 if download:
--> 348 self.download()
349 else:
350 if gen_cache:

File ~/.local/lib/python3.9/site-packages/pynq/overlay.py:428, in Overlay.download(self, dtbo)
425 else:
426 Clocks.set_pl_clk(i)
--> 428 super().download(self.parser)
429 if dtbo:
430 super().insert_dtbo(dtbo)

File ~/.local/lib/python3.9/site-packages/pynq/bitstream.py:168, in Bitstream.download(self, parser)
151 def download(self, parser=None):
152 """Download the bitstream onto PL and update PL information.
153
154 If device tree blob has been specified during initialization, this
(...)
166
167 """
--> 168 self.device.download(self, parser)

File ~/.local/lib/python3.9/site-packages/pynq/pl_server/xrt_device.py:541, in XrtDevice.download(self, bitstream, parser)
539 with open(bitstream.bitfile_name, "rb") as f:
540 data = f.read()
--> 541 self._xrt_download(data)
542 super().post_download(bitstream, parser)

File ~/.local/lib/python3.9/site-packages/pynq/pl_server/xrt_device.py:529, in XrtDevice._xrt_download(self, data)
527 xrt.xclOpenContext(self.handle, v["uuid_ctypes"], v["idx"], True)
528 self.contexts = old_contexts
--> 529 raise RuntimeError(
530 "Programming Device failed: " + _format_xrt_error(err)
531 )
532 finally:
533 xrt.xclUnlockDevice(self.handle)

RuntimeError: Programming Device failed: EINVAL (22) Invalid argument
I have also tryed with a super user and it didn't helped.

Thank you

Issues rebuilding bnn-pynq

Hello,

This issue does not need a response. For the time being, I am moving to Vitis-AI. However, I wanted to let you know it seems like there are issues rebuilding the bnn-pynq examples.

I tested on two different build setups:

Setup 1

VirtualBox with Ubuntu 18.04, Vitis 2020.1

I followed the build instructions for bnn-pynq, however, I did use the pre-built docker image for version 0.7 of FINN. This may have caused some issues, but I am not positive.

My best guess here is that the VM was underpowered and simply not able to complete the build in a reasonable amount of time. Though, I am unclear why that would cause an issue.

I targeted building for both the ZCU104 and U200.

The main output in the docker container shows:

gealy@gealy-VirtualBox:~/finn-examples/build/finn$ ./run-docker.sh build_custom ~/finn-examples/build/bnn-pynq
WARNING: No swap limit support
Running build_custom: /home/gealy/finn-examples/build/bnn-pynq/build.py
Docker container is named finn_dev_gealy
Docker tag is named maltanar/finn:v0.7
Mounting /tmp/finn_dev_gealy into /tmp/finn_dev_gealy
Mounting /tools/Xilinx into /tools/Xilinx
Port-forwarding for Jupyter 8888:8888
Port-forwarding for Netron 8081:8081
Vivado IP cache dir is at /tmp/finn_dev_gealy/vivado_ip_cache
Using default PYNQ board Pynq-Z1
Obtaining file:///workspace/finn
Installing collected packages: finn
  Running setup.py develop for finn
Successfully installed finn
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)'))) - skipping
Found Vitis at /tools/Xilinx/Vitis/2020.1
XILINX_XRT      : /opt/xilinx/xrt
PATH            : /opt/xilinx/xrt/bin:/tools/Xilinx/Vitis/2020.1/bin:/tools/Xilinx/Vitis/2020.1/gnu/microblaze/lin/bin:/tools/Xilinx/Vitis/2020.1/gnu/arm/lin/bin:/tools/Xilinx/Vitis/2020.1/gnu/microblaze/linux_toolchain/lin64_le/bin:/tools/Xilinx/Vitis/2020.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/tools/Xilinx/Vitis/2020.1/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/tools/Xilinx/Vitis/2020.1/gnu/aarch64/lin/aarch64-linux/bin:/tools/Xilinx/Vitis/2020.1/gnu/aarch64/lin/aarch64-none/bin:/tools/Xilinx/Vitis/2020.1/gnu/armr5/lin/gcc-arm-none-eabi/bin:/tools/Xilinx/Vitis/2020.1/tps/lnx64/cmake-3.3.2/bin:/tools/Xilinx/Vitis/2020.1/cardano/bin:/tools/Xilinx/Vivado/2020.1/bin:/tools/Xilinx/DocNav:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workspace/oh-my-xilinx
LD_LIBRARY_PATH : /opt/xilinx/xrt/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
PYTHONPATH     : /opt/xilinx/xrt/python:
Found XRT at /opt/xilinx/xrt
Building dataflow accelerator from models/cnv-w1a1.onnx
Intermediate outputs will be generated in /tmp/finn_dev_gealy
Final outputs will be generated in output_cnv-w1a1_ZCU104
Build log is at output_cnv-w1a1_ZCU104/build_dataflow.log
Running step: step_qonnx_to_finn [1/17]
Running step: step_tidy_up [2/17]
Running step: step_streamline [3/17]
Running step: step_convert_to_hls [4/17]
Running step: step_create_dataflow_partition [5/17]
Running step: step_target_fps_parallelization [6/17]
Running step: step_apply_folding_config [7/17]
Running step: step_generate_estimate_reports [8/17]
Running step: step_hls_codegen [9/17]
Running step: step_hls_ipgen [10/17]
Running step: step_set_fifo_depths [11/17]
Running step: step_create_stitched_ip [12/17]
Running step: step_measure_rtlsim_performance [13/17]
Running step: step_out_of_context_synthesis [14/17]
Running step: step_synthesize_bitfile [15/17]
ERROR: [Common 17-69] Command failed: Run 'impl_1' has not been launched. Unable to open
Traceback (most recent call last):
  File "/workspace/finn/src/finn/builder/build_dataflow.py", line 166, in build_dataflow_cfg
    model = transform_step(model, cfg)
  File "/workspace/finn/src/finn/builder/build_dataflow_steps.py", line 621, in step_synthesize_bitfile
    model = model.transform(
  File "/workspace/finn-base/src/finn/core/modelwrapper.py", line 141, in transform
    (transformed_model, model_was_changed) = transformation.apply(
  File "/workspace/finn/src/finn/transformation/fpgadataflow/make_zynq_proj.py", line 356, in apply
    model = model.transform(
  File "/workspace/finn-base/src/finn/core/modelwrapper.py", line 141, in transform
    (transformed_model, model_was_changed) = transformation.apply(
  File "/workspace/finn/src/finn/transformation/fpgadataflow/make_zynq_proj.py", line 274, in apply
    raise Exception(
Exception: Synthesis failed, no bitfile found. Check logs under /tmp/finn_dev_gealy/vivado_zynq_proj_bsc0nfeg
> /workspace/finn/src/finn/transformation/fpgadataflow/make_zynq_proj.py(274)apply()
-> raise Exception(

The end of the accompanying vivado.log file shows:

[Mon Apr  5 16:20:46 2021] Launched impl_1...
Run output will be captured here: /tmp/finn_dev_gealy/vivado_zynq_proj_bsc0nfeg/finn_zynq_link.runs/impl_1/runme.log
launch_runs: Time (s): cpu = 00:00:36 ; elapsed = 00:00:43 . Memory (MB): peak = 2392.496 ; gain = 184.086 ; free physical = 3606 ; free virtual = 10113
# wait_on_run [get_runs impl_1]
[Mon Apr  5 16:20:46 2021] Waiting for impl_1 to finish...
[Mon Apr  5 18:13:53 2021] impl_1 finished
WARNING: [Vivado 12-8222] Failed run(s) : 'top_StreamingDataflowPartition_1_0_synth_1'
wait_on_run: Time (s): cpu = 00:00:06 ; elapsed = 01:53:09 . Memory (MB): peak = 2392.496 ; gain = 0.000 ; free physical = 8291 ; free virtual = 10109
# open_run impl_1
ERROR: [Common 17-69] Command failed: Run 'impl_1' has not been launched. Unable to open
INFO: [Common 17-206] Exiting Vivado at Mon Apr  5 18:14:02 2021...

The Vivado log doesn't really indicate what the problem is, but perhaps it will mean more to you.

Setup 2

In this setup, I attempted to run the docker container on a large computing node that has 3 Alveo U200 boards attached.
This server is running a version of Red Hat Linux. On this node, I am able to successfully build with Vitis-AI docker containers.

On this system, I tested with both the pre-built FINN docker container (version 0.7) and with the custom-built version generated by the docker_run.sh script.

The issues seen here were slightly different than before.

Building dataflow accelerator from models/cnv-w1a1.onnx
Intermediate outputs will be generated in /ihome/ageorge/cag158/tmp/finn_dev_cag158
Final output will be generated in output_cnv-w1a1_ZCU104
Build log is at output_cnv-w1a1_ZCU104/build_dataflow.log
Running step: step_qonnx_to_finn [1/17] 
Running step: step_tidy_up [2/17]
Running step: step_streamline [3/17]
Running step: step_convert_to_hls [4/17] 
Running step: step_create_dataflow_partition [5/17]
Running step: step_target_fps_parallelization [6/17]
Running step: step_apply_folding_config [7/17] 
Running step: step_generate_estimate_reports [8/17]
Running step: step_hls_codegen [9/17]
Running step: step_hls_ipgen [10/17]
Running step: step_set_fifo_depths [11/17]
ERROR: [BD 5-390] IP definition not found for VLNV: xilinx.com:hls: Thresholding_Batch_0:1.0
Traceback (most recent call last): 
File "/workspace/finn/src/finn/builder/build_dataflow.py", line 166, in build_dataflow_cfg
model = transform_step(model, cfg) 
File "/workspace/finn/src/finn/builder/build_dataflow_steps.py", line 450, in step_set_fifo_depths
model = model.transform(
File "/workspace/finn-base/src/finn/core/modelwrapper.py", line 141, in transform
(transformed_model, model_was_changed) = transformation.apply( 
File "/workspace/finn/src/finn/transformation/fpgadataflow/set_fifo_depths.py", line 306, in apply
sim = pyverilate_stitched_ip (model)
File "/workspace/finn-base/src/finn/util/pyverilator.py", line 167, in pyverilate_stitched_ip
with open(vivado_stitch_proj_dir + "/all_verilog_srcs.txt", "r") as f: 
FileNotFoundError: [Errno 2] No such file or directory: '/ihome/ageorge/cag158/tmp/finn_dev_cag158/vivado_stitch_proj_dd_fh5q
k/all_verilog_srcs.txt'
> /workspace/finn-base/src/finn/util/pyverilator.py (167) pyverilate_stitched_ip() 
-> with open(vivado_stitch_proj_dir + "/all_verilog_srcs.txt", "r") as f:
(Pdb) |

It seems like some file that should have been autogenerated was not. It is curious to me that I was able to get farther in the build process on setup 1. I'm not sure if this is an issue with the docker image or with some other setup variable.

Since I was targeting different install locations, I did have to change my environment variables on the different setups. However, I did try to set the same ones on each machine. On the second setup, I had the following environment variables in my .bashrc:

export LC_ALL="C"
export FINN_XILINX_PATH=/ihome/crc/install/xilinx
export FINN_XILINX_VERSION=2020.1
export VIVADO_PATH=/ihome/crc/install/xilinx/Vivado/2020.1/
#export FINN_DOCKER_TAG=maltanar/finn:v0.7
#export FINN_DOCKER_PREBUILT=1
export PLATFORM_REPO_PATHS=/opt/xilinx

Again, I don't need an immediate update to this issue. I think FINN sounds like a cool tool, but this project is on a bit of a deadline, so I am switching to Vitis-AI for now.

Please let me know if I can provide any additional info.

ResNet-50 model and notebook release

Hi, I am wondering about the release mentioned in issue #17.

I have run into some problems implementing ResNet-18 with FINN and it would be very helpful to see the PyTorch/Brevitas model as well as the notebook with the transformations and steps applied to arrive at the ResNet-50 bitstream.

Is there any chance for this code to be added to the repository anytime soon?

build-all.sh fails with AttributeError: module 'attr' has no attribute 'define'

Successfully installed finn
WARNING: Unable to find /settings64.sh
WARNING: Functionality dependent on Vitis will not be available.
WARNING: If you need Vitis, ensure VITIS_PATH is set correctly and mounted into the Docker container.
Found Vivado at /tools/Xilinx/Vivado/2022.1
Found Vitis HLS at /tools/Xilinx/Vitis_HLS/2022.1
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/pdb.py", line 1704, in main
pdb._runscript(mainpyfile)
File "/opt/conda/lib/python3.8/pdb.py", line 1573, in _runscript
self.run(statement)
File "/opt/conda/lib/python3.8/bdb.py", line 580, in run
exec(cmd, globals, locals)
File "", line 1, in
File "/home/rstar900/git_repos/finn-examples/build/bnn-pynq/build.py", line 1, in
import finn.builder.build_dataflow as build
File "/home/rstar900/git_repos/finn-examples/build/finn/src/finn/builder/build_dataflow.py", line 29, in
import clize
File "/opt/conda/lib/python3.8/site-packages/clize/init.py", line 7, in
from clize.parser import Parameter
File "/opt/conda/lib/python3.8/site-packages/clize/parser.py", line 14, in
from sigtools import modifiers
File "/opt/conda/lib/python3.8/site-packages/sigtools/init.py", line 28, in
from sigtools.specifiers import signature
File "/opt/conda/lib/python3.8/site-packages/sigtools/specifiers.py", line 42, in
from sigtools import _util, modifiers, signatures, _specifiers
File "/opt/conda/lib/python3.8/site-packages/sigtools/modifiers.py", line 36, in
from sigtools import _util, _specifiers, _signatures
File "/opt/conda/lib/python3.8/site-packages/sigtools/_specifiers.py", line 23, in
from sigtools import _signatures, _util
File "/opt/conda/lib/python3.8/site-packages/sigtools/_signatures.py", line 104, in
@attr.define(eq=False)
AttributeError: module 'attr' has no attribute 'define'

Working with Custom model

Hi.

I tried the vgg10-radioml example. I synthesized the vgg10-radioml model with the command ./run-docker.sh build_custom $FINN_EXAMPLES/build/vgg10-radioml using FINN.

Ultimately, I want to export a custom model, constructed based on Brevitas (or any other framework), as ONNX and synthesize it with FINN, rather than using the provided vgg10-radioml ONNX. I have few questions and I don't necessarily need answers to all of them. I hope to receive advice that helps me achieve my ultimate goal.

  1. After exporting my custom Brevitas model to ONNX and replacing the ONNX file in $FINN_EXAMPLES/build/vgg10-radioml, I encountered numerous errors. Is the $FINN_EXAMPLES/build/vgg10-radioml/build.py specifically written for the vgg10-radioml model? Can I not synthesize my custom model using this build.py code?

  2. If there is code available for the vgg10-radioml model before exporting it to ONNX, I think I can build my custom model based on that and synthesize it with FINN smoothly. The vgg10-radioml model code likely incorporates an understanding of FINN and adheres to many FINN constraints, making it easier to transplant my custom model. Could I obtain the code for the vgg10-radioml model? (Even if it's not based on Brevitas)

Thank you.

Problem in "Tidy Up" of .onnx file

I took part in the ITU-ML5G-PS-007 Lightning-Fast Modulation Classification with Hardware-Efficient Neural Networks.

I want to implement my solution in hardware and for that I looked up on the internet and got the FINN repository. Now I am facing some issues while working in the said repository.

  1. In the Xilinx/finn-examples/build/vgg10-radioml/README it is mentioned that “The quantized VGG10 is based on the baseline topology for our problem statement in the ITU AI/ML in 5G Challenge. You can find it in our sandbox repository. IN addition, the ONNX model has been tidied up by removing the input quantization, which we do in software for this example, and by adding a top-k (k=1) node at the output. Thus, the accelerator returns the top-1 class index instead of logits.”
    tidy

  2. My query is that how is the ONNX model tidied up. I have searched over the internet and got no fruitful results.

  3. The ONNX file that we get from the said sandbox repository and the ONNX file that we use in the vgg10-radioml in the FINN repository are not same.

  4. Vgg10-radioml in the FINN-Examples have used a tidy up .onnx file. But how will we convert the .onnx file generated from the sandbox repository to the .onnx file that can be directly used for hardware implementation.
    I have been stuck on this problem for almost 3 weeks. I do not see any other option to proceed further. Kindly help me out. Looking forward to your response. Thank you.

Error building Mobilenet-v1

Hi,

I'm trying to build the mobilenet-v1 model. I followed all the steps in the README of the repository. However I get this error:

  File "/opt/conda/lib/python3.8/site-packages/sigtools/_signatures.py", line 83, in <module>
    @attr.define(eq=False)
AttributeError: module 'attr' has no attribute 'define'

Do you know how to solve it?
Thanks for your help

Update FINN version in `get_finn.sh`

Hi,
It seems that the current get_finn.sh script uses an older commit:

# URL for git repo to be cloned
REPO_URL=https://github.com/Xilinx/finn
# commit hash for repo
REPO_COMMIT=96c0f5e3678abd7b1eaab2a2b4f8e937ac1f48b8

This commit point has this dependency issue where importing finn can cause:

from sigtools import _signatures, _util File "/opt/conda/lib/python3.8/site-packages/sigtools/_signatures.py", line 83 , in <module> @attr.define(eq=False)
AttributeError: module 'attr' has no attribute 'define'

I found that the fix is added by:
Xilinx/finn#644

Updating to the latest commits in finn fixed this issue. I think it would be good to update the get_finn.sh commit point.

Installation under PYNQ v3.0.1 for ZCU104 is broken

FYI--

I attempted to install this under the latest PYNQ v3.0.1 image for the ZCU104. I performed the following steps:

  • sudo python3 -m pip install --upgrade pip setuptools
  • sudo pip3 install finn-examples

The second step above failed with the error: No module named 'pynqutils'

The finn-examples README calls out PYNQ v2.6.1, but only v2.6.0 is readily available at http://www.pynq.io/board.html. Re-imaging my microSD with v2.6.0 and re-running the commands above completed successfully.

Figured I'd post the issue here in case anybody else runs into this.

Problem with installing finn-examples

I am trying to use the instructions for the Alveo. I have installed Python 3.9, created a virtual environment with Anaconda, installed PYNQ and the Alveo examples. But when I use the command: pip3 install finn-examples --no-build-isolation, this error occurs:"
image

ResNet-50 Python Brevitas Model

Hi FINN Team,

I am currently working on a project that is interested in recreating the quantized .onnx file used for the ResNet-50 FINN example here:

https://github.com/Xilinx/finn-examples/tree/main/build/resnet50

Is there any way that the notebook/python code for creating the quantized, brevitas version of the ResNet-50 model can be shared?

I am interested in trying to adapt the network to fit on a ZCU102/ZCU104.

Urgent unknown problem needs help!!!

I want to implement the deployment of 4bit quantization on the PYNQ board. I saw that the MobileNet-v1 example in the example is quantified to 4bit, but I saw it on the FINN official website (https://finn.readthedocs.io/en/latest /source_code/finn.core.html)
"Enum class that contains FINN data types to set the quantization annotation. ONNX does not support data types smaller than 8-bit integers, whereas in FINN we are interested in smaller integers down to ternary and bipolar." Why is this? How to solve this situation.

finn build problem : Running step: step_synthesize_bitfile

Hi @maltanar and all, I encounter some errors about synth_1 problems. And u may see below information and report_ip_status, it seems some ip cannot be found. But I follow your steps to generate finn ips. How to deal with it? thanks,

Platform: U200
model: Mobilenetv1
Ubuntu:18.04
Vitis:2020.1

Running step: step_synthesize_bitfile [11/13]
ERROR: [Common 17-69] Command failed: Run 'synth_1' has not been launched. Unable to open
ERROR: [Common 17-69] Command failed: The provided IP directory doesn't exist: '/tmp/finn_dev_enai/vivado_stitch_proj_82a0t6qf/ip'
Traceback
![hls_mobilenetv1_error1](https://user-images.githubusercontent.com/29093207/143428638-ade83f41-785d-4687-9ab2-992c81ba2992.jpg)
 (most recent call last):
  File "/workspace/finn/src/finn/builder/build_dataflow.py", line 166, in build_dataflow_cfg
    model = transform_step(model, cfg)
  File "/workspace/finn/src/finn/builder/build_dataflow_steps.py", line 643, in step_synthesize_bitfile
    model = model.transform(
  File "/workspace/finn-base/src/finn/core/modelwrapper.py", line 141, in transform
    (transformed_model, model_was_changed) = transformation.apply(
  File "/workspace/finn/src/finn/transformation/fpgadataflow/vitis_build.py", line 431, in apply
    kernel_mode
![hls_mobilenetv1_error1](https://user-images.githubusercontent.com/29093207/143428704-1771094d-7a8a-4627-9d98-b568f002d509.jpg)
l = kernel_model.transform(
  File "/workspace/finn-base/src/finn/core/modelwrapper.py", line 141, in transform
    (transformed_model, model_was_changed) = transformation.apply(
  File "/workspace/finn/src/finn/transformation/fpgadataflow/vitis_build.py", line 163, in apply
    assert os.path.isfile(xo_path), (
AssertionError: Vitis .xo file not created, check logs under /tmp/finn_dev_enai/vivado_stitch_proj_82a0t6qf
> /workspace/finn/src/finn/transformation/fpgadataflow/vitis_build.py(163)apply()
-> assert os.path.isfile(xo_path), (

Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
------------------------------------------------------------------------------------
| Tool Version : Vivado v.2020.1 (lin64) Build 2902540 Wed May 27 19:54:35 MDT 2020
| Date         : Thu Nov 25 18:49:05 2021
| Host         : enai-System-Product-Name running 64-bit Ubuntu 18.04.5 LTS
| Command      : report_ip_status
------------------------------------------------------------------------------------

IP Status Summary

1. Project IP Status
--------------------
Your project uses 46 IP. Some of these IP may have undergone changes in this release of the software. Please review the recommended actions.

More information on the Xilinx versioning policy is available at www.xilinx.com.

Project IP Instances
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| Instance Name                                                      | Status                  | Recommendation               | Change    | IP Name            | IP      | New Version           | New        | Original Part        |
|                                                                    |                         |                              | Log       |                    | Version |                       | License    |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_ChannelwiseOp_Batch_0_0               | Up-to-date              | No changes required          | Change    | Channelwiseop_batc | 1.0     | 1.0 (Rev. 2111250721) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_ConvolutionInputGenerator_0_0         | Up-to-date              | No changes required          | Change    | Convolutioninputge | 1.0     | 1.0 (Rev. 2111250733) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_ConvolutionInputGenerator_1_0         | Up-to-date              | No changes required          | Change    | Convolutioninputge | 1.0     | 1.0 (Rev. 2111250729) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_ConvolutionInputGenerator_2_0         | Up-to-date              | No changes required          | Change    | Convolutioninputge | 1.0     | 1.0 (Rev. 2111250724) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_ConvolutionInputGenerator_3_0         | Up-to-date              | No changes required          | Change    | Convolutioninputge | 1.0     | 1.0 (Rev. 2111250721) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_ConvolutionInputGenerator_4_0         | Up-to-date              | No changes required          | Change    | Convolutioninputge | 1.0     | 1.0 (Rev. 2111250721) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_FMPadding_Batch_0_0                   | Up-to-date              | No changes required          | Change    | Fmpadding_batch_9  | 1.0     | 1.0 (Rev. 2111250733) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_FMPadding_Batch_1_0                   | Up-to-date              | No changes required          | Change    | Fmpadding_batch_10 | 1.0     | 1.0 (Rev. 2111250729) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_FMPadding_Batch_2_0                   | Up-to-date              | No changes required          | Change    | Fmpadding_batch_11 | 1.0     | 1.0 (Rev. 2111250725) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_FMPadding_Batch_3_0                   | Up-to-date              | No changes required          | Change    | Fmpadding_batch_12 | 1.0     | 1.0 (Rev. 2111250722) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_LabelSelect_Batch_0_0                 | Up-to-date              | No changes required          | Change    | Labelselect_batch_ | 1.0     | 1.0 (Rev. 2111250721) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_Pool_Batch_0_0                        | Up-to-date              | No changes required          | Change    | Pool_batch_0       | 1.0     | 1.0 (Rev. 2111250721) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_0_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250817) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_1_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250817) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_2_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250817) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_3_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250817) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_4_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250816) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_5_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250816) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingDataWidthConverter_Batch_6_0 | Up-to-date              | No changes required          | Change    | Streamingdatawidth | 1.0     | 1.0 (Rev. 2111250816) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_0_0            | Up-to-date              | No changes required          | Change    | Streamingfclayer_b | 1.0     | 1.0 (Rev. 2111250733) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_0_wstrm_0      | IP definition not found | Add IP definition to catalog | Change    | memstream          | 1.0     | N/A                   | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 5)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_1_0            | Up-to-date              | No changes required          | Change    | Streamingfclayer_b | 1.0     | 1.0 (Rev. 2111250729) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_1_wstrm_0      | IP definition not found | Add IP definition to catalog | Change    | memstream          | 1.0     | N/A                   | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 5)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_2_0            | Up-to-date              | No changes required          | Change    | Streamingfclayer_b | 1.0     | 1.0 (Rev. 2111250724) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_2_wstrm_0      | IP definition not found | Add IP definition to catalog | Change    | memstream          | 1.0     | N/A                   | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 5)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_3_0            | Up-to-date              | No changes required          | Change    | Streamingfclayer_b | 1.0     | 1.0 (Rev. 2111250725) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_3_wstrm_0      | IP definition not found | Add IP definition to catalog | Change    | memstream          | 1.0     | N/A                   | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 5)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_4_0            | Up-to-date              | No changes required          | Change    | Streamingfclayer_b | 1.0     | 1.0 (Rev. 2111250721) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFCLayer_Batch_4_wstrm_0      | IP definition not found | Add IP definition to catalog | Change    | memstream          | 1.0     | N/A                   | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 5)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFIFO_0_0                     | Up-to-date              | No changes required          | Change    | StreamingFIFO_51   | 1.0     | 1.0 (Rev. 2)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFIFO_12_0                    | Up-to-date              | No changes required          | Change    | StreamingFIFO_79   | 1.0     | 1.0 (Rev. 2)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFIFO_3_0                     | Up-to-date              | No changes required          | Change    | StreamingFIFO_56   | 1.0     | 1.0 (Rev. 2)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFIFO_6_0                     | Up-to-date              | No changes required          | Change    | StreamingFIFO_61   | 1.0     | 1.0 (Rev. 2)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFIFO_8_0                     | Up-to-date              | No changes required          | Change    | StreamingFIFO_65   | 1.0     | 1.0 (Rev. 2)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_StreamingFIFO_9_0                     | Up-to-date              | No changes required          | Change    | StreamingFIFO_67   | 1.0     | 1.0 (Rev. 2)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_Vector_Vector_Activate_Batch_0_0      | Up-to-date              | No changes required          | Change    | Vector_vector_acti | 1.0     | 1.0 (Rev. 2111250737) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_Vector_Vector_Activate_Batch_1_0      | Up-to-date              | No changes required          | Change    | Vector_vector_acti | 1.0     | 1.0 (Rev. 2111250732) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_Vector_Vector_Activate_Batch_2_0      | Up-to-date              | No changes required          | Change    | Vector_vector_acti | 1.0     | 1.0 (Rev. 2111250729) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_Vector_Vector_Activate_Batch_3_0      | Up-to-date              | No changes required          | Change    | Vector_vector_acti | 1.0     | 1.0 (Rev. 2111250816) | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              | Log not   |                    | (Rev.   |                       |            |                      |
|                                                                    |                         |                              | available |                    | 2111250 |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_0                                | Up-to-date              | No changes required          |  *(1)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_1                                | Up-to-date              | No changes required          |  *(2)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_2                                | Up-to-date              | No changes required          |  *(3)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_3                                | Up-to-date              | No changes required          |  *(4)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_4                                | Up-to-date              | No changes required          |  *(5)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_5                                | Up-to-date              | No changes required          |  *(6)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
| StreamingDataflowPartition_5_fifo_6                                | Up-to-date              | No changes required          |  *(7)     | AXI4-Stream Data   | 2.0     | 2.0 (Rev. 3)          | Included   | xcu200-fsgd2104-2-e  |
|                                                                    |                         |                              |           | FIFO               | (Rev.   |                       |            |                      |
|                                                                    |                         |                              |           |                    | 3)      |                       |            |                      |
+--------------------------------------------------------------------+-------------------------+------------------------------+-----------+--------------------+---------+-----------------------+------------+----------------------+
*(1) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt
*(2) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt
*(3) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt
*(4) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt
*(5) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt
*(6) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt
*(7) /tools/Xilinx/Vivado/2020.1/data/ip/xilinx/axis_data_fifo_v2_0/doc/axis_data_fifo_v2_0_changelog.txt



How to target a different board/FPGA than the examples?

In the documentation it says you can re-target the examples for any FPGA with enough room. I would like to target a ZCU111 RFSoC so I can insert the IP into a custom design. I believe I need to alter the "build.py" file but I'm not clear on which lines need to be altered and how to specify ZCU111 rather than the default ZCU104. Can you provide guidance?

Thank you

Infer Brevitas CNV model on Non-PYNQ board

Hello,

I have generated a stitched IP using FINN builder of the Brevitas cnv-w2a2 pre-trained model using the notebook under "finn/notebookes/advanced/4_advanced_builder_settings.ipynb", then implemented it on a FPGA target board (NOT PYNQ) which has been connected to communication blocks to read/write to the finn design.

My question is that how should I prepare/feed the input data concerning its folding shape and packaging its inner most dimension in order to obtain a ".dat" file? I got inspired from the data preparation function "custom_step_gen_tb_and_io", that I found in the "finn/tutorials/fpga_flow/build.py" script, but it is for the MNIST classification (tfc-w1a1), but I did not succeed to adapt it for this model (CNV).

Your help would be appreciated!

Residual structure cannot be converted to hls

Hi,I encountered "cycle-free graph violated: partition depends on itself" while running a custom network on finn.I have tried adjusting the streamlining and convert_to_hls steps according to ResNet-50 finn-example, but it still failed.

This is the residual part of the network:

image

Refer to "cnv_end2end_example",after streamline the residual part is as shown in the figure:

image

Refer to the "streamline nonlinear" step in ResNet50 finn-example, as shown in the figure:

image

Then converted to hls, as shown in the figure:

image
When finally using "parent_model = model.transform(CreateDataflowPartition())", it failed because the residual part was not converted successfully.I have tried many ways but nothing works, I hope you can provide some guidance.

Thanks.

2_imagenet_with_cnns.ipynb stuck

Hi FINN community,

When I ran 2_imagenet_with_cnns.ipynb I found out that it stucked when I set batch size other than 1. The program will be hang on obuf_normal = accel.execute(ibuf_normal).

image

Do you have any clue for this?

Thanks,
Lam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.