diff options
author | Fabian Mora <fmora.dev@gmail.com> | 2025-06-19 05:47:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-19 11:47:44 +0200 |
commit | 97c1a2444574b32dd7a283c53be248c5dbbf62e9 (patch) | |
tree | ddad59823395dabfc73c8feab73dea4761204b4f /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c0a9c908a697a150f797d0dff7f0bcd3782abed9 (diff) | |
download | llvm-97c1a2444574b32dd7a283c53be248c5dbbf62e9.zip llvm-97c1a2444574b32dd7a283c53be248c5dbbf62e9.tar.gz llvm-97c1a2444574b32dd7a283c53be248c5dbbf62e9.tar.bz2 |
[mlir][linalg] Add option to pad dynamic dims to `linalg::rewriteAsPaddedOp` (#144354)
This patch makes the following changes:
- Add a `ValueRange typeDynDims` argument to
`linalg::makeComposedPadHighOp`, allowing to pad a tensor with dynamic
dimensions using `tensor::createPadHighOp`.
- Add a `DenseMap<std::pair<unsigned, unsigned>, OpFoldResult>
sizeToPadTo;` option to `LinalgPaddingOptions`. This option allows
setting the size to use when padding a dimension of an operand, allowing
to pad operands even in the case they don't have a constant upper
bounding box. If the value is not provided, then the constant upper
bound is used by default.
- Add a `use_prescribed_tensor_shapes` option to
`transform.structured.pad`. If set to true then `tensor.dim` will be
used as dimensions to compute the size of the padded dim instead of
computing the constant upper bound.
- This patch also changes the behavior for computing the padded shape
`linalg::rewriteAsPaddedOp`, by using the newly added options in
`LinalgPaddingOptions`.
- Finally it adds tests verifying the behavior.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions