[Mlir-commits] [mlir] [mlir][linalg] Add Check for Reduction Operation in Contraction Body (PR #123134)

Ayokunle Amodu llvmlistbot at llvm.org
Thu Jan 16 07:26:32 PST 2025


================
@@ -14,3 +14,39 @@ func.func @transpose_and_broadcast(%arg0: tensor<7x8xf32>, %arg1: tensor<8x7x9xf
   } -> tensor<8x7x9xf32>
   return %0 : tensor<8x7x9xf32>
 }
+
+// -----
+
+#map = affine_map<(d0, d1) -> (d0, d1)>
+#map1 = affine_map<(d0, d1, d2) -> (d0, d2)>
+#map2 = affine_map<(d0, d1, d2) -> (d1, d2)>
+#map3 = affine_map<(d0, d1, d2) -> (d0, d1)>
+// This tests checks that the pass does not crash when trying to specialize a 
+// contraction-like generic op with no reduction operation in its body.
+// CHECK-LABEL: @specialize_reduction
----------------
ayokunle321 wrote:

I was able to minimize it and add the check, does it look okay now?

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


More information about the Mlir-commits mailing list