fastmachinelearning / hls4ml

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

Fix config structure name in pragma for SeparableConv1D #884

Closed qberthet closed 11 months ago

qberthet commented 11 months ago

Description

Simple fix for #883

closes #883

Type of change

For a new feature or function, please create an issue first to discuss it with us before submitting a pull request.

Note: Please delete options that are not relevant.

Tests

Tested with example code provided in bug report #883 : Fail before applying this commit, works afterward.

Checklist

jmitrevs commented 11 months ago

Is it possible to add a pytest to show that there is a problem and that this fixes it? We don't do synthesis in pytests but we do compile the HLS code.

qberthet commented 11 months ago

I'll try to add this later today.

qberthet commented 11 months ago

@jmitrevs : I've added a test, but the problem only appear during CSynth, not CSim, so not sure if that will be ok (requires vivado). Also had to catch the return code of vivado_hls command to raise exception and make the test fail. I've duplicated sepconv2d test for sepconv1d and then added a test for the build step. Let me know if you prefer that I remove the tree first commits to only have the fix.

@vloncar : your fix obviously does the job. Thanks!

qberthet commented 11 months ago

And I just realize that my test is not setting the output folder correctly. Let me know if you want to keep these tests before I fix it.