My Project
|
#include <UniformSupport.h>
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 |
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.
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).
|
static |
Creates a converter for the given input type.
|
inlineexplicit |
Whether the conversion is legal.
const Type mlir::quant::ExpressedToQuantizedConverter::expressedType |
Supported, elemental expressed type (i.e. f32). Will be nullptr if conversion is not supported.
const Type mlir::quant::ExpressedToQuantizedConverter::inputType |
The input type that is being converted from. This may be an elemental or composite type.