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

Resolve fixed-point datatypes for Quant nodes #53

Open maltanar opened 2 years ago

maltanar commented 2 years ago

When querying the output datatype of Quant nodes, the current implementation only supports identifying quantization cases the corespond to integers. Everything else is set to FLOAT32.

In cases where the scale is global and is a negative power of two, we can resolve the datatype as FIXED<> instead. See also relevant discussion: https://github.com/Xilinx/finn-base/pull/52#discussion_r739114381_