hls4ml
hls4ml copied to clipboard
get_valid_reuse_factors returns some invalid RFs for the im2col conv impementations
Prerequisites
Please make sure to check off these prerequisites before submitting a bug report.
- [x] Test that the bug appears on the current version of the master branch. Make sure to include the commit hash of the commit you checked out.
- [x] Check that the issue hasn't already been reported, by checking the currently open issues.
- [x] If there are steps to reproduce the problem, make sure to write them down below.
- [x] If relevant, please include the hls4ml project files, which were created directly before and/or after the bug.
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