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 /reference_model/src/verify/verify_utils.h | |
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 'reference_model/src/verify/verify_utils.h')
-rw-r--r-- | reference_model/src/verify/verify_utils.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/reference_model/src/verify/verify_utils.h b/reference_model/src/verify/verify_utils.h index 45daeac..0fc68fb 100644 --- a/reference_model/src/verify/verify_utils.h +++ b/reference_model/src/verify/verify_utils.h @@ -1,5 +1,5 @@ -// Copyright (c) 2023, ARM Limited. +// Copyright (c) 2023-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. @@ -50,9 +50,9 @@ enum class VerifyMode }; /// \brief ULP verification meta-data -struct UlpInfo +struct UlpVerifyInfo { - UlpInfo() = default; + UlpVerifyInfo() = default; double ulp; }; @@ -75,6 +75,14 @@ struct ReduceProductVerifyInfo int64_t n; }; +/// \brief abs-error verification meta-data +struct AbsErrorVerifyInfo +{ + AbsErrorVerifyInfo() = default; + + double lowerBound; +}; + /// \brief Verification meta-data struct VerifyConfig { @@ -82,9 +90,10 @@ struct VerifyConfig VerifyMode mode; DType dataType; - UlpInfo ulpInfo; + UlpVerifyInfo ulpInfo; DotProductVerifyInfo dotProductInfo; ReduceProductVerifyInfo reduceProductInfo; + AbsErrorVerifyInfo absErrorInfo; }; /// \brief Parse the verification config for a tensor when given in JSON form |