diff options
author | Andrzej WarzyĆski <andrzej.warzynski@arm.com> | 2024-07-25 09:44:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 09:44:34 +0100 |
commit | c7a3346ab6a8fbd551a80bd4028ec8624daa35e4 (patch) | |
tree | 6a91d8af17aec88f2ee9b993e66a9f881dc654a8 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | d82df1b891fecae0af7de5e970b592ce37178a30 (diff) | |
download | llvm-c7a3346ab6a8fbd551a80bd4028ec8624daa35e4.zip llvm-c7a3346ab6a8fbd551a80bd4028ec8624daa35e4.tar.gz llvm-c7a3346ab6a8fbd551a80bd4028ec8624daa35e4.tar.bz2 |
[mlir][linalg] Fix scalable vectorisation of tensor.extract (#100325)
This PR fixes one very specific aspect of vectorising `tensor.extract`
Ops when targeting scalable vectors. Namely, it makes sure that the
scalable flag is correctly propagated when creating
`vector::ShapeCastOp`.
BEFORE:
```mlir
vector.shape_cast %idx_vec : vector<1x1x[4]xindex> to vector<4xindex>
```
AFTER:
```mlir
vector.shape_cast %idx_vec : vector<1x1x[4]xindex> to vector<[4]xindex>
```
This particular ShapeCastOp is created when generating an index for
`vector.transfer_read` operations. Strictly speaking, casting is not
really required. However, it makes the subsequent address calculation
much simpler (*).
The following test is updated to demonstrate the use of
`vector.shape_cast` by the vectoriser:
*
@masked_static_vectorize_nd_tensor_extract_with_affine_apply_contiguous
Similar test with scalable vectors is also added.
(*) At this point in the vectoriser it is known
that all leading dims in the index vector are "1").
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions