[mlir][linalg][transform][python] Add type arg to MatchOp extension.
authorIngo Müller <ingomueller@google.com>
Tue, 18 Jul 2023 09:07:17 +0000 (09:07 +0000)
committerIngo Müller <ingomueller@google.com>
Wed, 19 Jul 2023 09:15:41 +0000 (09:15 +0000)
commit1dccdf7f49a0cdad7121913c900ce9cb8b6e9fdc
tree6eccbdbf4da7449a302bdf1620a1651c7bb60e21
parent5bc836422e11125a9e4fe6909b85906826a7e670
[mlir][linalg][transform][python] Add type arg to MatchOp extension.

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.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D155567
mlir/python/mlir/dialects/_structured_transform_ops_ext.py
mlir/test/python/dialects/transform_structured_ext.py