My Project
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mlir::quant::ExpressedToQuantizedConverter Struct Reference

#include <UniformSupport.h>

Collaboration diagram for mlir::quant::ExpressedToQuantizedConverter:
Collaboration graph
[legend]

Public Member Functions

Type convert (QuantizedType elementalType) const
 
 operator bool () const
 Whether the conversion is legal. More...
 

Static Public Member Functions

static const ExpressedToQuantizedConverter forInputType (Type inputType)
 Creates a converter for the given input type. More...
 

Public Attributes

const Type inputType
 
const Type expressedType
 

Detailed Description

Performs type conversion from an arbitrary input type to a type that is expressed by a QuantizedType.

This handles cases where the inputType is a supported primitive type (i.e. f32, bf16, etc) or a vector/tensor type based on a supported elemental type.

Since conversion often involves introspecting some attributes of the input type in order to determine how to represent it, this is a two step process.

Member Function Documentation

◆ convert()

Type ExpressedToQuantizedConverter::convert ( QuantizedType  elementalType) const

Converts the inputType to be based on the given elemental type, returning the new type (or nullptr and emit an error on failure).

◆ forInputType()

const ExpressedToQuantizedConverter ExpressedToQuantizedConverter::forInputType ( Type  inputType)
static

Creates a converter for the given input type.

◆ operator bool()

mlir::quant::ExpressedToQuantizedConverter::operator bool ( ) const
inlineexplicit

Whether the conversion is legal.

Member Data Documentation

◆ expressedType

const Type mlir::quant::ExpressedToQuantizedConverter::expressedType

Supported, elemental expressed type (i.e. f32). Will be nullptr if conversion is not supported.

◆ inputType

const Type mlir::quant::ExpressedToQuantizedConverter::inputType

The input type that is being converted from. This may be an elemental or composite type.


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