-
Notifications
You must be signed in to change notification settings - Fork 0
Description
All requantisation methods have the same structure: requantisation core, then shift, then clamp. The last two steps are the same across all requantisation nodes. Furthermore, in each of the actual implementors, the core is actually deferred to a dedicated function in common/src/quantization/mod.rs. There is obvious room for refactoring.
Independently from that, the core of RequantiseBMMFloat is a mess (of my own creation, from the very early days of the project) in the sense that the node stores the three f32 scales internally and multiplies them as f64s for every requantised value inside the requantisation-core function. Instead, one should directly store the f64 product into the node and pass that (and remove the original scales, as they aren't used).
This can be done in conjunction with #75