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

Georgios Pinitas llvmlistbot at llvm.org
Wed Mar 5 02:07:10 PST 2025


================
@@ -93,8 +93,12 @@ func.func @test_unary_i32(%arg0 : tensor<4xi32>) -> () {
   // CHECK: tosa.reverse %arg0 {axis = 0 : i32} : (tensor<4xi32>) -> tensor<4xi32>
   %5 = tosa.reverse %arg0 { axis = 0 : i32 } : (tensor<4xi32>) -> tensor<?xi32>
 
-  // CHECK: tosa.rescale %arg0 {{.+}} : (tensor<4xi32>) -> tensor<4xi16>
-  %6 = tosa.rescale %arg0 {input_zp = 243 : i32, output_zp = 252 : i32, multiplier = array<i32: 42, 43>, shift = array<i8: 14, 15>, scale32 = false, double_round = false, per_channel = false, input_unsigned = false, output_unsigned = false} : (tensor<4xi32>) -> tensor<*xi16>
+  // CHECK-DAG: %[[Mult:.+]] = "tosa.const"() <{value = dense<[42, 43]> : tensor<2xi16>}> : () -> tensor<2xi16>
----------------
GeorgeARM wrote:

Could we switch into using capitals for the variable names? For example change `Mult` to `MULT`
Same for the others

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


More information about the Mlir-commits mailing list