[Mlir-commits] [mlir] [MLIR][Linalg] Add pass to convert linalg.generic back to named ops (PR #95656)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Jun 19 01:41:17 PDT 2024
================
@@ -0,0 +1,49 @@
+// RUN: mlir-opt %s -linalg-generalize-named-ops | mlir-opt --linalg-specialize-generic-ops | FileCheck %s
+
+func.func @matmul(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>) -> tensor<?x?xf32> {
+ %0 = linalg.matmul ins(%arg0, %arg1 : tensor<?x?xf32>, tensor<?x?xf32>) outs(%arg2 : tensor<?x?xf32>) -> tensor<?x?xf32>
+ return %0 : tensor<?x?xf32>
+}
+
+// CHECK-LABEL: @matmul
+// CHECK-SAME: %[[A:.+]]: tensor<?x?xf32>, %[[B:.+]]: tensor<?x?xf32>, %[[Out:.+]]: tensor<?x?xf32>) -> tensor<?x?xf32>
----------------
banach-space wrote:
Big "+1" to using "A" and "B" for inputs (you could also use "C" for the output). Could you use similar names in the actual function names? For the sake of consistency and readability. Otherwise it's a bit odd that in one place you use `%arg0` and elsewhere `%[[A:.+]]`.
https://github.com/llvm/llvm-project/pull/95656
More information about the Mlir-commits
mailing list