[mlir][math] Modified the 'math.exp' lowering for higher precision
authorRobert Suderman <suderman@google.com>
Fri, 23 Jun 2023 18:48:33 +0000 (11:48 -0700)
committerRob Suderman <suderman@google.com>
Fri, 23 Jun 2023 19:25:18 +0000 (12:25 -0700)
commit710dc7282a013830695fa7aa1559f1c96cb43b51
tree568c785fb495ab03a7e5782a6945b9c264db46d0
parenta2f5bcc766fb77118630e13c91c3f3f2fd43420a
[mlir][math] Modified the 'math.exp' lowering for higher precision

The existing lowering has lower precision for certain use cases, e.g.
tanh. Improved version should demonstrate an overall higher level of precision.

Reviewed By: cota, jpienaar

Differential Revision: https://reviews.llvm.org/D153592
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
mlir/test/Dialect/Math/polynomial-approximation.mlir
mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir