Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix ONNX symbolic for argmin and argmax#18261

Closed
houseroad wants to merge 1 commit into
pytorch:masterfrom
houseroad:fix_onnx_argmin_argmax
Closed

Fix ONNX symbolic for argmin and argmax#18261
houseroad wants to merge 1 commit into
pytorch:masterfrom
houseroad:fix_onnx_argmin_argmax

Conversation

@houseroad
Copy link
Copy Markdown
Member

Fix the problem introduced in #17103

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Comment thread torch/onnx/symbolic.py

@parse_args('v', 'i', 'i')
def _argmax(g, input, dim, keepdim):
def argmax(g, input, dim, keepdim):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What would happen if dim=None? Does this need special handling?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is another feature we need to support. if dim is None, if it will do the argmax on the flattened tensor. I will add this support in a different PR.

@houseroad
Copy link
Copy Markdown
Member Author

#18263 to track this issue. I will land this diff as it is to fix the CI.

@VitalyFedyunin
Copy link
Copy Markdown
Contributor

Thanks for fixing it so fast!

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fix the problem introduced in pytorch#17103
Pull Request resolved: pytorch#18261

Reviewed By: bddppq

Differential Revision: D14558781

Pulled By: houseroad

fbshipit-source-id: 7bb50072e77d1d7b2a93f4011fa1362f26e9df1c
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.

5 participants