FINN's custom DataType support was a not-quite-exhaustive enumeration of possible values, which limits the flexibility of what the compiler can do. This PR refactors the datatype system and provides a few new features:
Important: DataType.<name> is no longer supported and must be replaced with DataType["<name>"]
DataTypes are now dynamically resolved based on unique strings that act as dataype identifiers such as DataType["INT37"] or DataType["TERNARY"], permitting arbitrary precision.
Fixed point types are supported, e.g. DataType["FIXED<9,6>"] corresponds to a 9-bit fixed-point type with 6 integer bits and 3 fractional bits.
Fixes to serialization / packing functions for fixed-point and float types.
FINN's custom
DataType
support was a not-quite-exhaustive enumeration of possible values, which limits the flexibility of what the compiler can do. This PR refactors the datatype system and provides a few new features:DataType.<name>
is no longer supported and must be replaced withDataType["<name>"]
DataType
s are now dynamically resolved based on unique strings that act as dataype identifiers such asDataType["INT37"]
orDataType["TERNARY"]
, permitting arbitrary precision.DataType["FIXED<9,6>"]
corresponds to a 9-bit fixed-point type with 6 integer bits and 3 fractional bits.