fifo_depth_optimization flow require ip, not writer, before running
Created by: jmitrevs
Description
FifoDepthOptimization
optimizer calls ModelGraph.write()
, which executes the self._writer_flow
as part of the optimizer, not part of the main flow. Therefore, there is no reason to do the writer flow beforehand, because it is executed specially nevertheless.
Also, concerning the + writer_pass
, I don't think it should be there, because the write belongs in the hls_model.compile()
step, which calls self.write()
anyway, not in the convert_from_keras_model
, which is where the FifoDepthOptimization
step happens. The counterargument is that the stale model would still exist from the input to the FIFO depth optimization, but I would vote more for consistency, with the write happening in the compile step, not beforehand.
UPDATE: We decided the + writer_pass
is good to have to not confuse people, so the second paragraph is just for history. Only the first paragraph is currently in the PR.
Type of change
-
Bug fix (non-breaking change that fixes an issue)
Tests
The main testing would be external to the standard pytests or compilations--basically to make sure that FIFO optimization still works. Do we currently run any FIFO depth optimization tests?
Checklist
-
I have read the guidelines for contributing. -
I have commented my code, particularly in hard-to-understand areas. -
I have made corresponding changes to the documentation. -
My changes generate no new warnings. -
I have added tests that prove my fix is effective or that my feature works.