This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Retire LinalgStrategyTileAndFusePass and filter-based pattern.
ClosedPublic

Authored by nicolasvasilache on Oct 10 2022, 12:12 AM.

Details

Summary

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

In the process, also retire tileConsumerAndFuseProducers that is now replaced by tileConsumerAndFuseProducerGreedilyUsingSCFForOp.

Context: https://discourse.llvm.org/t/psa-retire-tileandfuselinalgops-method/63850

When performing this replacement, a change of behavior appeared: the older tileConsumerAndFuseProducers would split the parallel
and non-parallel dimensions automatically and perform a first level of tile-and-fuse on parallel dimensions only and then introduce a
second level of tiling-only on the reduction dimensions. The newer tileConsumerAndFuseProducerGreedilyUsingSCFForOp on the other hand
does not perform this breakdown. As a consequence, the transform specification is evolved to produce the same output.

Additionally, replace some uses of unsigned by int64_t where possible without pulling in larger interface changes (left for a future PR).

Context: https://www.youtube.com/watch?v=Puio5dly9N8

Lastly, tests that were performing tile and fuse and distribute on tensors are retired: the generated IR mixing scf.for, tensors and
distributed processor ids was racy at best ..

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Oct 10 2022, 12:12 AM
ftynse added inline comments.Oct 10 2022, 1:04 AM
mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
19 ↗(On Diff #466442)

I find it surprising to see a transform prefixed with "structured" inside SCF transforms. Why can't this stay with the rest of structured?

nicolasvasilache edited the summary of this revision. (Show Details)

Avoid moving the transform.

mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
19 ↗(On Diff #466442)

I biased towards moving the op closer to where the transform is defined, not fundamental need to, reverted.

ftynse accepted this revision.Oct 10 2022, 2:12 AM
This revision is now accepted and ready to land.Oct 10 2022, 2:12 AM

Properly propagate results in the transform and harden tests.

This revision was landed with ongoing or failed builds.Oct 10 2022, 7:04 AM
This revision was automatically updated to reflect the committed changes.
mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp