Main Compliance testing support for EXP & POW
Added new ABS_ERROR mode to verify lib and ref model.
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: Ifb78290675833d3df7df91a4d6cef336b02b64a4
diff --git a/verif/runner/tosa_test_runner.py b/verif/runner/tosa_test_runner.py
index 984b2d9..876fbdd 100644
--- a/verif/runner/tosa_test_runner.py
+++ b/verif/runner/tosa_test_runner.py
@@ -16,15 +16,15 @@
from runner.tosa_test_presets import TOSA_REFCOMPLIANCE_RUNNER
-def isComplianceModeDotProduct(testDesc):
- """Checks the test descriptor for DOT_PRODUCT compliance mode."""
+def isComplianceAbsModeNeeded(testDesc):
+ """Checks the test descriptor for DOT_PRODUCT/ABS_ERROR compliance mode."""
if (
"meta" in testDesc
and "compliance" in testDesc["meta"]
and "tensors" in testDesc["meta"]["compliance"]
):
for _, t in testDesc["meta"]["compliance"]["tensors"].items():
- if "mode" in t and t["mode"] == "DOT_PRODUCT":
+ if "mode" in t and t["mode"] in ("DOT_PRODUCT", "ABS_ERROR"):
return True
return False
@@ -195,7 +195,7 @@
conformanceFilePath = getRunnerResultFilePath(
resultFilePath, TOSA_REFCOMPLIANCE_RUNNER
)
- if isComplianceModeDotProduct(self.testDesc):
+ if isComplianceAbsModeNeeded(self.testDesc):
conformanceBoundsPath = getBoundsResultFilePath(
resultFilePath, TOSA_REFCOMPLIANCE_RUNNER
)
@@ -255,7 +255,7 @@
getRunnerResultFilePath(resultFilePath, sutModule)
)
if (
- isComplianceModeDotProduct(self.testDesc)
+ isComplianceAbsModeNeeded(self.testDesc)
and sutModule == TOSA_REFCOMPLIANCE_RUNNER
):
boundsFilePath = getBoundsResultFilePath(resultFilePath)