[all-commits] [llvm/llvm-project] c08917: [mlir] Add polynomial approximation for math::Log2
Emilio Cota via All-commits
all-commits at lists.llvm.org
Wed Mar 10 14:49:41 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c0891706bc9faf428dfde7feddd8203efc43e118
https://github.com/llvm/llvm-project/commit/c0891706bc9faf428dfde7feddd8203efc43e118
Author: Emilio Cota <ecg at google.com>
Date: 2021-03-10 (Wed, 10 Mar 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::Log2
```
name old cpu/op new cpu/op delta
BM_mlir_Log2_f32/10 134ns ±15% 45ns ± 4% -66.39% (p=0.000 n=20+17)
BM_mlir_Log2_f32/100 1.03µs ±16% 0.12µs ±10% -88.78% (p=0.000 n=20+18)
BM_mlir_Log2_f32/1k 10.3µs ±16% 0.7µs ± 5% -93.24% (p=0.000 n=20+17)
BM_mlir_Log2_f32/10k 104µs ±15% 7µs ±14% -93.25% (p=0.000 n=20+20)
BM_eigen_s_Log2_f32/10 95.3ns ±17% 90.9ns ± 6% ~ (p=0.228 n=20+18)
BM_eigen_s_Log2_f32/100 907ns ± 3% 911ns ± 6% ~ (p=0.539 n=16+20)
BM_eigen_s_Log2_f32/1k 9.88µs ± 4% 9.85µs ± 3% ~ (p=0.790 n=16+17)
BM_eigen_s_Log2_f32/10k 105µs ±10% 110µs ±16% ~ (p=0.459 n=16+20)
BM_eigen_v_Log2_f32/10 32.5ns ±31% 33.9ns ±14% +4.31% (p=0.028 n=17+20)
BM_eigen_v_Log2_f32/100 176ns ± 8% 180ns ± 7% +2.19% (p=0.045 n=16+17)
BM_eigen_v_Log2_f32/1k 1.44µs ± 4% 1.50µs ± 9% +3.91% (p=0.001 n=16+17)
BM_eigen_v_Log2_f32/10k 14.5µs ±10% 15.0µs ± 8% +3.92% (p=0.002 n=16+19)
```
Reviewed By: ezhulenev
Differential Revision: https://reviews.llvm.org/D98282
More information about the All-commits
mailing list