HongHongHongL opened a new pull request, #15979:
URL: https://github.com/apache/tvm/pull/15979

   This PR uses fast_exp to convert power op to fast but approximate 
counterpart.
   
   When y is not an integer, fast_exp(log(x) * y) is much faster than 
topi.power(x, y). However, if y is not a constant, fast_exp(log(x) * y) will 
get a wrong anwser when x < 0 and y is an integer. To fix this problem, this PR 
uses power(x, y) = exp(log(abs(x)) * y) * (log((x / abs(x) - 1) * (ceil(y) - 
floor(y)) + 1) + (x / abs(x) - 1) * (y % 2) + 1).


-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to