Closed phixerino closed 1 month ago
Okay I figured it out. The error happens because first I tried to export it to QCDQ which fails, and then when I try to export it to QONNX it also fails for some reason. I don't know why this happens, because the error comes from brevitas/export/onnx/standard/qcdq/handler.py
even though I call export_qonnx
. But when I skip the export to QCDQ, then the export to QONNX works.
Hi, I'm trying to convert QONNX model to FINN-ONNX in FINN v0.10 with
ConvertQONNXtoFINN()
and it's giving meValueError: The Trunc node must have the rounding_mode set to 'FLOOR'.
. This happens during transformation ofAvgPool -> Mul -> Trunc
toQuantAvgPool2d
. This is because I have setfloat_to_int_impl_type='ROUND'
in BrevitasTruncAvgPool2d
layer. This worked for me before with Brevitas v0.9, where I exported directly to FINN-ONNX and then imported in FINN v0.9. But this is not possible now with the export to FINN-ONNX deprecated.So I tried to change
float_to_int_impl_type='FLOOR'
, but with that the export to QONNX withexport_onnx_qonnx()
gives meAssertionError: Only round to nearest even supported
.Also I see that in the ResNet example for PYNQ, it's also set
float_to_int_impl_type='FLOOR'
by default. So how can that model be exported for FINN?