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

Fix RoundAndClipThresholds Transformation #1030

Open iksnagreb opened 3 months ago

iksnagreb commented 3 months ago

See https://github.com/Xilinx/finn/issues/978 for some explanation of what it wrong with this transformation. See https://github.com/Xilinx/finn/issues/875 for more context.

Closes #978

iksnagreb commented 2 months ago

Hm, while I can successfully run the mobilenet and the cybersecurity end2end tests, the bnn-pynq tests fail immediately at the export step, this seems not to be my fault (at least it is unrelated to this PR, maybe I am missing something else or messed up some dependency?):

tests/end2end/test_end2end_bnn_pynq.py, line 459
      def test_export(self, topology, wbits, abits, board):
E       fixture 'topology' not found

Any hints on this error?

Regarding building the finn-examples: It seems these have not been updated to the recent finn release yet? Will this happen in the near future or should we skip this test for now?

auphelia commented 2 months ago

Hi @iksnagreb,

Yes, we restructured the bnn pynq tests and they are not callable with pytest -k bnn_pynq anymore. You could run one of the markers, e.g pytest -m sanity_bnn. If you like, I can take it from here and do the testing (apart from your transformer use case). We are currently in the process of updating the finn-examples to the new flow.

iksnagreb commented 2 months ago

Ok, then I will skip doing the end2end and finn-examples tests now and focus on our transformer model. My dummy model already built successfully, but I would like to test the "real" model as well, just to be sure. I will also mark this as ready for review now.

auphelia commented 2 months ago

Thanks @iksnagreb !