[mlir] Fixes to hoist padding
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Wed, 24 Mar 2021 11:24:22 +0000 (11:24 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Wed, 24 Mar 2021 11:51:28 +0000 (11:51 +0000)
commit7716e5535c6b248b5faabd2d1af01415a78da8d7
tree1294d00a922a1898681d8be89870543bf64ca511
parente9015bd59519e205c2205fa413c8af7e677cc65d
[mlir] Fixes to hoist padding

Fix the BlockAndValueMapping update that was missing entries for scf.for op's blockIterArgs.
Skip cloning subtensors of the padded tensor as the logic for these is separate.
Add a filter to drop side-effecting ops.

Tests are beefed up to verify the IR is sound in all hoisting configurations for 2-level 3-D tiled matmul.

Differential Revision: https://reviews.llvm.org/D99255
mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
mlir/test/Dialect/Linalg/hoist-padding.mlir
mlir/test/lib/Transforms/TestLinalgTransforms.cpp