[Mlir-commits] [mlir] [mlir][Tensor] Add rank-reducing slice in generatedSlices (PR #174248)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 5 17:13:45 PST 2026
MaheshRavishankar wrote:
> > Just a note, its good to provide context of how you came about to this from downstream projects (like IREE), but upstream needs to be self-contained. So it would be good to have a repro just using MLIR and use this is as a fix for this. You can just create a specific transform dialect op if needed for just the example you are fixing here? Its a bit more work, but that is needed for upstream to stay consistent.
>
> Thanks for the feedback. I need to figure out how to design a self-contained upstream test for this. The issue is that FoldExtractSliceOfBroadcast is defined in IREE, so I'll need to investigate whether there are equivalent upstream patterns I can use, or find another way to reproduce the scenario purely within MLIR.
I think the issue here is that you have a producer that is to be fused on the `outs` operand. In the split-reduction case there is an extra rank-reducing slice that is thwarting the fusion. You can potentially use the output IR after the pattern runs in your downstream code as the input IR and use the transform operation that is just doing the fusion to demonstrate the error.
https://github.com/llvm/llvm-project/pull/174248
More information about the Mlir-commits
mailing list