fastmachinelearning / hls4ml

Machine learning on FPGAs using HLS
https://fastmachinelearning.org/hls4ml
Apache License 2.0
1.17k stars 388 forks source link

get_valid_reuse_factors returns some invalid RFs for the im2col conv impementations #817

Open jmitrevs opened 1 year ago

jmitrevs commented 1 year ago

Prerequisites

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

Quick summary

The parallel resource conv implementations (at least for Vivado and Vitis) require RF <= FILT_HEIGHT FILT_WIDTH N_CHAN, but get_valid_reuse_factors allows for larger reuse factors.

Steps to Reproduce

One can try setting a large RF, and the project is created with the large RF, but then this triggers an assertion error.

Expected behavior

The RF should be set to the maximum legal value