diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2024-01-03 10:54:12 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2024-01-08 21:40:41 +0000 |
commit | d80ea5e11e5f92e0f7c08afeba74cb7d1719987b (patch) | |
tree | 25589c928c95de3de8bbad96dc07432bd9d289f9 /verif/generator/tosa_test_gen.py | |
parent | 2936f13d0e26c394333495ce909740eaf58a45cc (diff) | |
download | reference_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 'verif/generator/tosa_test_gen.py')
-rw-r--r-- | verif/generator/tosa_test_gen.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/verif/generator/tosa_test_gen.py b/verif/generator/tosa_test_gen.py index 2290c54..5129e24 100644 --- a/verif/generator/tosa_test_gen.py +++ b/verif/generator/tosa_test_gen.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, ARM Limited. +# Copyright (c) 2020-2024, ARM Limited. # SPDX-License-Identifier: Apache-2.0 import json import os @@ -349,6 +349,10 @@ class TosaTestGen: mode = gtu.ComplianceMode.REDUCE_PRODUCT elif op["op"] in (Op.EXP, Op.POW, Op.TANH, Op.SIGMOID): mode = gtu.ComplianceMode.ABS_ERROR + if "compliance" in op and "abs_error_lower_bound" in op["compliance"]: + compliance_tens["abs_error_info"] = { + "lower_bound": op["compliance"]["abs_error_lower_bound"] + } else: mode = gtu.ComplianceMode.EXACT compliance_tens["mode"] = gtu.ComplianceMode(mode).name @@ -3262,6 +3266,9 @@ class TosaTestGen: "data_gen": { "fp": (gtu.DataGenType.PSEUDO_RANDOM,), }, + "compliance": { + "abs_error_lower_bound": 0.5, + }, }, "erf": { "op": Op.ERF, |