Page MenuHomePhabricator

[mlir][linalg] Fix pad tensor cast folding with changed type
ClosedPublic

Authored by cathyzhyi on Jul 26 2021, 12:19 PM.

Details

Summary

PadTensorOp has verification logic to make sure
result dim must be static if all the padding values are static.
Cast folding might add more static information for the src operand
of PadTensorOp which might change a valid operation to be invalid.
Change the canonicalizing pattern to fix this.

Diff Detail

Event Timeline

cathyzhyi created this revision.Jul 26 2021, 12:19 PM
cathyzhyi requested review of this revision.Jul 26 2021, 12:19 PM

remove redundant argument

cathyzhyi retitled this revision from [mlir][linalg] Fix pad tensor cast folding with changed type to [mlir][linalg][WIP] Fix pad tensor cast folding with changed type.Jul 26 2021, 12:39 PM
cathyzhyi retitled this revision from [mlir][linalg][WIP] Fix pad tensor cast folding with changed type to [mlir][linalg] Fix pad tensor cast folding with changed type.Jul 26 2021, 1:52 PM
rsuderman accepted this revision.Jul 29 2021, 2:09 PM
rsuderman added inline comments.
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
1245

Can you document what the nullptr represents? Its useful for understanding.

This revision is now accepted and ready to land.Jul 29 2021, 2:09 PM
cathyzhyi updated this revision to Diff 362883.Jul 29 2021, 2:16 PM

address comments

cathyzhyi marked an inline comment as done.Jul 29 2021, 2:46 PM
cathyzhyi closed this revision.Jul 30 2021, 11:38 AM