[mlir][linalg] Allow constant exprs in pack/unpack propagation through elementwise
authorQuinn Dawkins <quinn@nod-labs.com>
Tue, 21 Feb 2023 01:52:49 +0000 (20:52 -0500)
committerQuinn Dawkins <quinn@nod-labs.com>
Wed, 22 Feb 2023 06:31:16 +0000 (01:31 -0500)
commit5f2618fe168fffc62ac9dc1396d32f8d53e79621
treeb1861349090feaddde58e9dd041ad0feca16993f
parentde58a4f163006de0d2f2b905fa0677c83aa326d8
[mlir][linalg] Allow constant exprs in pack/unpack propagation through elementwise

The pack/unpack propagation patterns currently assume all map results
for non-scalar arguments are AffineDimExprs, leading to crashes when the
input operand being packed has constant expressions.

Differential Revision: https://reviews.llvm.org/D144443
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
mlir/test/Dialect/Linalg/data-layout-propagation.mlir