MLIR 22.0.0git
Quant.cpp File Reference

Go to the source code of this file.

Functions

bool mlirTypeIsAQuantizedType (MlirType type)
 Returns true if the given type is a quantization dialect type.
unsigned mlirQuantizedTypeGetSignedFlag ()
 Returns the bit flag used to indicate signedness of a quantized type.
int64_t mlirQuantizedTypeGetDefaultMinimumForInteger (bool isSigned, unsigned integralWidth)
 Returns the minimum possible value stored by a quantized type.
int64_t mlirQuantizedTypeGetDefaultMaximumForInteger (bool isSigned, unsigned integralWidth)
 Returns the maximum possible value stored by a quantized type.
MlirType mlirQuantizedTypeGetExpressedType (MlirType type)
 Gets the original type approximated by the given quantized type.
unsigned mlirQuantizedTypeGetFlags (MlirType type)
 Gets the flags associated with the given quantized type.
bool mlirQuantizedTypeIsSigned (MlirType type)
 Returns true if the given type is signed, false otherwise.
MlirType mlirQuantizedTypeGetStorageType (MlirType type)
 Returns the underlying type used to store the values.
int64_t mlirQuantizedTypeGetStorageTypeMin (MlirType type)
 Returns the minimum value that the storage type of the given quantized type can take.
int64_t mlirQuantizedTypeGetStorageTypeMax (MlirType type)
 Returns the maximum value that the storage type of the given quantized type can take.
unsigned mlirQuantizedTypeGetStorageTypeIntegralWidth (MlirType type)
 Returns the integral bitwidth that the storage type of the given quantized type can represent exactly.
bool mlirQuantizedTypeIsCompatibleExpressedType (MlirType type, MlirType candidate)
 Returns true if the candidate type is compatible with the given quantized type.
MlirType mlirQuantizedTypeGetQuantizedElementType (MlirType type)
 Returns the element type of the given quantized type as another quantized type.
MlirType mlirQuantizedTypeCastFromStorageType (MlirType type, MlirType candidate)
 Casts from a type based on the storage type of the given type to a corresponding type based on the given type.
MlirType mlirQuantizedTypeCastToStorageType (MlirType type)
 Casts from a type based on a quantized type to a corresponding typed based on the storage type.
MlirType mlirQuantizedTypeCastFromExpressedType (MlirType type, MlirType candidate)
 Casts from a type based on the expressed type of the given type to a corresponding type based on the given type.
MlirType mlirQuantizedTypeCastToExpressedType (MlirType type)
 Casts from a type based on a quantized type to a corresponding typed based on the expressed type.
MlirType mlirQuantizedTypeCastExpressedToStorageType (MlirType type, MlirType candidate)
 Casts from a type based on the expressed type of the given quantized type to equivalent type based on storage type of the same quantized type.
bool mlirTypeIsAAnyQuantizedType (MlirType type)
 Returns true if the given type is an AnyQuantizedType.
MlirTypeID mlirAnyQuantizedTypeGetTypeID (void)
MlirType mlirAnyQuantizedTypeGet (unsigned flags, MlirType storageType, MlirType expressedType, int64_t storageTypeMin, int64_t storageTypeMax)
 Creates an instance of AnyQuantizedType with the given parameters in the same context as storageType and returns it.
MlirStringRef mlirAnyQuantizedTypeGetName (void)
bool mlirTypeIsAUniformQuantizedType (MlirType type)
 Returns true if the given type is a UniformQuantizedType.
MlirTypeID mlirUniformQuantizedTypeGetTypeID (void)
MlirType mlirUniformQuantizedTypeGet (unsigned flags, MlirType storageType, MlirType expressedType, double scale, int64_t zeroPoint, int64_t storageTypeMin, int64_t storageTypeMax)
 Creates an instance of UniformQuantizedType with the given parameters in the same context as storageType and returns it.
MlirStringRef mlirUniformQuantizedTypeGetName (void)
double mlirUniformQuantizedTypeGetScale (MlirType type)
 Returns the scale of the given uniform quantized type.
int64_t mlirUniformQuantizedTypeGetZeroPoint (MlirType type)
 Returns the zero point of the given uniform quantized type.
bool mlirUniformQuantizedTypeIsFixedPoint (MlirType type)
 Returns true if the given uniform quantized type is fixed-point.
bool mlirTypeIsAUniformQuantizedPerAxisType (MlirType type)
 Returns true if the given type is a UniformQuantizedPerAxisType.
MlirTypeID mlirUniformQuantizedPerAxisTypeGetTypeID (void)
MlirType mlirUniformQuantizedPerAxisTypeGet (unsigned flags, MlirType storageType, MlirType expressedType, intptr_t nDims, double *scales, int64_t *zeroPoints, int32_t quantizedDimension, int64_t storageTypeMin, int64_t storageTypeMax)
 Creates an instance of UniformQuantizedPerAxisType with the given parameters in the same context as storageType and returns it.
MlirStringRef mlirUniformQuantizedPerAxisTypeGetName (void)
intptr_t mlirUniformQuantizedPerAxisTypeGetNumDims (MlirType type)
 Returns the number of axes in the given quantized per-axis type.
double mlirUniformQuantizedPerAxisTypeGetScale (MlirType type, intptr_t pos)
 Returns pos-th scale of the given quantized per-axis type.
int64_t mlirUniformQuantizedPerAxisTypeGetZeroPoint (MlirType type, intptr_t pos)
 Returns pos-th zero point of the given quantized per-axis type.
int32_t mlirUniformQuantizedPerAxisTypeGetQuantizedDimension (MlirType type)
 Returns the index of the quantized dimension in the given quantized per-axis type.
bool mlirUniformQuantizedPerAxisTypeIsFixedPoint (MlirType type)
 Returns true if the given uniform quantized per-axis type is fixed-point.
bool mlirTypeIsAUniformQuantizedSubChannelType (MlirType type)
 Returns true if the given type is a UniformQuantizedSubChannel.
MlirTypeID mlirUniformQuantizedSubChannelTypeGetTypeID (void)
MlirType mlirUniformQuantizedSubChannelTypeGet (unsigned flags, MlirType storageType, MlirType expressedType, MlirAttribute scalesAttr, MlirAttribute zeroPointsAttr, intptr_t nDims, int32_t *quantizedDimensions, int64_t *blockSizes, int64_t storageTypeMin, int64_t storageTypeMax)
 Creates a UniformQuantizedSubChannelType with the given parameters.
MlirStringRef mlirUniformQuantizedSubChannelTypeGetName (void)
intptr_t mlirUniformQuantizedSubChannelTypeGetNumBlockSizes (MlirType type)
 Returns the number of block sizes provided in type.
int32_t mlirUniformQuantizedSubChannelTypeGetQuantizedDimension (MlirType type, intptr_t pos)
 Returns the quantized dimension at the given position.
int64_t mlirUniformQuantizedSubChannelTypeGetBlockSize (MlirType type, intptr_t pos)
 Returns the block size at the given position.
MlirAttribute mlirUniformQuantizedSubChannelTypeGetScales (MlirType type)
 Returns the scales of the quantized type.
MlirAttribute mlirUniformQuantizedSubChannelTypeGetZeroPoints (MlirType type)
 Returns the zero-points of the quantized type.
bool mlirTypeIsACalibratedQuantizedType (MlirType type)
 Returns true if the given type is a CalibratedQuantizedType.
MlirTypeID mlirCalibratedQuantizedTypeGetTypeID (void)
MlirType mlirCalibratedQuantizedTypeGet (MlirType expressedType, double min, double max)
 Creates an instance of CalibratedQuantizedType with the given parameters in the same context as expressedType and returns it.
MlirStringRef mlirCalibratedQuantizedTypeGetName (void)
double mlirCalibratedQuantizedTypeGetMin (MlirType type)
 Returns the min value of the given calibrated quantized type.
double mlirCalibratedQuantizedTypeGetMax (MlirType type)
 Returns the max value of the given calibrated quantized type.

Function Documentation

◆ mlirAnyQuantizedTypeGet()

MlirType mlirAnyQuantizedTypeGet ( unsigned flags,
MlirType storageType,
MlirType expressedType,
int64_t storageTypeMin,
int64_t storageTypeMax )

Creates an instance of AnyQuantizedType with the given parameters in the same context as storageType and returns it.

The instance is owned by the context.

Definition at line 120 of file Quant.cpp.

References mlir::quant::AnyQuantizedType::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::AnyQuantizedType::bindDerived().

◆ mlirAnyQuantizedTypeGetName()

MlirStringRef mlirAnyQuantizedTypeGetName ( void )

Definition at line 128 of file Quant.cpp.

References mlir::quant::AnyQuantizedType::name, and wrap().

◆ mlirAnyQuantizedTypeGetTypeID()

MlirTypeID mlirAnyQuantizedTypeGetTypeID ( void )

◆ mlirCalibratedQuantizedTypeGet()

MlirType mlirCalibratedQuantizedTypeGet ( MlirType expressedType,
double min,
double max )

Creates an instance of CalibratedQuantizedType with the given parameters in the same context as expressedType and returns it.

The instance is owned by the context.

Definition at line 297 of file Quant.cpp.

References mlir::quant::CalibratedQuantizedType::get(), max(), min(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::CalibratedQuantizedType::bindDerived().

◆ mlirCalibratedQuantizedTypeGetMax()

double mlirCalibratedQuantizedTypeGetMax ( MlirType type)

Returns the max value of the given calibrated quantized type.

Definition at line 311 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::CalibratedQuantizedType::bindDerived().

◆ mlirCalibratedQuantizedTypeGetMin()

double mlirCalibratedQuantizedTypeGetMin ( MlirType type)

Returns the min value of the given calibrated quantized type.

Definition at line 307 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::CalibratedQuantizedType::bindDerived().

◆ mlirCalibratedQuantizedTypeGetName()

MlirStringRef mlirCalibratedQuantizedTypeGetName ( void )

Definition at line 303 of file Quant.cpp.

References mlir::quant::CalibratedQuantizedType::name, and wrap().

◆ mlirCalibratedQuantizedTypeGetTypeID()

MlirTypeID mlirCalibratedQuantizedTypeGetTypeID ( void )

◆ mlirQuantizedTypeCastExpressedToStorageType()

MlirType mlirQuantizedTypeCastExpressedToStorageType ( MlirType type,
MlirType candidate )

Casts from a type based on the expressed type of the given quantized type to equivalent type based on storage type of the same quantized type.

Definition at line 102 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeCastFromExpressedType()

MlirType mlirQuantizedTypeCastFromExpressedType ( MlirType type,
MlirType candidate )

Casts from a type based on the expressed type of the given type to a corresponding type based on the given type.

Returns a null type if the cast is not valid.

Definition at line 92 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeCastFromStorageType()

MlirType mlirQuantizedTypeCastFromStorageType ( MlirType type,
MlirType candidate )

Casts from a type based on the storage type of the given type to a corresponding type based on the given type.

Returns a null type if the cast is not valid.

Definition at line 81 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeCastToExpressedType()

MlirType mlirQuantizedTypeCastToExpressedType ( MlirType type)

Casts from a type based on a quantized type to a corresponding typed based on the expressed type.

Returns a null type if the cast is not valid.

Definition at line 98 of file Quant.cpp.

References mlir::quant::QuantizedType::castToExpressedType(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeCastToStorageType()

MlirType mlirQuantizedTypeCastToStorageType ( MlirType type)

Casts from a type based on a quantized type to a corresponding typed based on the storage type.

Returns a null type if the cast is not valid.

Definition at line 87 of file Quant.cpp.

References mlir::quant::QuantizedType::castToStorageType(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetDefaultMaximumForInteger()

int64_t mlirQuantizedTypeGetDefaultMaximumForInteger ( bool isSigned,
unsigned integralWidth )

Returns the maximum possible value stored by a quantized type.

Definition at line 37 of file Quant.cpp.

References mlir::quant::QuantizedType::getDefaultMaximumForInteger().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetDefaultMinimumForInteger()

int64_t mlirQuantizedTypeGetDefaultMinimumForInteger ( bool isSigned,
unsigned integralWidth )

Returns the minimum possible value stored by a quantized type.

Definition at line 31 of file Quant.cpp.

References mlir::quant::QuantizedType::getDefaultMinimumForInteger().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetExpressedType()

MlirType mlirQuantizedTypeGetExpressedType ( MlirType type)

Gets the original type approximated by the given quantized type.

Definition at line 43 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetFlags()

unsigned mlirQuantizedTypeGetFlags ( MlirType type)

Gets the flags associated with the given quantized type.

Definition at line 47 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetQuantizedElementType()

MlirType mlirQuantizedTypeGetQuantizedElementType ( MlirType type)

Returns the element type of the given quantized type as another quantized type.

Definition at line 77 of file Quant.cpp.

References mlir::quant::QuantizedType::getQuantizedElementType(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetSignedFlag()

unsigned mlirQuantizedTypeGetSignedFlag ( void )

Returns the bit flag used to indicate signedness of a quantized type.

Definition at line 27 of file Quant.cpp.

References mlir::quant::QuantizationFlags::Signed.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::populateDialectQuantSubmodule().

◆ mlirQuantizedTypeGetStorageType()

MlirType mlirQuantizedTypeGetStorageType ( MlirType type)

Returns the underlying type used to store the values.

Definition at line 55 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetStorageTypeIntegralWidth()

unsigned mlirQuantizedTypeGetStorageTypeIntegralWidth ( MlirType type)

Returns the integral bitwidth that the storage type of the given quantized type can represent exactly.

Definition at line 67 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetStorageTypeMax()

int64_t mlirQuantizedTypeGetStorageTypeMax ( MlirType type)

Returns the maximum value that the storage type of the given quantized type can take.

Definition at line 63 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeGetStorageTypeMin()

int64_t mlirQuantizedTypeGetStorageTypeMin ( MlirType type)

Returns the minimum value that the storage type of the given quantized type can take.

Definition at line 59 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeIsCompatibleExpressedType()

bool mlirQuantizedTypeIsCompatibleExpressedType ( MlirType type,
MlirType candidate )

Returns true if the candidate type is compatible with the given quantized type.

Definition at line 71 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirQuantizedTypeIsSigned()

bool mlirQuantizedTypeIsSigned ( MlirType type)

Returns true if the given type is signed, false otherwise.

Definition at line 51 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::QuantizedType::bindDerived().

◆ mlirTypeIsAAnyQuantizedType()

bool mlirTypeIsAAnyQuantizedType ( MlirType type)

Returns true if the given type is an AnyQuantizedType.

Definition at line 112 of file Quant.cpp.

References unwrap().

◆ mlirTypeIsACalibratedQuantizedType()

bool mlirTypeIsACalibratedQuantizedType ( MlirType type)

Returns true if the given type is a CalibratedQuantizedType.

Definition at line 289 of file Quant.cpp.

References unwrap().

◆ mlirTypeIsAQuantizedType()

bool mlirTypeIsAQuantizedType ( MlirType type)

Returns true if the given type is a quantization dialect type.

Definition at line 23 of file Quant.cpp.

References mlirTypeIsAQuantizedType(), and unwrap().

Referenced by mlirTypeIsAQuantizedType().

◆ mlirTypeIsAUniformQuantizedPerAxisType()

bool mlirTypeIsAUniformQuantizedPerAxisType ( MlirType type)

Returns true if the given type is a UniformQuantizedPerAxisType.

Definition at line 173 of file Quant.cpp.

References unwrap().

◆ mlirTypeIsAUniformQuantizedSubChannelType()

bool mlirTypeIsAUniformQuantizedSubChannelType ( MlirType type)

Returns true if the given type is a UniformQuantizedSubChannel.

Definition at line 226 of file Quant.cpp.

References unwrap().

◆ mlirTypeIsAUniformQuantizedType()

bool mlirTypeIsAUniformQuantizedType ( MlirType type)

Returns true if the given type is a UniformQuantizedType.

Definition at line 136 of file Quant.cpp.

References unwrap().

◆ mlirUniformQuantizedPerAxisTypeGet()

MlirType mlirUniformQuantizedPerAxisTypeGet ( unsigned flags,
MlirType storageType,
MlirType expressedType,
intptr_t nDims,
double * scales,
int64_t * zeroPoints,
int32_t quantizedDimension,
int64_t storageTypeMin,
int64_t storageTypeMax )

Creates an instance of UniformQuantizedPerAxisType with the given parameters in the same context as storageType and returns it.

scales and zeroPoints point to nDims number of elements. The instance is owned by the context.

Definition at line 181 of file Quant.cpp.

References mlir::quant::UniformQuantizedPerAxisType::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedPerAxisType::bindDerived().

◆ mlirUniformQuantizedPerAxisTypeGetName()

MlirStringRef mlirUniformQuantizedPerAxisTypeGetName ( void )

Definition at line 192 of file Quant.cpp.

References mlir::quant::UniformQuantizedPerAxisType::name, and wrap().

◆ mlirUniformQuantizedPerAxisTypeGetNumDims()

intptr_t mlirUniformQuantizedPerAxisTypeGetNumDims ( MlirType type)

Returns the number of axes in the given quantized per-axis type.

Definition at line 196 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedPerAxisType::bindDerived().

◆ mlirUniformQuantizedPerAxisTypeGetQuantizedDimension()

int32_t mlirUniformQuantizedPerAxisTypeGetQuantizedDimension ( MlirType type)

Returns the index of the quantized dimension in the given quantized per-axis type.

Definition at line 213 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedPerAxisType::bindDerived().

◆ mlirUniformQuantizedPerAxisTypeGetScale()

double mlirUniformQuantizedPerAxisTypeGetScale ( MlirType type,
intptr_t pos )

Returns pos-th scale of the given quantized per-axis type.

Definition at line 202 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedPerAxisType::bindDerived().

◆ mlirUniformQuantizedPerAxisTypeGetTypeID()

MlirTypeID mlirUniformQuantizedPerAxisTypeGetTypeID ( void )

◆ mlirUniformQuantizedPerAxisTypeGetZeroPoint()

int64_t mlirUniformQuantizedPerAxisTypeGetZeroPoint ( MlirType type,
intptr_t pos )

Returns pos-th zero point of the given quantized per-axis type.

Definition at line 207 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedPerAxisType::bindDerived().

◆ mlirUniformQuantizedPerAxisTypeIsFixedPoint()

bool mlirUniformQuantizedPerAxisTypeIsFixedPoint ( MlirType type)

Returns true if the given uniform quantized per-axis type is fixed-point.

Definition at line 218 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedPerAxisType::bindDerived().

◆ mlirUniformQuantizedSubChannelTypeGet()

MlirType mlirUniformQuantizedSubChannelTypeGet ( unsigned flags,
MlirType storageType,
MlirType expressedType,
MlirAttribute scalesAttr,
MlirAttribute zeroPointsAttr,
intptr_t blockSizeInfoLength,
int32_t * quantizedDimensions,
int64_t * blockSizes,
int64_t storageTypeMin,
int64_t storageTypeMax )

Creates a UniformQuantizedSubChannelType with the given parameters.

The type is owned by the context. scalesAttr and zeroPointsAttr must be DenseElementsAttrs. quantizedDimensions and blockSizes point to blockSizeInfoLength number of elements, describing respectively the quantization axis and corresponding block size.

Definition at line 234 of file Quant.cpp.

References mlir::quant::UniformQuantizedSubChannelType::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedSubChannelType::bindDerived().

◆ mlirUniformQuantizedSubChannelTypeGetBlockSize()

int64_t mlirUniformQuantizedSubChannelTypeGetBlockSize ( MlirType type,
intptr_t pos )

Returns the block size at the given position.

Definition at line 269 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedSubChannelType::bindDerived().

◆ mlirUniformQuantizedSubChannelTypeGetName()

MlirStringRef mlirUniformQuantizedSubChannelTypeGetName ( void )

Definition at line 253 of file Quant.cpp.

References mlir::quant::UniformQuantizedSubChannelType::name, and wrap().

◆ mlirUniformQuantizedSubChannelTypeGetNumBlockSizes()

intptr_t mlirUniformQuantizedSubChannelTypeGetNumBlockSizes ( MlirType type)

Returns the number of block sizes provided in type.

Definition at line 257 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedSubChannelType::bindDerived().

◆ mlirUniformQuantizedSubChannelTypeGetQuantizedDimension()

int32_t mlirUniformQuantizedSubChannelTypeGetQuantizedDimension ( MlirType type,
intptr_t pos )

Returns the quantized dimension at the given position.

Definition at line 263 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedSubChannelType::bindDerived().

◆ mlirUniformQuantizedSubChannelTypeGetScales()

MlirAttribute mlirUniformQuantizedSubChannelTypeGetScales ( MlirType type)

Returns the scales of the quantized type.

Definition at line 275 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedSubChannelType::bindDerived().

◆ mlirUniformQuantizedSubChannelTypeGetTypeID()

MlirTypeID mlirUniformQuantizedSubChannelTypeGetTypeID ( void )

◆ mlirUniformQuantizedSubChannelTypeGetZeroPoints()

MlirAttribute mlirUniformQuantizedSubChannelTypeGetZeroPoints ( MlirType type)

Returns the zero-points of the quantized type.

Definition at line 280 of file Quant.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedSubChannelType::bindDerived().

◆ mlirUniformQuantizedTypeGet()

MlirType mlirUniformQuantizedTypeGet ( unsigned flags,
MlirType storageType,
MlirType expressedType,
double scale,
int64_t zeroPoint,
int64_t storageTypeMin,
int64_t storageTypeMax )

Creates an instance of UniformQuantizedType with the given parameters in the same context as storageType and returns it.

The instance is owned by the context.

Definition at line 144 of file Quant.cpp.

References mlir::quant::UniformQuantizedType::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedType::bindDerived().

◆ mlirUniformQuantizedTypeGetName()

MlirStringRef mlirUniformQuantizedTypeGetName ( void )

Definition at line 153 of file Quant.cpp.

References mlir::quant::UniformQuantizedType::name, and wrap().

◆ mlirUniformQuantizedTypeGetScale()

double mlirUniformQuantizedTypeGetScale ( MlirType type)

Returns the scale of the given uniform quantized type.

Definition at line 157 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedType::bindDerived().

◆ mlirUniformQuantizedTypeGetTypeID()

MlirTypeID mlirUniformQuantizedTypeGetTypeID ( void )

◆ mlirUniformQuantizedTypeGetZeroPoint()

int64_t mlirUniformQuantizedTypeGetZeroPoint ( MlirType type)

Returns the zero point of the given uniform quantized type.

Definition at line 161 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedType::bindDerived().

◆ mlirUniformQuantizedTypeIsFixedPoint()

bool mlirUniformQuantizedTypeIsFixedPoint ( MlirType type)

Returns true if the given uniform quantized type is fixed-point.

Definition at line 165 of file Quant.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::quant::UniformQuantizedType::bindDerived().