-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
f32-vtanh
microkernels using a 9/6 rational polynomial ap…
…proximation. The coefficients of the rational polynomial were computed using a variant of the Remez algorithm to minimize the relative error in the range `[-8, 8]`. The approximation has a maximum relative error of `5.36e-7` or `4.79e-7` (4.5 or 4 ULP), for non-FMA and FMA evaluation, respectively. Evaluating the rational approximant is ~1.5x faster than the current implementations for `SSE2`, `AVX`, `FMA3`, and `AVX512`. This change also fixes a minor issue in which the `AVX512SKX` microkernels were returning `1.0f` for `NaN` inputs, which was picked up by the newly added tests. PiperOrigin-RevId: 630967750
- Loading branch information
1 parent
637f676
commit 204fd5a
Showing
173 changed files
with
29,199 additions
and
5,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.