aboutsummaryrefslogtreecommitdiff
path: root/verif/runner
diff options
context:
space:
mode:
authorTai Ly <tai.ly@arm.com>2023-03-28 22:06:56 +0000
committerTai Ly <tai.ly@arm.com>2023-05-05 19:23:15 +0000
commita4d748b08accce06fab93e2d2b96e499b35ae89b (patch)
tree20a3957e1f45f65f35d5d67ecce1618659e388f0 /verif/runner
parent0c71686875618b2e11290273b7a05b88ef8a8aae (diff)
downloadreference_model-a4d748b08accce06fab93e2d2b96e499b35ae89b.tar.gz
[reference model] Add precise mode
This adds --precise_mode=1 option to tosa_referece_model, which will cause reference model to convert all floating point tensors to FP64 tensors and compute all operators accordingly. Also adds optional -p arguments to test runners tosa_verif_run_tests.py and tosa_verif_framework_compiler_runner.py to run tests in precise mode Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I156055216ad61710096497a8fa1a653be2a602a3
Diffstat (limited to 'verif/runner')
-rw-r--r--verif/runner/tosa_refmodel_sut_run.py3
-rw-r--r--verif/runner/tosa_verif_run_tests.py7
2 files changed, 10 insertions, 0 deletions
diff --git a/verif/runner/tosa_refmodel_sut_run.py b/verif/runner/tosa_refmodel_sut_run.py
index 95f6e7b..df5c0db 100644
--- a/verif/runner/tosa_refmodel_sut_run.py
+++ b/verif/runner/tosa_refmodel_sut_run.py
@@ -45,6 +45,9 @@ class TosaSUTRunner(TosaTestRunner):
if args.ref_intermediates:
cmd.extend(["--dump_intermediates", str(args.ref_intermediates)])
+ if args.precise_mode:
+ cmd.extend(["--precise_mode=1"])
+
# Run command and interpret tosa graph result via process return codes
graphMessage = None
try:
diff --git a/verif/runner/tosa_verif_run_tests.py b/verif/runner/tosa_verif_run_tests.py
index 6b5d77e..814c864 100644
--- a/verif/runner/tosa_verif_run_tests.py
+++ b/verif/runner/tosa_verif_run_tests.py
@@ -147,6 +147,13 @@ def parseArgs(argv):
help="A TOSA level defines operator parameter ranges that an implementation shall support."
"Config tosa_level for running the reference model only. Default is EIGHTK",
)
+ parser.add_argument(
+ "-p",
+ "--precise-mode",
+ dest="precise_mode",
+ action="store_true",
+ help="Run the reference model in precise mode (FP64)",
+ )
args = parser.parse_args(argv)