Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td
Show All 35 Lines | |||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Non-Quantized Signed Integer Types. | // Non-Quantized Signed Integer Types. | ||||
// Used to express accumulator results or compare results. | // Used to express accumulator results or compare results. | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
def Tosa_UInt8 : UI<8>; | def Tosa_UInt8 : UI<8>; | ||||
def Tosa_UInt16 : UI<16>; | def Tosa_UInt16 : UI<16>; | ||||
// TOSA spec supports unsinged and signed integers. Signed integers were | |||||
// implemented as Tosa_Int. This will be fixed gradually, since I<#> types | |||||
// are signless as defined by MLIR. The signed/unsigned types are SI<#>/UI<#>. | |||||
// TODO: Remove signless types once all TOSA generators migrate to | |||||
// signed/unsigned types. | |||||
def Tosa_Int8 : I<8>; | def Tosa_Int8 : I<8>; | ||||
def Tosa_Int16 : I<16>; | def Tosa_Int16 : I<16>; | ||||
def Tosa_Int32 : I<32>; | def Tosa_Int32 : I<32>; | ||||
def Tosa_Int48 : I<48>; | def Tosa_Int48 : I<48>; | ||||
def Tosa_Int64 : I<64>; | def Tosa_Int64 : I<64>; | ||||
def Tosa_SInt8 : SI<8>; | |||||
def Tosa_SInt16 : SI<16>; | |||||
def Tosa_SInt32 : SI<32>; | |||||
def Tosa_SInt48 : SI<48>; | |||||
def Tosa_SInt64 : SI<64>; | |||||
def Tosa_SignedInt : AnyTypeOf<[Tosa_Int8, | def Tosa_SignedInt : AnyTypeOf<[Tosa_Int8, | ||||
Tosa_Int16, | Tosa_Int16, | ||||
Tosa_Int32, | Tosa_Int32, | ||||
Tosa_Int48, | Tosa_Int48, | ||||
Tosa_Int64]>; | Tosa_Int64, | ||||
Tosa_SInt8, | |||||
Tosa_SInt16, | |||||
Tosa_SInt32, | |||||
Tosa_SInt48, | |||||
Tosa_SInt64]>; | |||||
def Tosa_Bool : I<1>; | def Tosa_Bool : I<1>; | ||||
// No unsigned unquantized int types. | // No unsigned unquantized int types. | ||||
def Tosa_Int : AnyTypeOf<[Tosa_Bool, | def Tosa_Int : AnyTypeOf<[Tosa_Bool, | ||||
Tosa_UInt8, | Tosa_UInt8, | ||||
Tosa_UInt16, | Tosa_UInt16, | ||||
Tosa_SignedInt]>; | Tosa_SignedInt]>; | ||||
def Tosa_Int32Or64 : AnyTypeOf<[Tosa_Int32, | def Tosa_Int32Or64 : AnyTypeOf<[Tosa_Int32, | ||||
rsuderman: Keep `Int` then `SInt` lowering ordering. | |||||
Tosa_Int64]>; | Tosa_Int64, | ||||
Tosa_SInt32, | |||||
Tosa_SInt64]>; | |||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Quantized Integer Types. | // Quantized Integer Types. | ||||
// Datatype for network feature map or weight content. | // Datatype for network feature map or weight content. | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Name Symmetry Grouping Sign | // Name Symmetry Grouping Sign | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |
Keep Int then SInt lowering ordering.