t-vi commented on a change in pull request #10091:
URL: https://github.com/apache/tvm/pull/10091#discussion_r794349364
##########
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 think -inf should stay -inf if we clamp with only max. PyTorch uses
separate implementations kernels for this (kind of the reverse of what we do
here), I don't know if that might be a good choice for TVM.
--
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]