This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform] Add notifyPayloadOperationReplaced to TransformRewriter
ClosedPublic

Authored by springerm on Jun 26 2023, 6:48 AM.

Details

Summary

This function allows users to update payload op mappings in cases where such replacements cannot be performed automatically by the rewriter/listener interface.

Diff Detail

Event Timeline

springerm created this revision.Jun 26 2023, 6:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 6:48 AM
springerm requested review of this revision.Jun 26 2023, 6:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 6:48 AM
ftynse accepted this revision.Jun 26 2023, 7:50 AM
ftynse added inline comments.
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
994

Nit: s/manually/automatically

mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
771–772

I'd rather return definite failure here.

mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
883

Nit: use for (auto &&[original, replacement] : zip) instead of obnoxious std::get below.

This revision is now accepted and ready to land.Jun 26 2023, 7:50 AM
springerm marked 3 inline comments as done.Jun 26 2023, 8:28 AM
springerm added inline comments.
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
771–772

If this fails it means that tileAndFuseFirstExtractUse was updated without updating the remaining code base. (It only fails if the original op is not tracked.) I think this can stay as an assertion.

This revision was landed with ongoing or failed builds.Jun 26 2023, 8:29 AM
This revision was automatically updated to reflect the committed changes.
springerm marked an inline comment as done.