This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Reviewers
nicolasvasilache
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