This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Let tile and fuse fail for tile sizes zero.
ClosedPublic

Authored by gysit on Feb 2 2022, 11:55 PM.

Details

Summary

Adapt tileConsumerAndFuseProducers to return failure if the generated tile loop nest is empty since all tile sizes are zero. Additionally, fix LinalgTileAndFuseTensorOpsPattern to return success if the pattern applied successfully.

Diff Detail

Event Timeline

gysit created this revision.Feb 2 2022, 11:55 PM
gysit requested review of this revision.Feb 2 2022, 11:55 PM

This is a follow up to https://reviews.llvm.org/D118576. I am happy to keep the early exit if all tile sizes are zero just removed it to demonstrate that tileConsumerAndFuseProducers now returns failure if all tile sizes are zero (instead of an invalid tile loop nest).

mravishankar accepted this revision.Feb 3 2022, 10:22 AM
mravishankar added inline comments.
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
595

Change looks fine. But would rather keep this to provide better diagnostics with -debug.

This revision is now accepted and ready to land.Feb 3 2022, 10:22 AM
gysit updated this revision to Diff 406040.Feb 4 2022, 10:58 AM

Address comment and fix test.

gysit updated this revision to Diff 406049.Feb 4 2022, 11:12 AM

Fix warning.

This revision was landed with ongoing or failed builds.Feb 4 2022, 11:22 AM
This revision was automatically updated to reflect the committed changes.