AndrewZhaoLuo opened a new pull request #9558:
URL: https://github.com/apache/tvm/pull/9558


   We switch the order of some operations. This is to stop an edge case where 
casting a float with NaNs, or infinity leads to undefined behavior.
   
   In my experience, casting a +inf to int32 led to the minimum int32 value on 
x86 (a 5900X - zen3) while on an m1 mac led to the maximum int32 value. This 
fixes this by moving the clipping operation to operate on the floating point 
values before casting to integer.


-- 
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]


Reply via email to