|
MLIR 22.0.0git
|
An utility class to quantize an attribute by the per-axis quantization parameters. More...
#include "mlir/Dialect/Quant/Utils/UniformSupport.h"
Public Member Functions | |
| UniformQuantizedPerAxisValueConverter (UniformQuantizedPerAxisType uniformType) | |
| ElementsAttr | convert (Attribute realValue) |
| Quantize an Attribute by the quantization parameters. | |
An utility class to quantize an attribute by the per-axis quantization parameters.
The size of the quantization dim in the converted elements attribute should match the size of scales/zeroPoints vectors in the quantization parameters.
Definition at line 176 of file UniformSupport.h.
|
inlineexplicit |
Definition at line 178 of file UniformSupport.h.
| ElementsAttr UniformQuantizedPerAxisValueConverter::convert | ( | Attribute | realValue | ) |
Quantize an Attribute by the quantization parameters.
Return nullptr if the conversion fails or the input array isn't an ElementsAttr.
Definition at line 53 of file UniformSupport.cpp.
References convert().
Referenced by convert().