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

[torch] Use try_infer_value for clamp min/max #7712

Merged
merged 1 commit into from
Mar 20, 2021

Conversation

apivovarov
Copy link
Contributor

@apivovarov apivovarov commented Mar 20, 2021

In some cases torch.clamp(min,max) operator has min and max parameters which are Constant or Expr.
This PR adds support for the cases when min and max parameters are Constant or Expr which can be infered.

Related Discussion: https://discuss.tvm.apache.org/t/relay-clip-operator-with-dynamic-min-max-fails/9466

@masahi

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM

@masahi masahi merged commit 27f1085 into apache:main Mar 20, 2021
@apivovarov apivovarov deleted the clamp_try_infer_value branch March 20, 2021 21:43
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
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.

3 participants