diff options
author | Hanhan Wang <hanchung@google.com> | 2023-01-05 16:54:34 -0800 |
---|---|---|
committer | Hanhan Wang <hanchung@google.com> | 2023-01-11 13:51:49 -0800 |
commit | 65388086e68245c11c5acf5cd6b3570d8e4d11bf (patch) | |
tree | e43a26d690e220e7ffb512a5c0cd9f267740ef4c /llvm/lib/Transforms/Utils/ModuleUtils.cpp | |
parent | 58def623ca46f107d185d7f02b267ffa751aff97 (diff) | |
download | llvm-65388086e68245c11c5acf5cd6b3570d8e4d11bf.zip llvm-65388086e68245c11c5acf5cd6b3570d8e4d11bf.tar.gz llvm-65388086e68245c11c5acf5cd6b3570d8e4d11bf.tar.bz2 |
[mlir][tensor] Add patterns that fold ops into pack and unpack ops.
The tensor.pack ops have pad semantic, so we can fold pad + pack into
pack when
1. They have the same padding values or the pack op does not have
padding values.
2. The pad op does not have low paddings.
The tensor.unpack ops have extract_slice semantic, so we can fold unpack
+ extract_slice into unpack when
1. All the offsets are 0s.
2. All the strides are 1s.
Reviewed By: tyb0807
Differential Revision: https://reviews.llvm.org/D141099
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
0 files changed, 0 insertions, 0 deletions