Skip to content

[mlir][linalg][transform][python] Drop _get_op_result... from mix-ins. #65726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ingomueller-net
Copy link
Contributor

_get_op_result_or_value was used in mix-ins to unify the handling of op results and values. However, that function is now called in the generated constructors, such that doing so in the mix-ins is not necessary anymore.

`_get_op_result_or_value` was used in mix-ins to unify the handling of
op results and values. However, that function is now called in the
generated constructors, such that doing so in the mix-ins is not
necessary anymore.
@ingomueller-net ingomueller-net requested a review from a team as a code owner September 8, 2023 08:50
@github-actions github-actions bot added mlir:python MLIR Python bindings mlir labels Sep 8, 2023
@ingomueller-net
Copy link
Contributor Author

@ftynse: Do you want to take a look at this or whom should I ask?

super().__init__(
pdl.OperationType.get(), _get_op_result_or_value(target), loc=loc, ip=ip
)
super().__init__(pdl.OperationType.get(), target, loc=loc, ip=ip)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this commit, but since we are in cleanup mode, can we replace all this pdl with transform.any_op?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, that answers a question of mine ("whether and why we needed the PDL types"). OK, will do.

@ingomueller-net ingomueller-net merged commit 360c629 into llvm:main Sep 14, 2023
@ingomueller-net ingomueller-net deleted the python-structured-transform-get-op-result branch September 14, 2023 15:24
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
llvm#65726)

`_get_op_result_or_value` was used in mix-ins to unify the handling of
op results and values. However, that function is now called in the
generated constructors, such that doing so in the mix-ins is not
necessary anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:python MLIR Python bindings mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants