[Mlir-commits] [mlir] [mlir][linalg] Simplify runtime op verification test case (PR #141454)
Matthias Springer
llvmlistbot at llvm.org
Sun May 25 22:06:19 PDT 2025
https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/141454
Simplify one of the test cases to make it easier to understand what is being verified.
>From 28c3d9b1c00a87ac9c0a79d636b3195f7a09517b Mon Sep 17 00:00:00 2001
From: Matthias Springer <mspringer at nvidia.com>
Date: Mon, 26 May 2025 07:05:12 +0200
Subject: [PATCH] [mlir][linalg] Simplify runtime op verification test case
---
.../Dialect/Linalg/CPU/runtime-verification.mlir | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
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>
More information about the Mlir-commits
mailing list