The FifoDepthOptimization optimizer calls ModelGraph.write(), which executes the self._writer_flow as part of the optimizer, outside the main flow being executed. The main flow continues when the optimizer ends.
Potentially it would be safer to implement the fifo depth optimization as a flow, without an external flow interrupting it. This external flow calls many of the same optimizers a second time, which has more potential for problems. A problems discovered with this setup was fixed with #641, and it appears to be working, so this change is fairly low priority, unless we run into another problem.
Parts of hls4ml being affected
The FifoDepthOptimization would likely have to be split into multiple optimizers and new flows would have to be defined.
Details
The
FifoDepthOptimization
optimizer callsModelGraph.write()
, which executes theself._writer_flow
as part of the optimizer, outside the main flow being executed. The main flow continues when the optimizer ends.Potentially it would be safer to implement the fifo depth optimization as a flow, without an external flow interrupting it. This external flow calls many of the same optimizers a second time, which has more potential for problems. A problems discovered with this setup was fixed with #641, and it appears to be working, so this change is fairly low priority, unless we run into another problem.
Parts of hls4ml being affected
The
FifoDepthOptimization
would likely have to be split into multiple optimizers and new flows would have to be defined.