This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add peeling xform to Codegen Strategy
ClosedPublic

Authored by dcaballe on Jun 1 2022, 5:46 PM.

Details

Summary

This patch adds the knobs to use peeling in the codegen strategy
infrastructure.

Diff Detail

Event Timeline

dcaballe created this revision.Jun 1 2022, 5:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 5:46 PM
dcaballe requested review of this revision.Jun 1 2022, 5:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 5:46 PM
springerm accepted this revision.Jun 3 2022, 12:39 AM
springerm added inline comments.
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
975–976

I would add a comment here saying that the order in which nested loops appear in the SmallVector affects the peeling. I.e., whether partial iterations will be peeled or not. (That's why it is a SmallVector and not a DenseSet.)

983

Can this struct go into an anonymous namespace in the .cpp file?

1003

nit: Both fields can be const.

mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp
290
if (failed(apply....))
  signalPassFailure();
This revision is now accepted and ready to land.Jun 3 2022, 12:39 AM
dcaballe updated this revision to Diff 434086.Jun 3 2022, 11:41 AM
dcaballe marked 3 inline comments as done.

Addressed feedback

Thanks. I'll commit it in a while.

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

I'm not sure but probably better to keep it here for consistency with the other transformations that have a similar ones in this file?

This revision was landed with ongoing or failed builds.Jun 3 2022, 2:32 PM
This revision was automatically updated to reflect the committed changes.