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

Han-Chung Wang llvmlistbot at llvm.org
Wed Jul 3 15:20:47 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()))
----------------
hanhanW wrote:

It seems like I forgot to add the change to the commit before I push the changes... Thanks for helping on this.

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


More information about the Mlir-commits mailing list