[all-commits] [llvm/llvm-project] 1c0374: [mlir] Add polynomial approximation for math::Log1p
Emilio Cota via All-commits
all-commits at lists.llvm.org
Mon May 3 15:11:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1c0374e770956037764f9cae8a5e35ec7cefcdc5
https://github.com/llvm/llvm-project/commit/1c0374e770956037764f9cae8a5e35ec7cefcdc5
Author: Emilio Cota <ecg at google.com>
Date: 2021-05-03 (Mon, 03 May 2021)
Changed paths:
M mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
M mlir/test/Dialect/Math/polynomial-approximation.mlir
M mlir/test/mlir-cpu-runner/math_polynomial_approx.mlir
Log Message:
-----------
[mlir] Add polynomial approximation for math::Log1p
This approximation matches the one in Eigen.
```
name old cpu/op new cpu/op delta
BM_mlir_Log1p_f32/10 83.2ns ± 7% 34.8ns ± 5% -58.19% (p=0.000 n=84+71)
BM_mlir_Log1p_f32/100 664ns ± 4% 129ns ± 4% -80.57% (p=0.000 n=82+82)
BM_mlir_Log1p_f32/1k 6.75µs ± 4% 0.81µs ± 3% -88.07% (p=0.000 n=88+79)
BM_mlir_Log1p_f32/10k 76.5µs ± 3% 7.8µs ± 4% -89.84% (p=0.000 n=80+80)
BM_eigen_s_Log1p_f32/10 70.1ns ±14% 72.6ns ±14% +3.49% (p=0.000 n=116+112)
BM_eigen_s_Log1p_f32/100 706ns ± 9% 717ns ± 3% +1.60% (p=0.018 n=117+80)
BM_eigen_s_Log1p_f32/1k 8.26µs ± 1% 8.26µs ± 1% ~ (p=0.567 n=84+86)
BM_eigen_s_Log1p_f32/10k 92.1µs ± 5% 92.6µs ± 6% +0.60% (p=0.047 n=115+115)
BM_eigen_v_Log1p_f32/10 31.8ns ±24% 34.9ns ±17% +9.72% (p=0.000 n=98+96)
BM_eigen_v_Log1p_f32/100 169ns ±10% 177ns ± 5% +4.66% (p=0.000 n=119+81)
BM_eigen_v_Log1p_f32/1k 1.42µs ± 4% 1.46µs ± 8% +2.70% (p=0.000 n=93+113)
BM_eigen_v_Log1p_f32/10k 14.4µs ± 5% 14.9µs ± 8% +3.61% (p=0.000 n=115+110)
```
Reviewed By: ezhulenev, ftynse
Differential Revision: https://reviews.llvm.org/D101765
More information about the All-commits
mailing list