[Mlir-commits] [mlir] [mlir][linalg] Add e2e test for linalg.mmt4d (PR #84964)

Cullen Rhodes llvmlistbot at llvm.org
Wed Mar 13 03:34:32 PDT 2024


================
@@ -0,0 +1,174 @@
+// DEFINE: %{compile} =  mlir-opt %s \
+// DEFINE:    -transform-interpreter -test-transform-dialect-erase-schedule \
+// DEFINE:    -one-shot-bufferize -func-bufferize -cse -canonicalize -convert-vector-to-scf -test-lower-to-llvm -o %t
+// DEFINE: %{entry_point} = main
+// DEFINE: %{run} = mlir-cpu-runner %t -e %{entry_point} -entry-point-result=void \
+// DEFINE:    -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils
+
+// RUN: %{compile}
+
+// RUN: %{run} | FileCheck %s
+
+/// End-to-end test for computing matrix-multiplicatin using linalg.mmt4d. In
+/// particular, demonstrates how the following MLIR sequence (implemented in @mmt4d):
+///
+///   A_pack = tensor.pack A
+///   B_pack = tensor.pack B
+///   C_pack = tensor.pack C
+///   out_pack = linalg.mmt4d(A_pack, B_ pack, C_pack)
----------------
c-rhodes wrote:

```suggestion
///   out_pack = linalg.mmt4d(A_pack, B_pack, C_pack)
```

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


More information about the Mlir-commits mailing list