My Project
Public Member Functions | List of all members
mlir::quant::UniformQuantizedPerAxisValueConverter Class Reference

#include <UniformSupport.h>

Public Member Functions

 UniformQuantizedPerAxisValueConverter (UniformQuantizedPerAxisType uniformType)
 
ElementsAttr convert (Attribute realValue)
 

Detailed Description

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 matche the size of of scales/zeroPoints vectors in the quantization parameters.

Constructor & Destructor Documentation

◆ UniformQuantizedPerAxisValueConverter()

mlir::quant::UniformQuantizedPerAxisValueConverter::UniformQuantizedPerAxisValueConverter ( UniformQuantizedPerAxisType  uniformType)
inlineexplicit

Member Function Documentation

◆ convert()

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.


The documentation for this class was generated from the following files: