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

Remove uses of ArgResultAliasAttr as it is not used, specced, or supported in VHLO #1421

Merged
merged 5 commits into from
Jun 22, 2023

Conversation

GleasonK
Copy link
Member

Was looking at VHLO code coverage for serialization and realized the only unused attribute is ArgResultAliasAttr, because it was unsupported in VHLO legalizations. Speaking with @burmako it sounds like this attribute is unused and should not be in StableHLO/VHLO currently without an RFC first.

This is not an incompatibility since serialization would fail for programs that use this attribute currently.

Adding @sdasgup3 as reviewer as well for spec implications (should be none?)

@sdasgup3
Copy link
Member

@GleasonK Just wanted to make sure that we will be having a separate Frontend contract ticket to remove the same from StableHLO per #1155. Is that right?

@burmako burmako removed their assignment Apr 22, 2023
@burmako
Copy link
Contributor

burmako commented Apr 22, 2023

Removing my assignment for now to get a review from @sdasgup3 first. I'll chime in afterwards.

@sdasgup3 sdasgup3 assigned GleasonK and unassigned sdasgup3 Apr 28, 2023
@burmako burmako assigned burmako and unassigned GleasonK May 2, 2023
Copy link
Contributor

@burmako burmako left a comment

Choose a reason for hiding this comment

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

I agree that this attribute can be removed without an RFC. To the best of my knowledge, it is unused (I added it to StableHLO in August when forking from MHLO, where it is currently unused as well).

Overall, the functionality implemented by this attribute is useful. Buffer donation is an important feature of the XLA compiler, so we should be able to represent it in StableHLO per the overall philosophy that we expose HLO semantics that existed at the time of forking MHLO into StableHLO. It's just that this has to be done in a deliberate way, and we have #740 to follow up on this.

Therefore, the overall idea behind this PR is LGTM. I have left a few minor comments - please feel free to merge after they are addressed.

stablehlo/dialect/StablehloBytecode.cpp Outdated Show resolved Hide resolved
stablehlo/dialect/StablehloOps.cpp Outdated Show resolved Hide resolved
stablehlo/dialect/StablehloOps.cpp Outdated Show resolved Hide resolved
@burmako burmako assigned GleasonK and unassigned burmako May 2, 2023
@burmako
Copy link
Contributor

burmako commented Jun 2, 2023

@GleasonK Gentle ping. If I recall correctly, the proposed changes are fairly lightweight, so I think we should be fairly close to merging this after some minor follow-up work.

@GleasonK GleasonK merged commit 72a0117 into openxla:main Jun 22, 2023
@GleasonK GleasonK deleted the arg-alias-cleanup branch July 10, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants