diff options
author | Cullen Rhodes <cullen.rhodes@arm.com> | 2023-11-23 08:53:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-23 08:53:43 +0000 |
commit | fae3964cbc6d27e89f93d6579f2e8188f240e6cb (patch) | |
tree | 07922dd25321e582abc32ae3168fa4c989655dfc /clang/lib/Frontend/TestModuleFileExtension.cpp | |
parent | 1343d96ec10af9760bc25f5f2c2258269de18c2d (diff) | |
download | llvm-fae3964cbc6d27e89f93d6579f2e8188f240e6cb.zip llvm-fae3964cbc6d27e89f93d6579f2e8188f240e6cb.tar.gz llvm-fae3964cbc6d27e89f93d6579f2e8188f240e6cb.tar.bz2 |
[mlir][linalg] Add an e2e test for linalg.matmul to ArmSME (#72144)
This patch adds an integration test lowering a linalg.matmul to SME via
vector.outerproduct.
It's similar to the linalg.matmul_transpose_a e2e test added recently in
as well as vector transpose canonicalizations, to lower the following
sequence (taken from the inner loop):
```
%subview = memref.subview %arg0[%arg3, %arg5] [%2, 1] [1, 1] :
memref<?x?xf32, strided<[?, ?], offset: ?>> to memref<?x1xf32, strided<[?, ?], offset: ?>>
%mask = vector.create_mask %2, %c1 : vector<[4]x1xi1>
%0 = vector.transfer_read %subview[%c0, %c0], %pad, %mask {in_bounds = [true, true]} :
memref<?x1xf32, strided<[?, ?], offset: ?>>, vector<[4]x1xf32>
%1 = vector.transpose %0, [1, 0] : vector<[4]x1xf32> to vector<1x[4]xf32>
%2 = vector.extract %1[0] : vector<[4]xf32> from vector<1x[4]xf32>
```
Rank-2 vectors with leading scalable dim can't be type converted to an
array. TransferReadDropUnitDimsPattern drops the unit dim on the
vector.transfer_read so it can be lowered via the generic path (to SVE).
The transpose canonicalizations lower the transpose to a shape_cast
which folds away.
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions