| Issue |
234238
|
| Summary |
[mlir][vector] Switch from vector.multi_reduction to vector.contract
|
| Labels |
mlir
|
| Assignees |
banach-space
|
| Reporter |
banach-space
|
Hi folks,
MLIR’s Vector dialect includes two operations with overlapping use cases:
- [vector.multi_reduction](https://mlir.llvm.org/docs/Dialects/Vector/#vectormulti_reduction-vectormultidimreductionop)
- [vector.contract](https://mlir.llvm.org/docs/Dialects/Vector/#vectorcontract-vectorcontractionop)
Historically, the lowering path from `linalg.matmul` to `vector.contract` went through `vector.multi_reduction`. In [#147296](https://github.com/llvm/llvm-project/pull/147296), @adam-smnk added a direct path from `linalg.matmul` to `vector.contract`.
As a next step, I would like to clarify the boundary between these operations: when should Linalg vectorization produce vector.contract, and when is `vector.multi_reduction` needed? My goal is to identify more cases that can lower directly to `vector.contract` and address any gaps in the existing lowering.
Could you share concrete examples where `vector.contract` cannot be used in place of `vector.multi_reduction`? Small IR examples, together with a brief explanation of the limitation, would be particularly helpful.
Thank you,
Andrzej
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs