Skip to content

[ONNX] Support clamp_min and clamp_max#37872

Closed
BowenBao wants to merge 1 commit intopytorch:masterfrom
BowenBao:clip_update
Closed

[ONNX] Support clamp_min and clamp_max#37872
BowenBao wants to merge 1 commit intopytorch:masterfrom
BowenBao:clip_update

Conversation

@BowenBao
Copy link
Copy Markdown
Collaborator

@BowenBao BowenBao commented May 5, 2020

clamp_min is used in torch.nn.functional.normalize. Update symbolic_opset11 to support with updated clip in onnx opset 11.

@mruberry mruberry requested a review from houseroad May 5, 2020 22:11
@mruberry mruberry added module: onnx Related to torch.onnx triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 5, 2020
k = torch.tensor(3)
self.run_test(MyModuleDynamic(), [x, k])

@skipIfUnsupportedOpsetVersion([7, 12])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is opset 12 skipped?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess we can enable this after ORT version is updated?

Copy link
Copy Markdown
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Thanks

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.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@houseroad merged this pull request in 7be9796.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
clamp_min is used in `torch.nn.functional.normalize`. Update symbolic_opset11 to support with updated clip in onnx opset 11.
Pull Request resolved: pytorch#37872

Reviewed By: hl475

Differential Revision: D21440450

Pulled By: houseroad

fbshipit-source-id: a59cbec3f4d00c3f6654da6a747fbfca59d618f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: onnx Related to torch.onnx open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants