[Mlir-commits] [mlir] [mlir][tosa] Add test of mul with rank1 shift to ops.mlir (PR #134881)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 8 09:58:50 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Jerry-Ge (Jerry-Ge)
<details>
<summary>Changes</summary>
Minor test case addition.
---
Full diff: https://github.com/llvm/llvm-project/pull/134881.diff
1 Files Affected:
- (modified) mlir/test/Dialect/Tosa/ops.mlir (+8)
``````````diff
diff --git a/mlir/test/Dialect/Tosa/ops.mlir b/mlir/test/Dialect/Tosa/ops.mlir
index 248d84da6b8b9..d446e0f1b52ef 100644
--- a/mlir/test/Dialect/Tosa/ops.mlir
+++ b/mlir/test/Dialect/Tosa/ops.mlir
@@ -363,6 +363,14 @@ func.func @test_min(%arg0: tensor<13x21x3xf32>, %arg1: tensor<1x21x3xf32>) -> te
return %0 : tensor<13x21x3xf32>
}
+// -----
+// CHECK-LABEL: test_mul_rank1_shift
+func.func @test_mul_rank1_shift(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x1x3xf32>) -> tensor<13x21x3xf32> {
+ %shift = "tosa.const"() <{values = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
+ %0 = tosa.mul %arg0, %arg1, %shift : (tensor<13x21x3xf32>, tensor<13x1x3xf32>, tensor<1xi8>) -> tensor<13x21x3xf32>
+ return %0 : tensor<13x21x3xf32>
+}
+
// -----
// CHECK-LABEL: test_mul_scalar_with_unranked_output
func.func @test_mul_scalar_with_unranked_output(%arg0: tensor<f32>, %arg1: tensor<f32>) -> tensor<*xf32> {
``````````
</details>
https://github.com/llvm/llvm-project/pull/134881
More information about the Mlir-commits
mailing list