diff options
author | TatWai Chong <tatwai.chong@arm.com> | 2023-02-27 13:22:52 -0800 |
---|---|---|
committer | TatWai Chong <tatwai.chong@arm.com> | 2023-03-03 15:15:38 -0800 |
commit | 0cef07eca8c91738093df86903f3584daaf12b9a (patch) | |
tree | 6b849112ffc3657dc69ef02a4248fd0b729566e6 /verif/frameworks/tosa_verif_framework_generator.py | |
parent | 57bc0796cd85115684219cf373db04c172848306 (diff) | |
download | reference_model-0cef07eca8c91738093df86903f3584daaf12b9a.tar.gz |
Refactor resize test builder
Also add input size = 1 in the shape list, and extend scaling to
1x, 2x and 3x, so that the cases of broadcasting, power-of-two
scaling, no-scaling (e.g. 1x1 -> 1x1), scaling accuracy (3x) can
be tested. Since the scalar tensor is tiny, should not noticeably
impact the execution time of the framework test.
Change-Id: Iec53da3cbb60e087077d6e2d8eb205e76e6c1313
Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
Diffstat (limited to 'verif/frameworks/tosa_verif_framework_generator.py')
-rwxr-xr-x | verif/frameworks/tosa_verif_framework_generator.py | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/verif/frameworks/tosa_verif_framework_generator.py b/verif/frameworks/tosa_verif_framework_generator.py index f8518f1..68c7d5a 100755 --- a/verif/frameworks/tosa_verif_framework_generator.py +++ b/verif/frameworks/tosa_verif_framework_generator.py @@ -762,43 +762,9 @@ TF_OP_LIST = { ), "types": {"tf": TYPE_F}, }, - "resize_nearest": { + "resize": { "operands": (1, 0), - "build_fcn": (TBuilder.ResizeNearest, TGen.tgPooling, ArgGen.agNone), - "types": { - "tf": TYPE_F, - "tflite": list( - TYPE_F + [QuantType.ALL_U8, QuantType.ALL_I8, QuantType.ALL_I16] - ), - }, - }, - "resize_bilinear": { - "operands": (1, 0), - "build_fcn": (TBuilder.ResizeBilinear, TGen.tgPooling, ArgGen.agNone), - "types": { - "tf": TYPE_F, - "tflite": list( - TYPE_F + [QuantType.ALL_U8, QuantType.ALL_I8, QuantType.ALL_I16] - ), - }, - }, - "resize_bilinear_v1_align_corners": { - "operands": (1, 0), - "build_fcn": ( - TBuilder.ResizeBilinearV1AlignCorners, - TGen.tgPooling, - ArgGen.agNone, - ), - "types": { - "tf": TYPE_F, - "tflite": list( - TYPE_F + [QuantType.ALL_U8, QuantType.ALL_I8, QuantType.ALL_I16] - ), - }, - }, - "resize_bilinear_v1_none": { - "operands": (1, 0), - "build_fcn": (TBuilder.ResizeBilinearV1None, TGen.tgPooling, ArgGen.agNone), + "build_fcn": (TBuilder.Resize, TGen.tgPooling, ArgGen.agResize), "types": { "tf": TYPE_F, "tflite": list( @@ -878,6 +844,7 @@ shape_list = [ (1, 32, 32, 8), (1, 7, 7, 9), (1, 7, 7, 479), + (3, 1, 1, 7), (2, 2, 7, 7, 2), (1, 4, 8, 21, 17), (3, 32, 16, 16, 5), |