This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Update failure conditions for padOperandToSmallestStaticBoundingBox.
ClosedPublic

Authored by gysit on Nov 18 2021, 6:32 AM.

Details

Summary

Change the failure condition of padOperandToSmallestStaticBoundingBox to never fail if the operand is already statically sized.

In particular:

  • if the padding value computation fails -> return failure if the operand shape is dynamic and success if it is static.
  • if there is no extract slice op -> return failure if the operand shape is dynamic and success if it is static.

The latter change prevents padding from failure if the output operand passed by iteration argument is statically sized since in this case the extract / insert slice pairs are removed by canonicalization.

Depends On D114153

Diff Detail

Event Timeline

gysit created this revision.Nov 18 2021, 6:32 AM
gysit requested review of this revision.Nov 18 2021, 6:32 AM
gysit updated this revision to Diff 388421.Nov 19 2021, 1:37 AM

Rebase.

gysit edited the summary of this revision. (Show Details)Nov 19 2021, 2:01 AM
nicolasvasilache requested changes to this revision.Nov 22 2021, 1:13 AM

Please add a minimal test pass and tests to exercise this.

This revision now requires changes to proceed.Nov 22 2021, 1:13 AM
gysit updated this revision to Diff 388934.Nov 22 2021, 8:54 AM

Address comment.

gysit updated this revision to Diff 388947.Nov 22 2021, 9:22 AM

Improve dynamic extract slice missing test.

nicolasvasilache accepted this revision.Nov 24 2021, 8:43 AM
This revision is now accepted and ready to land.Nov 24 2021, 8:43 AM
This revision was landed with ongoing or failed builds.Nov 24 2021, 11:11 AM
This revision was automatically updated to reflect the committed changes.