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

[stablehlo][tosa] Fix for tosa dialect updates #2756

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

Tai78641
Copy link
Contributor

@Tai78641 Tai78641 commented Mar 24, 2025

This fixes up legalization passes for converting to/from tosa for tosa dialect changes

  • tosa rescale has multiplier, shift, input_zp, output_zp changed from attribute to operands with specific type requirements
  • tosa rescale attribute "double_round" changed to "rounding_mode"
  • tosa negate has additional input_zp and output_zp operands
  • tosa const attribute name changed from "value" to "values"

@Tai78641
Copy link
Contributor Author

this address the issue: #2751 (comment)
but note that this fixes the code and tests for recent tosa dialect changes merged into llvm up to and including:
llvm/llvm-project#130340 (which has yet to be pulled into stablehlo's llvm-project)

This fixes up legalization passes for converting to/from tosa
for tosa dialect changes

- tosa rescale has multiplier, shift, input_zp, output_zp changed from attribute to operands with specific type requirements
- tosa rescale attribute "double_round" changed to "rounding_mode"
- tosa negate has additional input_zp and output_zp operands
- tosa const attribute name changed from "value" to "values"

Signed-off-by: Tai Ly <[email protected]>
Change-Id: I38d31eacde961e7673bc3577dfbf55616608dc5e
@Tai78641 Tai78641 force-pushed the pr_fix_for_tosa_updates branch from 9950dc3 to 73cbe57 Compare March 24, 2025 15:16
@GleasonK
Copy link
Member

Thanks for the fixes!

@GleasonK GleasonK merged commit 44e2d2f into openxla:main Mar 24, 2025
10 checks passed
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