diff options
author | Alan Li <me@alanli.org> | 2025-05-22 13:05:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-22 13:05:37 -0400 |
commit | 6fd3c20d25a88ccc3f2b5275e67de8b88ad5f873 (patch) | |
tree | 1617502815d7688262e8e88ab06761a4304e27c7 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | dc68166912baf5120389304ba317f818f406b4bd (diff) | |
download | llvm-6fd3c20d25a88ccc3f2b5275e67de8b88ad5f873.zip llvm-6fd3c20d25a88ccc3f2b5275e67de8b88ad5f873.tar.gz llvm-6fd3c20d25a88ccc3f2b5275e67de8b88ad5f873.tar.bz2 |
[MLIR] Add a utility pass to linearize `memref` (#136797)
To add a transformation that simplifies memory access patterns, this PR
adds a memref linearizer which is based on the GPU/DecomposeMemRefs
pass, with the following changes:
* support vector dialect ops
* instead of decompose memrefs to rank-0 memrefs, flatten higher-ranked
memrefs to rank-1.
Notes:
* After the linearization, a MemRef's offset is kept, so a
`memref<4x8xf32, strided<[8, 1], offset: 100>>` becomes `memref<32xf32,
strided<[1], offset: 100>>`.
* It also works with dynamic shapes and strides and offsets (see test
cases for details).
* The shape of the casted memref is computed as 1d, flattened.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions