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] refactor amax, max, max.dim's lowering to stablehlo #3348

Merged
merged 2 commits into from
May 15, 2024

Conversation

qingyunqu
Copy link
Collaborator

  • not to decompose aten.amax on stablehlo backend. Because it could be lowering to stablehlo.reduce directly.
  • lowering aten.max.dim to stablehlo.reduce apply max when AtenMaxDimOp.getIndices() doesn't have users. It's more simple.

Copy link
Collaborator

@Vremold Vremold left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the effort!

@qingyunqu qingyunqu merged commit 5928f68 into llvm:main May 15, 2024
3 checks passed
BaneTrifa pushed a commit to BaneTrifa/torch-mlir that referenced this pull request May 24, 2024
…#3348)

* not to decompose `aten.amax` on `stablehlo` backend. Because it could
be lowering to `stablehlo.reduce` directly.
* lowering `aten.max.dim` to `stablehlo.reduce apply max` when
`AtenMaxDimOp.getIndices()` doesn't have users. It's more simple.
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