From e52c0a3e952a2376e8b537517e30f43fc4f496fe Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Mon, 11 Mar 2024 09:58:24 +0000 Subject: Fix REDUCE_SUM compliance test creation Make sure output shape is big enough to perform statistical compliance error checking. Signed-off-by: Jeremy Johnson Change-Id: Ia7ed7dd19a6c9cb888363f6cbdf0c6943235e0be --- verif/generator/tosa_arg_gen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/verif/generator/tosa_arg_gen.py b/verif/generator/tosa_arg_gen.py index 253e8ee..20572e8 100644 --- a/verif/generator/tosa_arg_gen.py +++ b/verif/generator/tosa_arg_gen.py @@ -1937,7 +1937,12 @@ class TosaArgGen: for a in axes: args_dict = {"axis": int(a)} if opid == Op.REDUCE_SUM: - args_dict["dot_products"] = gtu.product(shape) + output_shape = shape.copy() + if error_name is None: + # It only matters that we calculate the dot_products correctly + # for non error_if tests as they should never be run + output_shape[a] = 1 + args_dict["dot_products"] = gtu.product(output_shape) args_dict["shape"] = shape args_dict["ks"] = int(shape[a]) if a >= 0 and a < len(shape) else 1 args_dict["acc_type"] = dtype if dtype != DType.BF16 else DType.FP32 -- cgit v1.2.1