diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2023-10-26 13:53:14 +0100 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-11-02 23:22:09 +0000 |
commit | a4d907e8686791dd84ed987d0d79325c4d908b73 (patch) | |
tree | 9748ef39183b7548a9ff50d457920eace3a6fdec /verif/generator/tosa_verif_build_tests.py | |
parent | d1a08ce27ef8d0f6cf77e1b864610aade06edc5c (diff) | |
download | reference_model-a4d907e8686791dd84ed987d0d79325c4d908b73.tar.gz |
Main compliance testing support for MUL
Update verify ULP mode to allow fractions (e.g. 0.5).
Update pseudo generator to accept ranges.
Fix up pseudo random distribution based on ranges.
Change-Id: I9168c5f7d37722678c0f1f9e906953c8cec367b1
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Diffstat (limited to 'verif/generator/tosa_verif_build_tests.py')
-rw-r--r-- | verif/generator/tosa_verif_build_tests.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/verif/generator/tosa_verif_build_tests.py b/verif/generator/tosa_verif_build_tests.py index 954c6e9..d6598fb 100644 --- a/verif/generator/tosa_verif_build_tests.py +++ b/verif/generator/tosa_verif_build_tests.py @@ -13,14 +13,18 @@ from serializer.tosa_serializer import DTypeNames OPTION_FP_VALUES_RANGE = "--fp-values-range" -# Used for parsing a comma-separated list of integers in a string -# to an actual list of integers +# Used for parsing a comma-separated list of integers/floats in a string +# to an actual list of integers/floats with special case max def str_to_list(in_s, is_float=False): - """Converts a comma-separated list of string integers to a python list of ints""" + """Converts a comma-separated list string to a python list of numbers.""" lst = in_s.split(",") out_list = [] for i in lst: - val = float(i) if is_float else int(i) + # Special case for allowing maximum FP numbers + if is_float and i in ("-max", "max"): + val = i + else: + val = float(i) if is_float else int(i) out_list.append(val) return out_list |