diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2023-12-13 14:28:12 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-12-14 17:56:59 +0000 |
commit | e1e611dc446fe597509b4b777bb474c059a1c0b6 (patch) | |
tree | fc9c229bafda83ac42a9d599b60be5fae3a7c619 /verif/generator/tosa_error_if.py | |
parent | a8420add949564053495ef78f3213f163c30fb9a (diff) | |
download | reference_model-e1e611dc446fe597509b4b777bb474c059a1c0b6.tar.gz |
Remove inferred dimension from RESHAPE
Test generation changed to only produce static reshape tests
Reference model changed to produce ERROR_IF on inferred shapes
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: I92c92a40e7c0e457961bc654630040dff79a750b
Diffstat (limited to 'verif/generator/tosa_error_if.py')
-rw-r--r-- | verif/generator/tosa_error_if.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/verif/generator/tosa_error_if.py b/verif/generator/tosa_error_if.py index 5dd785f..7f719ee 100644 --- a/verif/generator/tosa_error_if.py +++ b/verif/generator/tosa_error_if.py @@ -2519,56 +2519,6 @@ class TosaErrorValidator: return info_dict @staticmethod - def evReshapeOutputSizeMultiInference(check=False, **kwargs): - error_name = ErrorIf.ReshapeOutputSizeMultiInference - param_reqs = {"rank": None, "dtype": None, "shape": None} - error_result = False - error_reason = "Reshape output tensor contains more than one inferred dimension" - - if check: - output_shape = kwargs["output_shape"] - inferences = 0 - for dim in output_shape: - if dim == -1: - inferences += 1 - if inferences > 1: - error_result = True - - info_dict = { - "error_name": error_name, - "error_result": error_result, - "error_reason": error_reason, - "param_reqs": param_reqs, - } - return info_dict - - @staticmethod - def evReshapeOutputSizeNonInteger(check=False, **kwargs): - error_name = ErrorIf.ReshapeOutputSizeNonInteger - param_reqs = {"rank": None, "dtype": None, "shape": None} - error_result = False - error_reason = "Reshape inferred output tensor dimension is non-integer" - - if check: - input_shape = kwargs["input_shape"] - output_shape = kwargs["output_shape"] - input_size = np.prod(input_shape) - output_size = 1 - for dim in output_shape: - if dim != -1: - output_size *= dim - if -1 in output_shape and input_size % output_size != 0: - error_result = True - - info_dict = { - "error_name": error_name, - "error_result": error_result, - "error_reason": error_reason, - "param_reqs": param_reqs, - } - return info_dict - - @staticmethod def calculateBroadcastShape(input_shape_a, input_shape_b): if input_shape_a is not None and input_shape_b is not None: calculated_shape = input_shape_a.copy() |