mlir._mlir_libs._mlir.dialects.quant

Classes

Functions

CalibratedQuantizedType(QuantizedType)

Module Contents

class mlir._mlir_libs._mlir.dialects.quant.QuantizedType

Bases: mlir.ir.Type

static isinstance(type: mlir.ir.Type) bool
static default_minimum_for_integer(is_signed: bool, integral_width: int) int
static default_maximum_for_integer(is_signed: bool, integral_width: int) int
property expressed_type: mlir.ir.Type
property flags: int
property is_signed: bool
property storage_type: mlir.ir.Type
property storage_type_min: int
property storage_type_max: int
property storage_type_integral_width: int
is_compatible_expressed_type(candidate: mlir.ir.Type) bool
property quantized_element_type: mlir.ir.Type
cast_from_storage_type(candidate: mlir.ir.Type) mlir.ir.Type
static cast_to_storage_type(type: mlir.ir.Type) mlir.ir.Type
cast_from_expressed_type(candidate: mlir.ir.Type) mlir.ir.Type
static cast_to_expressed_type(type: mlir.ir.Type) mlir.ir.Type
cast_expressed_to_storage_type(candidate: mlir.ir.Type) mlir.ir.Type
class mlir._mlir_libs._mlir.dialects.quant.AnyQuantizedType

Bases: QuantizedType

classmethod get(flags: int, storage_type: mlir.ir.Type, expressed_type: mlir.ir.Type, storage_type_min: int, storage_type_max: int) mlir.ir.Type
class mlir._mlir_libs._mlir.dialects.quant.UniformQuantizedType

Bases: QuantizedType

classmethod get(flags: int, storage_type: mlir.ir.Type, expressed_type: mlir.ir.Type, scale: float, zero_point: int, storage_type_min: int, storage_type_max: int) mlir.ir.Type
property scale: float
property zero_point: int
property is_fixed_point: bool
class mlir._mlir_libs._mlir.dialects.quant.UniformQuantizedPerAxisType

Bases: QuantizedType

classmethod get(flags: int, storage_type: mlir.ir.Type, expressed_type: mlir.ir.Type, scales: list[float], zero_points: list[int], quantized_dimension: int, storage_type_min: int, storage_type_max: int)
property scales: list[float]
property zero_points: list[int]
property quantized_dimension: int
property is_fixed_point: bool
mlir._mlir_libs._mlir.dialects.quant.CalibratedQuantizedType(QuantizedType)