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] fix compareOp with scalar's lowering #3518

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

qingyunqu
Copy link
Collaborator

  • use lhs tensor's element type as compute type when rhs is scalar.
  • previously a != 1.0(a is a fp32 tensor) will lowering to %6 = stablehlo.compare EQ, %4, %5, FLOAT : (tensor<2x5xf64>, tensor<2x5xf64>) -> tensor<2x5xi1>
  • now it will lowering to %6 = stablehlo.compare EQ, %4, %5, FLOAT : (tensor<2x5xf32>, tensor<2x5xf32>) -> tensor<2x5xi1>

@qingyunqu qingyunqu requested a review from Vremold July 2, 2024 07:15
@qingyunqu qingyunqu merged commit f1e3701 into llvm:main Jul 2, 2024
3 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.

None yet

2 participants