Skip to content

Remove or generalise RequantiseBMMNode #64

@Antonio95

Description

@Antonio95

Right now, this node lives in a very strange space where it is partially generic (on ST, the type of its zero point) but not fully (scales are hardcoded to QScaleType, which is an alias for f32). This is the reason why the trait InnerType mandates methods to convert the implementor to and from f32.

The main reason we would like to keep this node is to test its compatibility with TF Lite inference, compared to other requantisation nodes (reference, single-round). A first attempt to make the node generic on the floating-point type and remove the hardcoded QScaleType was made here. However, that approach led to a floating-point-type generic FT spreading its way up to the model, which is less than desirable - especially as it is only required by this minor-importance, inference-only node. We should come up with a better approach. For comparison, we have a quite clean fully-generic implementation of the reference requantisation nodes, which was rather challenging to code. Even in that case, only the trait methods are generic: the constructor itself is only defined for the standard type tuple (i8, i32, f32, f64).

If nothing works and the hardcoded types and mixed-genericity approach make uns uncomfortable (which they do me), we can consider removing the node type altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions