Xilinx / finn-base

Open Source Compiler Framework using ONNX as Frontend and IR
https://finn-base.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

Disable casting float64 init to float32 #64

Closed maltanar closed 2 years ago

maltanar commented 2 years ago

Remove the automatic fix_float64=True functionality in ModelWrapper.transform which replaces float64 initializers with float32 ones - it will be an optional argument (default False) passed to the ModelWrapper contstructor instead.

This was a workaround for ONNX models that had invalid nodes according to previous versions of the standard, using two different datatypes for their inputs. This has been relaxed in recent versions of the standard and is no longer an issue for the most part.