mbrookhart commented on pull request #7731:
URL: https://github.com/apache/tvm/pull/7731#issuecomment-806017937


   I think I agree that merging these with SimplifyExpr would be a win in terms 
of our ability to control the order of execution.
   
   On the simplification of things like `x * const(0)`, you can get the ndarray 
out of the const as ConstantNode->data, and then you can pass that to [this 
utility](https://github.com/apache/tvm/blob/63d8e97dfbe046e70c91c72cbbf7da8646824217/src/relay/transforms/pattern_utils.h#L385),
 which will return a `long double` version of the value, which shouldn't loose 
precision for any of the 64 bit or smaller datatypes we use. You can then do 
your comparison in a single dtype.
   
   I've been meaning to implement this for like 6 months, and I haven't had a 
strong enough forcing function to bubble it up to the top of my priority list.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to