[Mlir-commits] [mlir] [mlir][linalg] Simplify runtime op verification test case (PR #141454)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun May 25 22:06:54 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Matthias Springer (matthias-springer)

<details>
<summary>Changes</summary>

Simplify one of the test cases to make it easier to understand what is being verified.


---
Full diff: https://github.com/llvm/llvm-project/pull/141454.diff


1 Files Affected:

- (modified) mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir (+4-7) 


``````````diff
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
index 5a1bcc7d893bc..dc56a3c52baad 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
@@ -109,15 +109,12 @@ func.func @main() {
 #identity1D = affine_map<(d0) -> (d0)>
 
 func.func @simple_add(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>) -> (tensor<?xf32>) {
-    %c0 = arith.constant 0 : index
-    %dim = tensor.dim %arg0, %c0 : tensor<?xf32>
-    %result = tensor.empty(%dim) : tensor<?xf32> 
     %0 = linalg.generic {
-      indexing_maps = [#identity1D, #identity1D, #identity1D],
+      indexing_maps = [#identity1D, #identity1D],
       iterator_types = ["parallel"]
-    } ins(%arg0, %arg1 : tensor<?xf32>, tensor<?xf32>)
-      outs(%result : tensor<?xf32>) {
-      ^bb0(%gen_arg1: f32, %gen_arg2: f32, %out: f32) :
+    } ins(%arg0 : tensor<?xf32>)
+      outs(%arg1 : tensor<?xf32>) {
+      ^bb0(%gen_arg1: f32, %gen_arg2: f32) :
         %tmp1 = arith.addf %gen_arg1, %gen_arg2 : f32
         linalg.yield %tmp1 : f32
     } -> tensor<?xf32>

``````````

</details>


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


More information about the Mlir-commits mailing list