masahi commented on a change in pull request #10091:
URL: https://github.com/apache/tvm/pull/10091#discussion_r794377291
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -1769,10 +1780,27 @@ def get_v(v, default_v):
return v
return default_v
- amin = get_v(inputs[1], np.finfo(np.float32).min)
- amax = get_v(inputs[2], np.finfo(np.float32).max)
+ if min_only:
+ amin = get_v(inputs[1], np.finfo(np.float32).min)
Review comment:
I see, that makes sense. Probably the best way for us is to allow `None`
value in `clip` op for one-way clipping, and do only `max` or `min` inside
topi. I left a TODO item for that.
Probably other op conversions also have issues with `inf` handling...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]