[all-commits] [llvm/llvm-project] b01d22: [mlir][Linalg] Use reify for padded op shape deriv...
Nicolas Vasilache via All-commits
all-commits at lists.llvm.org
Mon Sep 13 04:55:12 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b01d223faf8ac4d62baea8a0e1d7b6cab7938118
https://github.com/llvm/llvm-project/commit/b01d223faf8ac4d62baea8a0e1d7b6cab7938118
Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
Date: 2021-09-13 (Mon, 13 Sep 2021)
Changed paths:
M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
M mlir/test/Dialect/Linalg/tile-pad-tensor-op.mlir
Log Message:
-----------
[mlir][Linalg] Use reify for padded op shape derivation.
Previously, we would insert a DimOp and rely on later canonicalizations.
Unfortunately, reifyShape kind of rewrites are not canonicalizations anymore.
This introduces undesirable pass dependencies.
Instead, immediately reify the result shape and avoid the DimOp altogether.
This is akin to a local folding, which avoids introducing more reliance on `-resolve-shaped-type-result-dims` (similar to compositions of `affine.apply` by construction to avoid chains of size > 1).
It does not completely get rid of the reliance on the pass as the process is merely local: calling the pass may still be necessary for global effects. Indeed, one of the tests still requires the pass.
Differential Revision: https://reviews.llvm.org/D109571
More information about the All-commits
mailing list