[all-commits] [llvm/llvm-project] 6b902e: [mlir][linalg] Add support for masked vectorizatio...
Andrzej Warzyński via All-commits
all-commits at lists.llvm.org
Thu Feb 6 23:56:46 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6b902efdf63c61be72feff94707bcfb1a92347fe
https://github.com/llvm/llvm-project/commit/6b902efdf63c61be72feff94707bcfb1a92347fe
Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
Date: 2025-02-07 (Fri, 07 Feb 2025)
Changed paths:
M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
M mlir/test/Dialect/Linalg/vectorization-unsupported.mlir
M mlir/test/Dialect/Linalg/vectorization.mlir
Log Message:
-----------
[mlir][linalg] Add support for masked vectorization of `tensor.insert_slice` (2/N) (#123031)
For context, recall that `tensor.insert_slice` is vectorised using the
`vector.transfer_read` + `vector.transfer_write` pair. An unmasked
example is shown below:
```mlir
// BEFORE VECTORIZATION
%res = tensor.insert_slice
%slice into %dest[0, %c2]
[5, 1] [1, 1] : tensor<5x1xi32> into tensor<5x3xi32>
// AFTER VECTORIZATION
%read = vector.transfer_read %source[%c0, %c0], %pad
: tensor<5x1xi32>, vector<8x1xi32>
%res = vector.transfer_write %read, %dest[%c0, %c2]
: vector<8x1xi32>, tensor<5x3xi32>
```
This PR extends `vectorizeAsInsertSliceOp` to add masking support for
the `vector.transfer_write` operation. This complements the changes
in #122927, which introduced masking for the `vector.transfer_read`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list