aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/verify/verifiers.h
diff options
context:
space:
mode:
authorJack Frankland <jack.frankland@arm.com>2023-09-13 15:47:48 +0100
committerJeremy Johnson <jeremy.johnson@arm.com>2023-10-02 11:30:47 +0100
commit62737b15a30e431dcefaaf28001f304e46598fc6 (patch)
treec22f4e3cb416eda3105f9bff903d698dace2f35f /reference_model/src/verify/verifiers.h
parentfbf76784f8ec9650f25d4debfd599bd095cf41c2 (diff)
downloadreference_model-62737b15a30e431dcefaaf28001f304e46598fc6.tar.gz
Add ULP verification for fp32
Add a verifier to check two results are correct within a certain ULP tolerance for IEEE-754 32-bit floating point values. Add a test to check the ULP verifier is correct. Signed-off-by: Jack Frankland <jack.frankland@arm.com> Change-Id: Iaf43069f300999479d998e7837746b247ca5177e
Diffstat (limited to 'reference_model/src/verify/verifiers.h')
-rw-r--r--reference_model/src/verify/verifiers.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/reference_model/src/verify/verifiers.h b/reference_model/src/verify/verifiers.h
index 177eeaf..bdc8fe7 100644
--- a/reference_model/src/verify/verifiers.h
+++ b/reference_model/src/verify/verifiers.h
@@ -41,6 +41,15 @@ bool verifyDotProduct(const CTensor* ref,
/// \return True if compliant else false
bool verifyExact(const CTensor* referenceTensor, const CTensor* implementationTensor);
+/// \brief Perform ULP result verification
+///
+/// \param referenceTensor Reference tensor
+/// \param implementationTensor Implementation resulting tensor
+/// \param ulp The ULP tolerence for the comparison of the two tensors
+///
+/// \return True if compliant else false
+bool verifyULP(const CTensor* referenceTensor, const CTensor* implementationTensor, uint64_t ulp);
+
}; // namespace TosaReference
#endif // VERIFIERS_H_