You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hls4ml's fifo optimization overestimates the size of my CNN's first layer output fifo.
Details
I am synthesizing a small CNN and using hls4ml's fifo optimization. The size of the output stream (layer28_out) of the first layer (zp2d_q_conv2d) is 6500 by default. However the FIFO optimization greatly overestimates this depth at 12238, almost double. I am using hls4ml 0.8.1 from pip.
install kernel in jupyteripython kernel install --user --name=fifo_opt_issue.
run notebook and wait for FIFO optimization to complete.
See myproject.cpp, layer28_out is set to 12238.
Expected behavior
I would expect the layer depth to be equal to+1 or lower than the default hls4ml depth of 6500, since this is the full output size of the previous layer.
Actual behavior
The layer depth is set to almost double the size that should be required to accommodate the activations.
Optional
Possible fix
I understand the optimization reads the FIFO's internal usedw signal in vivado co-sim. Perhaps this is an issue with Xilinx software.
Additional context
I am using the extensions API to implement a custom layer. I am not sure if that might have any effect.
I can set the problematic stream's depth to 6500 post-fifo opt and the design runs on hardware without issue.
The text was updated successfully, but these errors were encountered:
Quick summary
hls4ml's fifo optimization overestimates the size of my CNN's first layer output fifo.
Details
I am synthesizing a small CNN and using hls4ml's fifo optimization. The size of the output stream (
layer28_out
) of the first layer (zp2d_q_conv2d
) is 6500 by default. However the FIFO optimization greatly overestimates this depth at 12238, almost double. I am using hls4ml 0.8.1 from pip.Steps to Reproduce
files.zip
files.zip
conda env create -f environment.yml
.conda activate fifo_opt_issue
.ipython kernel install --user --name=fifo_opt_issue
.myproject.cpp
,layer28_out
is set to 12238.Expected behavior
I would expect the layer depth to be equal to+1 or lower than the default hls4ml depth of 6500, since this is the full output size of the previous layer.
Actual behavior
The layer depth is set to almost double the size that should be required to accommodate the activations.
Optional
Possible fix
I understand the optimization reads the FIFO's internal
usedw
signal in vivado co-sim. Perhaps this is an issue with Xilinx software.Additional context
I am using the extensions API to implement a custom layer. I am not sure if that might have any effect.
I can set the problematic stream's depth to 6500 post-fifo opt and the design runs on hardware without issue.
The text was updated successfully, but these errors were encountered: