Skip to content
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

add canonicalize of DynamicReshapeOp. #1954

Conversation

linuxlonelyeagle
Copy link
Contributor

No description provided.

Copy link

google-cla bot commented Jan 26, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@linuxlonelyeagle
Copy link
Contributor Author

@ghpvnist Can you review the code for me? Or if you have any comments, let me know, I'd love to know what you guys think about this PR.

@linuxlonelyeagle
Copy link
Contributor Author

I have some questions? If this PR makes sense, do I need to add some files for testing ? If there is one in mlir-hlo, where should I find it. Besides that, the canonicalize addition I refer to mlir-hlo, but now this PR doesn't look elegant, too many files added to add canonicalize, do you have any idea?

@GleasonK
Copy link
Member

Thank you for the PR! Could you say more about your use case for StableHLO canonicalization? Does your project depend directly on the StableHLO repo and not on openxla/xla?

The reason I ask, is that currently StableHLO has no canonicalizations, as it is was decided in a previous community discussion that StableHLO is an input dialect and transformations go on MHLO. Personally, I'm in favor of having opt-in StableHLO canonicalization patterns like this in the repo, as it avoids other projects duplicating patterns - for example here are IREE canonicalization patterns for StableHLO which could also be upstreamed and shared among the StableHLO community.

In the current setup, all canonicalization is done on MHLO in xla/mlir_hlo/mhlo/transforms. This assumes that a project depends on XLA, which isn't always the case. Before we submit this change, we'll need to start a discussion on the topic in OpenXLA Discuss to ensure community alignment.

I was hoping to start up a conversation about this exact topic in the coming month, so I'm glad to see this contribution :). Perhaps we can collaborate on that openxla-discuss post!

cc @jpienaar who was also interested in upstreaming some patterns to the repo.

@GleasonK GleasonK self-requested a review January 26, 2024 17:19
Copy link
Member

@GleasonK GleasonK left a comment

Choose a reason for hiding this comment

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

Adding blocking review until we establish community precedence for canonicalizations in StableHLO.

@linuxlonelyeagle
Copy link
Contributor Author

@GleasonK I apologize for being a little late in replying to you, I started a discuss here.

@GleasonK
Copy link
Member

Great! Thank you! I'm getting the right people to take a look at it, will report back tomorrow with an update!

@linuxlonelyeagle
Copy link
Contributor Author

close by #1984.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants