This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Transform dialect: introduce merge_handles op
ClosedPublic

Authored by ftynse on Jul 5 2022, 1:43 AM.

Details

Summary

This Transform dialect op allows one to merge the lists of Payload IR
operations pointed to by several handles into a single list associated with one
handle. This is an important Transform dialect usability improvement for cases
where transformations may temporarily diverge for different groups of Payload
IR ops before converging back to the same script. Without this op, several
copies of the trailing transformations would have to be present in the
transformation script.

Depends On D129090

Diff Detail

Event Timeline

ftynse created this revision.Jul 5 2022, 1:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2022, 1:43 AM
ftynse requested review of this revision.Jul 5 2022, 1:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2022, 1:43 AM
albertcohen added inline comments.
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
135

once

nicolasvasilache accepted this revision.Jul 5 2022, 2:58 AM

Generally looks good modulo the fact that this does not specify what happens with null handles.
I suspect we want to introduce NoOp before we can really use this new op you propose here?

This revision is now accepted and ready to land.Jul 5 2022, 2:58 AM
ftynse added a comment.Jul 5 2022, 4:39 AM

I suspect we want to introduce NoOp before we can really use this new op you propose here?

There are no null handles in any upstream transform op. Null is considered an error state and should not be propagated.

ftynse updated this revision to Diff 442858.Jul 7 2022, 4:12 AM
ftynse marked an inline comment as done.

Address review.

This revision was landed with ongoing or failed builds.Jul 7 2022, 4:20 AM
This revision was automatically updated to reflect the committed changes.