[Mlir-commits] [mlir] [mlir][vector] Generalize multi_reduction innerparallel unrolling to N dimensions (PR #182301)

Andrzej Warzyński llvmlistbot at llvm.org
Fri Feb 20 12:15:47 PST 2026


banach-space wrote:

[Thanks for the update!

> This two generalization will allow downstream projects to better control their `vector.multi_reduction`s lowering strategy. For example, this generalization would allow vector.multi_reduction's lowering to be implemented without flattening. (i.e., operations would be expressed on vectors of rank 1 without flattening).
> 
> This changeset is intended to be followed by other changes that will also generalize innerreduction unrolling to N dimensions.
> 

For me as a reviewer, this part is the key motivation behind the patch. It clearly explains the direction and why the change matters.

I find that the rest of the summary mostly describes what changed, which I can already see in the diff. When I review patches, it really helps me if the summary focuses primarily on the why and the high-level design decisions, and keeps the implementation details lighter.

I realise this may sound picky, but I go through quite a lot of patches, and well-structured summaries make a huge difference to how quickly I can build the right mental model.

This post is a great intro to writing PR summaries, especially the section on “why” vs “how”:

* https://chris.beams.io/git-commit#why-not-how

It’s also recommended in the [MLIR contribution guidelines](https://mlir.llvm.org/getting_started/Contributing/#commit-messages).

There’s also a nice write-up from one of Clang’s key contributors:

* https://shafik.github.io/software%20development/2025/09/22/why-summaries-are-important-for-prs.html

Sharing these in good faith - I personally find writing commit summaries challenging as well, and I wish someone had pointed me to these earlier in my career.

---

Getting back to purely technical matters. What is the relationship between `UnrollMultiReductionInnerParallelBaseCase` and `UnrollMultiReductionInnerParallelGeneralCase`? What do I need to achieve transformation identical to what `TwoDimMultiReductionToElementWise` provides today?

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


More information about the Mlir-commits mailing list