[all-commits] [llvm/llvm-project] f32427: [mlir][linalg] Fix lowering of tensor.pack operations
Spenser Bauman via All-commits
all-commits at lists.llvm.org
Tue Sep 5 12:14:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f32427e0447c787755fb29415f4deeb4c00adacd
https://github.com/llvm/llvm-project/commit/f32427e0447c787755fb29415f4deeb4c00adacd
Author: Spenser Bauman <sbauman at mathworks.com>
Date: 2023-09-05 (Tue, 05 Sep 2023)
Changed paths:
M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
M mlir/test/Dialect/Linalg/transform-lower-pack.mlir
Log Message:
-----------
[mlir][linalg] Fix lowering of tensor.pack operations
Tensor pack operations are optimistically lowered to pad + insert_slice
when the pack operation only pads the input tensor. The existing
lowering emits insert_slice operations which do not meet the
rank-reducibility requirements of insert_slice.
This change updates the logic in linalg::lowerPack to first check the
rank-reducibility requirement. When the requirement is not met, the
lowering will emit the full sequence of pad + expand + transpose.
Reviewed By: chelini
Differential Revision: https://reviews.llvm.org/D159382
More information about the All-commits
mailing list