[Mlir-commits] [mlir] [mlir][tosa] Convert RESCALE op multiplier and shift from attributes to inputs (PR #129720)

Peng Sun llvmlistbot at llvm.org
Wed Mar 5 11:17:46 PST 2025


================
@@ -68,11 +72,23 @@ def Tosa_Int32Or64 : AnyTypeOf<[Tosa_Int32,
 // int8  : symmetric  per tensor/per channel, signed
 // int16 : symmetric  per tensor,             signed
 //===----------------------------------------------------------------------===//
-def Tosa_QuantizedInt : AnyTypeOf<[Tosa_QuantizedType<"uint8", [8], 0>,
-                                   Tosa_QuantizedType<"int4", [4, 0], 1>,
-                                   Tosa_QuantizedType<"int8", [8, 0], 1>,
-                                   Tosa_QuantizedType<"int16", [16, 0], 1>,
-                                   Tosa_QuantizedType<"int32", [32, 0], 1>]>;
+def Tosa_QuantizedInt	: AnyTypeOf<[ Tosa_QuantizedType<"uint8", [8], 0>,
+                                     Tosa_QuantizedType<"int4", [4, 0], 1>,
+                                     Tosa_QuantizedType<"int8", [8, 0], 1>,
+                                     Tosa_QuantizedType<"int16", [16, 0], 1>,
+                                     Tosa_QuantizedType<"int32", [32, 0], 1>]>;
+
+//===----------------------------------------------------------------------===//
+// Floating-point types.
+//===----------------------------------------------------------------------===//
+def Tosa_Float : AnyTypeOf<[
+                            F32,
+                            F16,
+                            BF16]>;
+
+def Tosa_F8 : AnyTypeOf<[
----------------
psunn wrote:

This change is intentional. Since it isn’t directly related to the main focus of this PR, I can split it into a separate commit if preferred.

https://github.com/llvm/llvm-project/pull/129720


More information about the Mlir-commits mailing list