Open pbk20191 opened 2 months ago
Hi, generally, errors like this can occur because the current automatic folding transformation is not perfect and might produce an illegal configuration where SIMD and PE settings between layers do not match all requirements (e.g. PE of one layer datawidth-convertible to SIMD of next layer).
You could try with a manual folding config or dig deeper how the shape (1,7,7,0,28) comes about. Especially the 0 dimension is very odd.
I have the same issue with automatic (basic). I use the notebook with a custom ONNX file that I use CNV network and generate by Brevitas. I am sure that not to exceed the Pynq-Z2 hw resources.
I wrote this message to just inform you and I'm following the issue.
As you recommend, I'll try it with a custom folding custom configuration.
Edit: I have solved the issue by using a custom folding configuration. You should consider the HW resource usage by estimation step and the folding constraints in the documentation before compiling the stitch IP. @pbk20191
Prerequisites
dev branch: e188b4c50955105717b223862c4e26e4777852ea
Quick summary
High
mvau_wwidth_max
causestep_hw_ipgen
to fail, so only very low value of mvau_wwidth_max is valid for configuration optionDetails
I have my simple mnist cnn model, and it is impossible to build with high performance configuration. I confirmed that it's resource requirement is satisfied, by checking estimation report.
Below is the detail stacktrace
Steps to Reproduce
finally run this inside finn jupyter
Expected behavior
I confirmed that the resource requirement is satisfied, so it should not fail at this step or more detailed error raised
Actual behavior
StreamingDataWidthConverter
'sget_folded_output_shape
fails withValueError: cannot reshape array of size 784 into shape (1,7,7,0,28)
Possible fix
If I provide pretty low value to
mvau_wwidth_max
(like 24) it works without error.Additional context
mnist dataset trained onnx model brevitas_cnn2.zip