This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Add a vectorization pattern for linalg::PadTensorOp
ClosedPublic

Authored by nicolasvasilache on Feb 10 2021, 5:16 AM.

Details

Summary

The new pattern is exercised from the TestLinalgTransforms pass.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Feb 10 2021, 5:16 AM

Don't deactivate tests.

ftynse accepted this revision.Feb 10 2021, 5:43 AM
ftynse added inline comments.
mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
228

The comment looks related to low_pad only

mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
818

Nit: minOp looks weird as name here, copy-pasta?

mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
462–464

It looks like it will actually catch zero integer attribute of _any_ type, but zero constant operation of _only index_ type. How about catching all ConstantIntOp instead?

476

Nit: I think you can just use isNotZeroIndex instead of wrapping a lambda into a lambda

510–515

rewriter.reaplceOpWithNewOp ?

This revision is now accepted and ready to land.Feb 10 2021, 5:43 AM
pifon2a accepted this revision.Feb 10 2021, 5:57 AM
nicolasvasilache marked 4 inline comments as done.

Address review.

nicolasvasilache marked an inline comment as done.Feb 10 2021, 6:02 AM
This revision was landed with ongoing or failed builds.Feb 10 2021, 6:17 AM
This revision was automatically updated to reflect the committed changes.