[mlir][vector] Add missing support for scalable vectors
This patch adds the missing logic so that the `TransferReadPermutationLowering` can be used for scalable vectors. To this end: * TransferOp custom C++ builder is updated to support scalable vectors, * `TransferOpReduceRank` is also updated to support scalable vectors. This pattern is relevant when lowering `linalg.matmul` via `vector_multi_reduction` for scalable vectors. I've also updated relevant code in `TransferOpReduceRank` not to use `llvm::to_vector` for constructing `SmallVector` from `ArrayRef`. That hook doesn't work for `ArraryRef<bool>` (*), so for consistency I switched to an explicit constructor (so that both `newShape` and `newScalableDim` are constructed in a similar fashion). (*) IIUC, that's due how implicit narrowing conversions between `bool` and `*bool` work. Note that these narrowing conversions change when using initializer lists, see * https://en.cppreference.com/w/cpp/language/list_initialization. Depends on D157092 Differential Revision: https://reviews.llvm.org/D157268
Loading
Please sign in to comment