aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/verify
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2023-09-12 14:52:34 +0100
committerEric Kunze <eric.kunze@arm.com>2023-09-13 22:51:30 +0000
commit48df8c7509f51b145e97619a45aa25836e702767 (patch)
treef6a31e55503147a5c46e09705ffd0e84bcae42e0 /reference_model/src/verify
parent51779fdc58b76f416ba22272d822642af417c04c (diff)
downloadreference_model-48df8c7509f51b145e97619a45aa25836e702767.tar.gz
Build compliance verifier library with a python interface.
Build steps to create tosa_reference_verify_lib.so New python class to handle loading and calling verifier with pytests. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Id42c71c398ed7364742b4a039977412ef3081c4a
Diffstat (limited to 'reference_model/src/verify')
-rw-r--r--reference_model/src/verify/verify_config.cc19
-rw-r--r--reference_model/src/verify/verify_dot_product.cc2
2 files changed, 20 insertions, 1 deletions
diff --git a/reference_model/src/verify/verify_config.cc b/reference_model/src/verify/verify_config.cc
new file mode 100644
index 0000000..3bae9b9
--- /dev/null
+++ b/reference_model/src/verify/verify_config.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2023, ARM Limited.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "model_common.h"
+
+// Global instantiation of configuration and debug objects for verify lib
+func_config_t g_func_config;
+func_debug_t g_func_debug;
diff --git a/reference_model/src/verify/verify_dot_product.cc b/reference_model/src/verify/verify_dot_product.cc
index a24f83f..0b05c92 100644
--- a/reference_model/src/verify/verify_dot_product.cc
+++ b/reference_model/src/verify/verify_dot_product.cc
@@ -89,7 +89,7 @@ bool validateData(const double* ref, const double* bnd, const AccType* imp, size
for (size_t i = 0; i < T; ++i)
{
auto out_err = validateElement<AccType>(ref[i], bnd[i], imp[i], KS);
- TOSA_REF_REQUIRE(out_err, "output error is 0");
+ TOSA_REF_REQUIRE(out_err, "data required to be zero or error within range");
out_err_sum += out_err.value();
out_err_sumsq += out_err.value() * out_err.value();
}