You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "HongHongHongL (via GitHub)" <gi...@apache.org> on 2023/10/25 08:55:33 UTC
[PR] [Unity] Add fast_pow in FastMathTransform pass [tvm]
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-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Unity] Add fast_pow in FastMathTransform pass [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed pull request #15979: [Unity] Add fast_pow in FastMathTransform pass
URL: https://github.com/apache/tvm/pull/15979
--
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-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org