Xilinx / finn

Dataflow compiler for QNN inference on FPGAs
https://xilinx.github.io/finn
BSD 3-Clause "New" or "Revised" License
681 stars 218 forks source link

out of the range for parameter 'FIFO depth(FIFO_DEPTH)' #1100

Open Ba1tu3han opened 3 weeks ago

Ba1tu3han commented 3 weeks ago

Prerequisites

Please make sure to check off these prerequisites before submitting a bug report.

Quick summary

I trained a model with 1W1A and 2W1A quantization then I compiled 1W1A for Pynq-Z2 by FINN however I have encountered a FIFO error for 2W1A. Additionally, I use seperated custom configuration files.

Could you help me about how to set or check FIFO ?

image

fpjentzsch commented 3 weeks ago

There is a builder config setting to split large FIFOs into smaller ones for this scenario: https://github.com/Xilinx/finn/blob/9f0fad5717ae652eaa324583e957161890964555/src/finn/builder/build_dataflow_config.py#L268

However, I doubt that you should need FIFOs this deep for one of these small models. Do you let FINN determine the FIFO sizing automatically in "step_set_fifo_depths"?

Ba1tu3han commented 1 day ago

In my custom configuration file, I don't determine anything about FIFO. Is it about being a large number of not being power of two? Should I assign them in the config file? I want to everything in compiling step as automatic.

This is my building steps.

The model is original CNV model and trained it by Brevitas.

Custom Config File: custom_folding_config_2W1A.json

image