diff options
author | Marat Dukhan <maratek@google.com> | 2022-02-19 10:28:37 -0800 |
---|---|---|
committer | XNNPACK Team <xnnpack-github-robot@google.com> | 2022-02-19 10:29:21 -0800 |
commit | a536847db1c08c5876a410ecc24ce3b2fa0a31ed (patch) | |
tree | 0559cc7b5448a38ef033c570a6e9d5e1d7aaf6b4 /eval | |
parent | e853881cf18d8b1c8de7ea4eba870305fc6a0006 (diff) | |
download | XNNPACK-a536847db1c08c5876a410ecc24ce3b2fa0a31ed.tar.gz |
Updated F16 SIGMOID accuracy evaluation stubs for NEON+FP16ARITH
- Add versions using degree-2 polynomial approximations
- Add versions using 1 Newton-Raphson iteration with FMA and RECPS
- Remove versions using single-step range reduction with approximate reciprocal
as even the version with division doesn't attain 5 ULP accuracy
PiperOrigin-RevId: 429780313
Diffstat (limited to 'eval')
-rw-r--r-- | eval/f16-sigmoid-ulp.cc | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/eval/f16-sigmoid-ulp.cc b/eval/f16-sigmoid-ulp.cc index 8c4a24dc7..a730e5c54 100644 --- a/eval/f16-sigmoid-ulp.cc +++ b/eval/f16-sigmoid-ulp.cc @@ -137,13 +137,33 @@ static void SigmoidError(benchmark::State& state, } #if XNN_ARCH_ARM64 + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr1_p2_div, + xnn_math_f16_sigmoid__neonfp16arith_rr1_p2_div, + benchmark::utils::CheckNEONFP16ARITH) + ->Unit(benchmark::kMillisecond) + ->Iterations(1); BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr1_p3_div, xnn_math_f16_sigmoid__neonfp16arith_rr1_p3_div, benchmark::utils::CheckNEONFP16ARITH) ->Unit(benchmark::kMillisecond) ->Iterations(1); - BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr1_p3_recpe, - xnn_math_f16_sigmoid__neonfp16arith_rr1_p3_recpe, + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p2_div, + xnn_math_f16_sigmoid__neonfp16arith_rr2_p2_div, + benchmark::utils::CheckNEONFP16ARITH) + ->Unit(benchmark::kMillisecond) + ->Iterations(1); + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p2_nr1fma, + xnn_math_f16_sigmoid__neonfp16arith_rr2_p2_nr1fma, + benchmark::utils::CheckNEONFP16ARITH) + ->Unit(benchmark::kMillisecond) + ->Iterations(1); + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p2_nr1recps, + xnn_math_f16_sigmoid__neonfp16arith_rr2_p2_nr1recps, + benchmark::utils::CheckNEONFP16ARITH) + ->Unit(benchmark::kMillisecond) + ->Iterations(1); + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p2_recpe, + xnn_math_f16_sigmoid__neonfp16arith_rr2_p2_recpe, benchmark::utils::CheckNEONFP16ARITH) ->Unit(benchmark::kMillisecond) ->Iterations(1); @@ -152,6 +172,16 @@ static void SigmoidError(benchmark::State& state, benchmark::utils::CheckNEONFP16ARITH) ->Unit(benchmark::kMillisecond) ->Iterations(1); + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p3_nr1fma, + xnn_math_f16_sigmoid__neonfp16arith_rr2_p3_nr1fma, + benchmark::utils::CheckNEONFP16ARITH) + ->Unit(benchmark::kMillisecond) + ->Iterations(1); + BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p3_nr1recps, + xnn_math_f16_sigmoid__neonfp16arith_rr2_p3_nr1recps, + benchmark::utils::CheckNEONFP16ARITH) + ->Unit(benchmark::kMillisecond) + ->Iterations(1); BENCHMARK_CAPTURE(SigmoidError, neonfp16arith_rr2_p3_recpe, xnn_math_f16_sigmoid__neonfp16arith_rr2_p3_recpe, benchmark::utils::CheckNEONFP16ARITH) |