This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Add support for tileFuseAndDistribute on tensors.
ClosedPublic

Authored by hanchung on Feb 23 2022, 4:06 PM.

Details

Summary

This extends TileAndFuse to handle distribution on tensors.

Diff Detail

Event Timeline

hanchung created this revision.Feb 23 2022, 4:06 PM
hanchung requested review of this revision.Feb 23 2022, 4:06 PM
hanchung added inline comments.Feb 23 2022, 4:08 PM
mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
345

We need LinalgLoopDistributionOptions, so we moved the whole section right after distribution section. Only this line is new to the change.

gysit accepted this revision.Feb 24 2022, 12:13 AM

LGTM. I would probably consistently use the term tileDistribution instead of just distribution. However, I am also fine with just distribution if you prefer the short name.

mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
341

nit: /// Tile the root operation using the given tileSizes, tileInterchange, and tileDistribution.

345

nit: I would probably use ̀tileDistribution` to make it more symmetric with the other parameters.

399

nit: I would also use tileDistribution instead of distribution and add it to the comment.

mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
514

nit: I think this extra braces are not needed?

This revision is now accepted and ready to land.Feb 24 2022, 12:13 AM
hanchung updated this revision to Diff 411255.Feb 24 2022, 4:14 PM

Address comments

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