Conv layer changes other layers to Resource unless specifically set
Created by: jmitrevs
Quick summary
If you have a conv layer in your network, setting the Strategy at the top level is overwritten after the first Conv layer. If you want to have all the nodes be implemented with the Latency strategy,
hls_config["Model"]["Strategy"] = "Latency"
is not enough. You have to have:
for layer in hls_config['LayerName'].keys():
hls_config['LayerName'][layer]['Strategy'] = "Latency"
Details
I believe this is because Conv requires the dataflow style at the top level. The Conv layer changes the setup to dataflow but inadvertently changes all the layers not explicitly configured to "Resource". The cleanest solution may be to split the dataflow style from layer Resource/Latency strategies.
Steps to Reproduce
A simple setup is to look at test_binary_cnn.py
(from #749) and change the strategy to Latency. You can see that only the first CNN is Latency, the others are Resource, in the parameters.h.
Optional
Possible fix
The cleanest solution may be to split the dataflow style from layer Resource/Latency strategies.