-
Notifications
You must be signed in to change notification settings - Fork 462
fifo_depth_optimization flow require ip, not writer, before running #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Another option, maybe better, is to split the fifo depth optimization into two optimizers, and not have the optimizer call write explicitly. Instead, the write can be explicitly scheduled in the flow between the two optimizers. Maybe this was the idea originally. |
Hi, thanks for looking at this. My thoughts:
We don't, but probably should when we can do Vivado-based tests on CERN Gitlab. I do have a test that I can run locally for this. |
I have no problem putting the Splitting into multiple optimizers would make the flow something like: fifo_depth_opt_passes = ['vivado:fifo_depth_optimization_pre'] + writer_pass + \
['vivado:fifo_depth_optimization_post'] + writer_pass and then there would be no need for an out-of-flow |
…vivado_accelarator
I put back the |
@vloncar, I was curious if you have any thoughts about how the FIFO depth optmization starts the writer flow external to the main flow. Should it be updated to just work in a flow (i.e. split the fifo optimizer into two and explicitly schedule the writer within the flow--I have it more explicitly above), or is it fine as is, with the optimizer starting it's flow in the middle of the flow it is part of? The latter is why I created #641, so that if you interrupt a flow you still have current information. |
I think this is a fairly minor big fix: basically making the fifo depth optimization depend on |
I decided to move the discussion about potentially splitting the optimizer to #705, and in this pull request I just fix the requires to depend on the The precommit hooks required that I make more changes to the vivadoaccelator backend, but the real change is the same as in the vivado backend. (I think the backends can both be cleaned up, and path navigation could potentially be made with a context manager, but that's beyond the scope of this PR.) |
Can people look at this? It's a minor change that has been sitting for a while. |
…astmachinelearning#642) * I think fifo_depth_optimization should depend on vivado:ip, not writer * add back writer_passes to fifo depth opt passes, make same change in vivado_accelarator * fix precommit
Description
FifoDepthOptimization
optimizer callsModelGraph.write()
, which executes theself._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 thehls_model.compile()
step, which callsself.write()
anyway, not in theconvert_from_keras_model
, which is where theFifoDepthOptimization
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
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