ganler commented on issue #11696:
URL: https://github.com/apache/tvm/issues/11696#issuecomment-1154657453

   Thanks for the bug report! 
   
   However, I think using invalid numerics (i.e., "nan" or "inf") as inputs 
should be considered undefined behavior. "Fixing" may require extra checking 
overhead. According to my experience, there will be lots of such "bugs" in fast 
math. For example, many PyTorch [fast 
math](https://github.com/pytorch/pytorch/blob/429a80dded856cd06bd12bd9118efce5ac13dba3/torch/csrc/jit/tensorexpr/expr.cpp#L150)
 impl does not consider invalid inputs. I guess that is because generally, fast 
math targets best performance with acceptable approximation over valid domains.
   
   Personally, I will avoid fuzzing bugs triggered by NaN/Inf inputs as they 
easily lead to false positives. For example, IEEE 754 even "bans" trichotomy 
for NaN so that `nan == nan` returns `False` in PyTorch/Numpy, etc. (You can 
email me if you are interested in more false-positive stories. :-)
   
   Let me also cc @junrushao1994 for more professional opinions.


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