This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Add a Transform dialect NavigationOp op to match a list of ops or an interface.
ClosedPublic

Authored by nicolasvasilache on Jul 21 2022, 6:47 AM.

Details

Summary

This operation is a NavigationOp that simplifies the writing of transform IR.
Since there is no way of refering to an interface by name, the current implementation uses
an EnumAttr and depends on the interfaces it supports.
In the future, it would be worthwhile to remove this dependence and generalize.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
nicolasvasilache requested review of this revision.Jul 21 2022, 6:47 AM
springerm accepted this revision.Jul 21 2022, 7:07 AM
springerm added inline comments.
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
140

remove

155–156

nit: Write as #### Return modes for consistency

167

Arg<PDL_Operation, "", [TransformMappingRead]>

Maybe also needs PayloadIRRead (?)

171

Res<PDL_Operation, "", [TransformMappingAlloc, TransformMappingWrite]>

This revision is now accepted and ready to land.Jul 21 2022, 7:07 AM
nicolasvasilache marked 4 inline comments as done.Jul 21 2022, 7:10 AM
nicolasvasilache added inline comments.
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
140

I believe this is necessary for / handled by NavigationTransformOpTrait

155–156

Good point, thanks!

167

I believe this is necessary for / handled by NavigationTransformOpTrait

171

I believe this is necessary for / handled by NavigationTransformOpTrait

nicolasvasilache marked 4 inline comments as done.

Fix doc.

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