HomePhabricator

[mlir][linalg] Update failure conditions for…

Authored by gysit on Wed, Nov 24, 11:03 AM.

Description

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

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

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D114161