This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Retire LinalgPromotion pattern
ClosedPublic

Authored by nicolasvasilache on Jul 13 2022, 8:14 AM.

Details

Summary

This revision removes the LinalgPromotion pattern and adds a transform.structured.promotion op.
Since the LinalgPromotion transform allows the injection of arbitrary C++ via lambdas, the current
transform op does not handle it.
It is left for future work to decide what the right transform op control is for those cases.

Note the underlying implementation remains unchanged and the mechanism is still controllable by
lambdas from the API.

During this refactoring it was also determined that the dynamicBuffers option does not actually
connect to a change of behavior in the algorithm.
This also exhibits that the related test is wrong (and dangerous).
Both the option and the test are therefore removed.

Lastly, a test that connects patterns using the filter-based mechanism is removed: all the independent
pieces are already tested separately.

Context: https://discourse.llvm.org/t/psa-retire-linalg-filter-based-patterns/63785

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jul 13 2022, 8:14 AM
nicolasvasilache edited the summary of this revision. (Show Details)

Finish updating tests.

springerm accepted this revision.Jul 14 2022, 4:56 AM
springerm added inline comments.
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
248

operations

251

handle points

This revision is now accepted and ready to land.Jul 14 2022, 4:56 AM

Address review.

This revision was landed with ongoing or failed builds.Jul 14 2022, 5:39 AM
This revision was automatically updated to reflect the committed changes.
mlir/test/Dialect/Linalg/promotion_options.mlir