[Mlir-commits] [mlir] [mlir][linalg] Switch to use OpOperand* in ControlPropagationFn. (PR #96697)

Renato Golin llvmlistbot at llvm.org
Tue Jul 2 08:41:13 PDT 2024


================
@@ -879,10 +879,13 @@ class BubbleUpPackOpThroughReshapeOp final
 /// %unpack = tensor.unpack %expanded outer_dims_perm = [0, 1, 2]
 ///     inner_dims_pos = [1, 2] inner_tiles = [8, 8] into %empty
 ///     : tensor<?x32x32x8x8xf32> -> tensor<?x256x256xf32>
-static LogicalResult
-pushDownUnPackOpThroughExpandShape(tensor::UnPackOp unPackOp,
-                                   tensor::ExpandShapeOp expandOp,
-                                   PatternRewriter &rewriter) {
+static LogicalResult pushDownUnPackOpThroughExpandShape(
+    tensor::UnPackOp unPackOp, tensor::ExpandShapeOp expandOp,
+    PatternRewriter &rewriter, ControlPropagationFn controlFn) {
+  // User controlled propagation function.
+  if (!controlFn(expandOp.getSrcMutable()))
----------------
rengolin wrote:

This is what the test breaks about. Needs to be fixed before merging.

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


More information about the Mlir-commits mailing list