SR backend doesn't work with Vitis HLS
bo3z opened this issue · 0 comments
bo3z commented
Prerequisites
Please make sure to check off these prerequisites before submitting a bug report.
- 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.
- Check that the issue hasn't already been reported, by checking the currently open issues.
- If there are steps to reproduce the problem, make sure to write them down below.
- If relevant, please include the hls4ml project files, which were created directly before and/or after the bug.
Quick summary
When synthesising SR with Vitis HLS (2023), co-sim validation fails. The reason for this is that the look-up table constructor, which populates LUT stored in BRAM, is invoked correctly in C++ but not in HLS synthesis, leading to very small/random LUTs that are not sufficient and thus the difference between C++ and HLS simualation.
Possible fix
This is likely an issue in Vitis HLS and not hls4ml. I haven't tested with Vivado HLS as I do not have access to it. Possible fix is to explicitly write-out the LUTs (like it's done with weight arrays), avoiding the need for a constructor.