[Mlir-commits] [mlir] [mlir][VectorOp] Move VectorMaskOpConversionBase template to header (NFC) (PR #69341)

Diego Caballero llvmlistbot at llvm.org
Tue Oct 17 11:23:08 PDT 2023


dcaballe wrote:

> > LG but just a design comment. If you have a chance, make sure you lower the vector mask before we lower to LLVM when possible. Lowering both at the same time can get unnecessarily complicated.
> 
> Currently I'm doing the conversion within the lowering to LLVM, but with multiple patterns (as there's not another obvious place to put it). So it goes:
> 
> 1. `vector.mask { vector.outerproduct ... }` or `vector.outerproduct`
> 2. -> `arm_sme.outerproduct ... %lhsMask, %rhsMask ...` (rewrite 1: to intermediate operand-masked arm_sme op)
> 3. -> SME intrinsic (rewrite 2)
> 
> Which avoids one big rewrite.

Why don't you move #2 this to the vector to SME lowering? You can create another `ConvertMaskOpTo...`.

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


More information about the Mlir-commits mailing list