aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/ops/activation_funcs.cc
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2024-01-03 10:54:12 +0000
committerEric Kunze <eric.kunze@arm.com>2024-01-08 21:40:41 +0000
commitd80ea5e11e5f92e0f7c08afeba74cb7d1719987b (patch)
tree25589c928c95de3de8bbad96dc07432bd9d289f9 /reference_model/src/ops/activation_funcs.cc
parent2936f13d0e26c394333495ce909740eaf58a45cc (diff)
downloadreference_model-d80ea5e11e5f92e0f7c08afeba74cb7d1719987b.tar.gz
Main Conformance: Re-adjust TANH compliance check
Add lower bound to ABS ERROR checks to allow for cancellation of small values in error bounds checking. Re-adjust the error bounds multiplier to match the specification. Fix up naming of verify library info structs. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I3e178c3d7d59fef9c3696178646b23ed2a3ffc61
Diffstat (limited to 'reference_model/src/ops/activation_funcs.cc')
-rw-r--r--reference_model/src/ops/activation_funcs.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/reference_model/src/ops/activation_funcs.cc b/reference_model/src/ops/activation_funcs.cc
index 787055c..c8fdc74 100644
--- a/reference_model/src/ops/activation_funcs.cc
+++ b/reference_model/src/ops/activation_funcs.cc
@@ -1,5 +1,5 @@
-// Copyright (c) 2020-2023, ARM Limited.
+// Copyright (c) 2020-2024, ARM Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -123,8 +123,8 @@ int OpTanh<Rank, Dtype>::register_fcn()
case TOSA_REF_TYPE_FP64:
if (g_func_config.abs_mode)
{
- // ABS_ERROR bounds return 8*(1+abs(a))
- this->fcn = [](InEigenType a) -> OutEigenType { return 8.0 * (1.0 + (a > (InEigenType)0 ? a : (-a))); };
+ // ABS_ERROR bounds return 4*(1+abs(a))
+ this->fcn = [](InEigenType a) -> OutEigenType { return 4.0 * (1.0 + (a > (InEigenType)0 ? a : (-a))); };
}
else
{