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

Adam Siemieniuk llvmlistbot at llvm.org
Thu Jan 16 07:03:44 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
----------------
adam-smnk wrote:

Please also check that generics remain. Sth like this should be fine:
`// CHECK-COUNT-3: linalg.generic`

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


More information about the Mlir-commits mailing list