[mlir][tosa] Add uint16 to TOSA type support
authorRob Suderman <suderman@google.com>
Tue, 10 Jan 2023 19:40:45 +0000 (11:40 -0800)
committerRob Suderman <suderman@google.com>
Tue, 10 Jan 2023 20:33:10 +0000 (12:33 -0800)
UInt16 is included as a required TOSA type for basic
operations. Added support as a TOSA Tensor.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D141341

mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td

index 45b1a12..3c9094e 100644 (file)
@@ -39,6 +39,7 @@ class Tosa_QuantizedType<string n, list<int> params, bit signed>
 //===----------------------------------------------------------------------===//
 
 def Tosa_UInt8 : UI<8>;
+def Tosa_UInt16 : UI<16>;
 
 def Tosa_Int8 : I<8>;
 def Tosa_Int16 : I<16>;
@@ -57,6 +58,7 @@ def Tosa_Bool : I<1>;
 // No unsigned unquantized int types.
 def Tosa_Int : AnyTypeOf<[Tosa_Bool,
                           Tosa_UInt8,
+                          Tosa_UInt16,
                           Tosa_SignedInt]>;
 
 def Tosa_Int32Or64 : AnyTypeOf<[Tosa_Int32,