This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][transform][python] Add type arg to MatchOp extension.
ClosedPublic

Authored by ingomueller-net on Jul 18 2023, 2:11 AM.

Details

Summary

The extension class to MatchOp has a class method called match_op_names.
The previous version of that function did not allow to specify the
result type. This, however, may be useful/necessary if the op consuming
the resulting handle requires a particular type (such as the
bufferization.EmptyTensorToAllocTensorOp). This patch adds an overload
to match_op_names that allows to specify the result type.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 2:11 AM
ingomueller-net requested review of this revision.Jul 18 2023, 2:11 AM
ftynse accepted this revision.Jul 18 2023, 2:25 AM

Can we have a test?

This revision is now accepted and ready to land.Jul 18 2023, 2:25 AM

Addressing @ftynse's comments:

  • Add tests.