diff options
author | Tai Ly <tai.ly@arm.com> | 2023-11-15 23:06:19 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-11-16 21:25:40 +0000 |
commit | d3797f014811ca1ea876989b4839a8297eb1731e (patch) | |
tree | 9e69cf456327497c3360a8d7101897cefa28dfbc | |
parent | 30a41db0c89f8209ab710c1d312fd6697107a41b (diff) | |
download | reference_model-d3797f014811ca1ea876989b4839a8297eb1731e.tar.gz |
[reference_model] add local_bound attribute to test_gen
Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: I9b87d1ad0f09648d07a6ecfc2075a174a9d04a3d
m--------- | thirdparty/serialization_lib | 0 | ||||
-rw-r--r-- | verif/generator/tosa_test_gen.py | 51 |
2 files changed, 43 insertions, 8 deletions
diff --git a/thirdparty/serialization_lib b/thirdparty/serialization_lib -Subproject 4881c29247d4b411de446b13d9bd58ea93737aa +Subproject f5dfad14f0cdc9556785b610674350c2e5a3355 diff --git a/verif/generator/tosa_test_gen.py b/verif/generator/tosa_test_gen.py index 9dc3199..a83ead0 100644 --- a/verif/generator/tosa_test_gen.py +++ b/verif/generator/tosa_test_gen.py @@ -869,8 +869,11 @@ class TosaTestGen: ): return None + # TODO - Test local_bound, for now set local bound attribute to False + local_bound = False + attr = ts.TosaSerializerAttribute() - attr.ConvAttribute(padding, strides, dilations, qinfo[0], qinfo[1]) + attr.ConvAttribute(padding, strides, dilations, qinfo[0], qinfo[1], local_bound) self.ser.addOperator(op["op"], input_list, output_list, attr) @@ -948,8 +951,11 @@ class TosaTestGen: ): return None + # TODO - Test local_bound, for now set local bound attribute to False + local_bound = False + attr = ts.TosaSerializerAttribute() - attr.ConvAttribute(padding, strides, dilations, qinfo[0], qinfo[1]) + attr.ConvAttribute(padding, strides, dilations, qinfo[0], qinfo[1], local_bound) self.ser.addOperator(op["op"], input_list, output_list, attr) return result_tens @@ -1011,8 +1017,13 @@ class TosaTestGen: ): return None + # TODO - Test local_bound, for now set local bound attribute to False + local_bound = False + attr = ts.TosaSerializerAttribute() - attr.TransposeConvAttribute(out_pad, stride, output_shape, qinfo[0], qinfo[1]) + attr.TransposeConvAttribute( + out_pad, stride, output_shape, qinfo[0], qinfo[1], local_bound + ) self.ser.addOperator(op["op"], input_list, output_list, attr) return result_tens @@ -1084,8 +1095,11 @@ class TosaTestGen: ): return None + # TODO - Test local_bound, for now set local bound attribute to False + local_bound = False + attr = ts.TosaSerializerAttribute() - attr.ConvAttribute(padding, strides, dilations, qinfo[0], qinfo[1]) + attr.ConvAttribute(padding, strides, dilations, qinfo[0], qinfo[1], local_bound) self.ser.addOperator(op["op"], input_list, output_list, attr) return result_tens @@ -2394,7 +2408,13 @@ class TosaTestGen: return acc_out def build_fft2d( - self, op, val1, val2, inverse, validator_fcns=None, error_name=None + self, + op, + val1, + val2, + inverse, + validator_fcns=None, + error_name=None, ): results = OutputShaper.fft2dOp(self.ser, self.rng, val1, val2, error_name) @@ -2429,13 +2449,22 @@ class TosaTestGen: ): return None + # TODO - Test local_bound, for now set local bound attribute to False + local_bound = False + attr = ts.TosaSerializerAttribute() - attr.FFTAttribute(inverse) + attr.FFTAttribute(inverse, local_bound) self.ser.addOperator(op["op"], input_names, output_names, attr) return results - def build_rfft2d(self, op, val, validator_fcns=None, error_name=None): + def build_rfft2d( + self, + op, + val, + validator_fcns=None, + error_name=None, + ): results = OutputShaper.rfft2dOp(self.ser, self.rng, val, error_name) input_names = [val.name] @@ -2466,7 +2495,13 @@ class TosaTestGen: ): return None - self.ser.addOperator(op["op"], input_names, output_names) + # TODO - Test local_bound, for now set local bound attribute to False + local_bound = False + + attr = ts.TosaSerializerAttribute() + attr.RFFTAttribute(local_bound) + + self.ser.addOperator(op["op"], input_names, output_names, attr) return results def create_filter_lists( |