[Mlir-commits] [mlir] [MLIR][Linalg] Lower vector.contract to chain of vector.fma for batch reduce matmul (PR #121885)
Rolf Morel
llvmlistbot at llvm.org
Wed Jan 8 04:06:33 PST 2025
================
@@ -0,0 +1,189 @@
+// RUN: mlir-opt %s -transform-interpreter -cse -split-input-file | FileCheck %s
+
+#map = affine_map<(d0, d1, d2, d3) -> (d0, d1, d3)>
+#map1 = affine_map<(d0, d1, d2, d3) -> (d0, d3, d2)>
+#map2 = affine_map<(d0, d1, d2, d3) -> (d1, d2)>
+memref.global "private" constant @__constant_24x64x64xf32 : memref<24x64x64xf32> = dense<1.000000e+00> {alignment = 64 : i64}
+func.func @lower_contract_to_fma(%arg0: memref<8x24x32x64xf32>) -> memref<8x24x32x64xf32> {
+ %cst = arith.constant 0.000000e+00 : f32
+ %cst_0 = arith.constant dense<0.000000e+00> : vector<32x64xf32>
+ %c1 = arith.constant 1 : index
+ %c24 = arith.constant 24 : index
+ %c64 = arith.constant 64 : index
+ %c4 = arith.constant 4 : index
+ %c32 = arith.constant 32 : index
+ %c0 = arith.constant 0 : index
+ %0 = memref.get_global @__constant_24x64x64xf32 : memref<24x64x64xf32>
+ %alloc = memref.alloc() {alignment = 64 : i64} : memref<8x24x32x64xf32>
+ scf.forall (%arg1, %arg2) in (8, 24) {
----------------
rolfmorel wrote:
This and the next two `scf.for`s are extraneous. Please minimize your unit tests to what's necessary for the transform to be tested.
https://github.com/llvm/llvm-project/pull/121885
More information about the Mlir-commits
mailing list