From 4959202eb759201bc27baa9c452275350e373914 Mon Sep 17 00:00:00 2001 From: Digant Desai Date: Tue, 17 Dec 2024 23:48:05 -0600 Subject: [PATCH] Revert "Move to TOSA v0.80.1" This reverts commit bb07cad4d42e439f523d6410339e52eebe403755. Signed-off-by: Digant Desai --- backends/arm/README.md | 4 ++-- backends/arm/arm_backend.py | 2 +- .../operator_support/right_shift_support.py | 4 ++-- .../arm/operator_support/to_copy_support.py | 4 ++-- .../tosa_supported_operators.py | 4 ++-- backends/arm/operators/node_visitor.py | 8 +++---- backends/arm/operators/op_add.py | 4 ++-- backends/arm/test/misc/test_debug_feats.py | 14 ++++++------ .../arm/test/misc/test_dim_order_guards.py | 4 ++-- backends/arm/test/misc/test_lifted_tensor.py | 8 +++---- backends/arm/test/misc/test_tosa_spec.py | 22 +++++++++---------- .../arm/test/models/test_mobilenet_v2_arm.py | 4 ++-- backends/arm/test/ops/test_add.py | 4 ++-- backends/arm/test/ops/test_avg_pool.py | 4 ++-- backends/arm/test/ops/test_batch_norm.py | 6 ++--- backends/arm/test/ops/test_bmm.py | 4 ++-- backends/arm/test/ops/test_cat.py | 4 ++-- backends/arm/test/ops/test_clone.py | 4 ++-- backends/arm/test/ops/test_conv1d.py | 4 ++-- backends/arm/test/ops/test_conv2d.py | 4 ++-- backends/arm/test/ops/test_conv_combos.py | 4 ++-- backends/arm/test/ops/test_depthwise_conv.py | 4 ++-- backends/arm/test/ops/test_div.py | 4 ++-- backends/arm/test/ops/test_exp.py | 4 ++-- backends/arm/test/ops/test_expand.py | 4 ++-- backends/arm/test/ops/test_full.py | 4 ++-- backends/arm/test/ops/test_hardtanh.py | 4 ++-- backends/arm/test/ops/test_layer_norm.py | 4 ++-- backends/arm/test/ops/test_linear.py | 4 ++-- backends/arm/test/ops/test_log.py | 4 ++-- backends/arm/test/ops/test_logsoftmax.py | 4 ++-- backends/arm/test/ops/test_max_pool.py | 4 ++-- backends/arm/test/ops/test_mean_dim.py | 8 +++---- backends/arm/test/ops/test_mm.py | 4 ++-- backends/arm/test/ops/test_mul.py | 4 ++-- backends/arm/test/ops/test_permute.py | 4 ++-- backends/arm/test/ops/test_reciprocal.py | 4 ++-- backends/arm/test/ops/test_relu.py | 4 ++-- backends/arm/test/ops/test_repeat.py | 4 ++-- backends/arm/test/ops/test_rshift.py | 4 ++-- backends/arm/test/ops/test_rsqrt.py | 4 ++-- backends/arm/test/ops/test_scalars.py | 4 ++-- backends/arm/test/ops/test_select.py | 4 ++-- backends/arm/test/ops/test_sigmoid.py | 4 ++-- backends/arm/test/ops/test_slice.py | 4 ++-- backends/arm/test/ops/test_softmax.py | 4 ++-- backends/arm/test/ops/test_split.py | 4 ++-- backends/arm/test/ops/test_squeeze.py | 4 ++-- backends/arm/test/ops/test_sub.py | 4 ++-- backends/arm/test/ops/test_sum.py | 4 ++-- backends/arm/test/ops/test_tanh.py | 4 ++-- backends/arm/test/ops/test_to_copy.py | 2 +- backends/arm/test/ops/test_unsqueeze.py | 4 ++-- .../arm/test/ops/test_upsample_nearest2d.py | 4 ++-- backends/arm/test/ops/test_var.py | 4 ++-- backends/arm/test/ops/test_view.py | 4 ++-- .../passes/test_meandim_to_averagepool2d.py | 4 ++-- .../test_unsqueeze_before_repeat_pass.py | 4 ++-- .../test/quantizer/test_generic_annotater.py | 2 +- backends/arm/tosa_specification.py | 6 ++--- backends/arm/tosa_utils.py | 4 ++-- examples/arm/aot_arm_compiler.py | 2 +- examples/arm/setup.sh | 2 +- 63 files changed, 143 insertions(+), 143 deletions(-) diff --git a/backends/arm/README.md b/backends/arm/README.md index a7458db07ce..6f4642f8d44 100644 --- a/backends/arm/README.md +++ b/backends/arm/README.md @@ -104,8 +104,8 @@ The Arm Backend should be considered a prototype quality at this point, likely s ## Current flows The ArmBackend has a two stage process, -- Compile to TOSA to rationalise the graph into known hardware support profiles. Currently this is to v0.80 TOSA BI with specific concern to a subset which gives support on Ethos-U55, the target of the initial prototype efforts. -- Lower via the ethos-u-vela compilation flow which takes TOSA v0.80 as an input and produces a low level commandstream for the hardware which is then passed via the delegate to the ethos-u-core-driver for direct execution. +- Compile to TOSA to rationalise the graph into known hardware support profiles. Currently this is to v0.80.0 TOSA BI with specific concern to a subset which gives support on Ethos-U55, the target of the initial prototype efforts. +- Lower via the ethos-u-vela compilation flow which takes TOSA v0.80.0 as an input and produces a low level commandstream for the hardware which is then passed via the delegate to the ethos-u-core-driver for direct execution. The ArmPartitioner is currenly used to ensure the operations converted are Ethos-U compatible, but will be extended to offer spec-correct TOSA Base inference and TOSA Main Inference generation in future. diff --git a/backends/arm/arm_backend.py b/backends/arm/arm_backend.py index e2fdc42b113..93b45483906 100644 --- a/backends/arm/arm_backend.py +++ b/backends/arm/arm_backend.py @@ -90,7 +90,7 @@ def ethosu_compile_spec( if extra_flags is not None: self.compiler_flags.append(extra_flags) - base_tosa_version = "TOSA-0.80+BI" + base_tosa_version = "TOSA-0.80.0+BI" if "u55" in config: # Add the Ethos-U55 extension marker base_tosa_version += "+u55" diff --git a/backends/arm/operator_support/right_shift_support.py b/backends/arm/operator_support/right_shift_support.py index bf548982b74..ee8d5965a11 100644 --- a/backends/arm/operator_support/right_shift_support.py +++ b/backends/arm/operator_support/right_shift_support.py @@ -23,8 +23,8 @@ class RightShiftSupported(SupportedTOSAOperatorCheck): targets = [exir_ops.edge.aten.__rshift__.Scalar] tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80+BI"), - TosaSpecification.create_from_string("TOSA-0.80+MI"), + TosaSpecification.create_from_string("TOSA-0.80.0+BI"), + TosaSpecification.create_from_string("TOSA-0.80.0+MI"), ] def is_node_supported(self, node: fx.Node, tosa_spec: TosaSpecification): diff --git a/backends/arm/operator_support/to_copy_support.py b/backends/arm/operator_support/to_copy_support.py index f2968585f24..dcf2ce316be 100644 --- a/backends/arm/operator_support/to_copy_support.py +++ b/backends/arm/operator_support/to_copy_support.py @@ -25,8 +25,8 @@ class ToCopySupported(SupportedTOSAOperatorCheck): targets = [exir_ops.edge.aten._to_copy.default] tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80+BI"), - TosaSpecification.create_from_string("TOSA-0.80+MI"), + TosaSpecification.create_from_string("TOSA-0.80.0+BI"), + TosaSpecification.create_from_string("TOSA-0.80.0+MI"), ] SupportedTypeDict = dict[torch.dtype, list[torch.dtype]] diff --git a/backends/arm/operator_support/tosa_supported_operators.py b/backends/arm/operator_support/tosa_supported_operators.py index 836c6733703..7072ba6a827 100644 --- a/backends/arm/operator_support/tosa_supported_operators.py +++ b/backends/arm/operator_support/tosa_supported_operators.py @@ -35,8 +35,8 @@ def is_node_supported(self, node: fx.Node, tosa_spec: TosaSpecification) -> bool _tosa_spec_dicts: dict[ TosaSpecification, dict[str, Type[SupportedTOSAOperatorCheck]] ] = { - TosaSpecification.create_from_string("TOSA-0.80+BI"): {}, - TosaSpecification.create_from_string("TOSA-0.80+MI"): {}, + TosaSpecification.create_from_string("TOSA-0.80.0+BI"): {}, + TosaSpecification.create_from_string("TOSA-0.80.0+MI"): {}, } diff --git a/backends/arm/operators/node_visitor.py b/backends/arm/operators/node_visitor.py index 87ef6ed4c67..9e98ebcab98 100644 --- a/backends/arm/operators/node_visitor.py +++ b/backends/arm/operators/node_visitor.py @@ -25,8 +25,8 @@ class NodeVisitor: # When all node_visitors has been refactored to target a specific # version, this list should be removed. tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80+BI"), - TosaSpecification.create_from_string("TOSA-0.80+MI"), + TosaSpecification.create_from_string("TOSA-0.80.0+BI"), + TosaSpecification.create_from_string("TOSA-0.80.0+MI"), ] def __init__(self, exported_program: ExportedProgram, tosa_spec: TosaSpecification): @@ -46,8 +46,8 @@ def define_node( # container for all node visitors _node_visitor_dicts = { - TosaSpecification.create_from_string("TOSA-0.80+BI"): {}, - TosaSpecification.create_from_string("TOSA-0.80+MI"): {}, + TosaSpecification.create_from_string("TOSA-0.80.0+BI"): {}, + TosaSpecification.create_from_string("TOSA-0.80.0+MI"): {}, } diff --git a/backends/arm/operators/op_add.py b/backends/arm/operators/op_add.py index 382779df3d8..e52f3eddae7 100644 --- a/backends/arm/operators/op_add.py +++ b/backends/arm/operators/op_add.py @@ -27,7 +27,7 @@ class AddVisitor_080_BI(NodeVisitor): target = "aten.add.Tensor" tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80+BI"), + TosaSpecification.create_from_string("TOSA-0.80.0+BI"), ] def __init__(self, *args): @@ -91,7 +91,7 @@ class AddVisitor_080_MI(AddVisitor_080_BI): # inheriting 'target' from BI class tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80+MI"), + TosaSpecification.create_from_string("TOSA-0.80.0+MI"), ] def __init__(self, *args): diff --git a/backends/arm/test/misc/test_debug_feats.py b/backends/arm/test/misc/test_debug_feats.py index 47d259da470..f82b5afc3b8 100644 --- a/backends/arm/test/misc/test_debug_feats.py +++ b/backends/arm/test/misc/test_debug_feats.py @@ -49,7 +49,7 @@ def _tosa_MI_pipeline(self, module: torch.nn.Module, dump_file=None): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -63,7 +63,7 @@ def _tosa_BI_pipeline(self, module: torch.nn.Module, dump_file=None): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() @@ -111,7 +111,7 @@ def test_numerical_diff_prints(self): model, example_inputs=model.get_inputs(), compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True, custom_path=tempfile.mkdtemp("diff_print_test"), ), @@ -138,7 +138,7 @@ def test_dump_ops_and_dtypes(): ArmTester( model, example_inputs=model.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .dump_dtype_distribution() @@ -159,7 +159,7 @@ def test_dump_ops_and_dtypes_parseable(): ArmTester( model, example_inputs=model.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .dump_dtype_distribution(print_table=False) @@ -187,7 +187,7 @@ def test_collate_tosa_BI_tests(self): ArmTester( model, example_inputs=model.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() @@ -216,7 +216,7 @@ def test_dump_tosa_ops(caplog): ArmTester( model, example_inputs=model.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/misc/test_dim_order_guards.py b/backends/arm/test/misc/test_dim_order_guards.py index 0698773e6f8..d7406afe95e 100644 --- a/backends/arm/test/misc/test_dim_order_guards.py +++ b/backends/arm/test/misc/test_dim_order_guards.py @@ -34,7 +34,7 @@ def test_tosa_MI_pipeline(self): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -48,7 +48,7 @@ def test_tosa_BI_pipeline(self): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/misc/test_lifted_tensor.py b/backends/arm/test/misc/test_lifted_tensor.py index a16b1e639b1..12b8d0665be 100644 --- a/backends/arm/test/misc/test_lifted_tensor.py +++ b/backends/arm/test/misc/test_lifted_tensor.py @@ -60,7 +60,7 @@ def test_partition_lifted_tensor_tosa_MI(self, op, data): ArmTester( LiftedTensor(op), example_inputs=data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -77,7 +77,7 @@ def test_partition_lifted_tensor_tosa_BI(self, op, data): ArmTester( LiftedTensor(op), example_inputs=data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() @@ -95,7 +95,7 @@ def test_partition_lifted_scalar_tensor_tosa_MI(self, op, data, arg1): ArmTester( LiftedScalarTensor(op, arg1), example_inputs=(data), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -110,7 +110,7 @@ def test_partition_lifted_scalar_tensor_tosa_BI(self, op, data, arg1): ArmTester( LiftedScalarTensor(op, arg1), example_inputs=(data), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/misc/test_tosa_spec.py b/backends/arm/test/misc/test_tosa_spec.py index 77b10cf3151..5cbad140b77 100644 --- a/backends/arm/test/misc/test_tosa_spec.py +++ b/backends/arm/test/misc/test_tosa_spec.py @@ -16,9 +16,9 @@ from parameterized import parameterized test_valid_0_80_strings = [ - "TOSA-0.80+BI", - "TOSA-0.80+MI+8k", - "TOSA-0.80+BI+u55", + "TOSA-0.80.0+BI", + "TOSA-0.80.0+MI+8k", + "TOSA-0.80.0+BI+u55", ] test_valid_1_00_strings = [ "TOSA-1.00.0+INT+FP+fft", @@ -35,11 +35,11 @@ } test_invalid_strings = [ - "TOSA-0.80+bi", - "TOSA-0.80", - "TOSA-0.80+8k", - "TOSA-0.80+BI+MI", - "TOSA-0.80+BI+U55", + "TOSA-0.80.0+bi", + "TOSA-0.80.0", + "TOSA-0.80.0+8k", + "TOSA-0.80.0+BI+MI", + "TOSA-0.80.0+BI+U55", "TOSA-1.00.0+fft", "TOSA-1.00.0+fp+bf16+fft", "TOSA-1.00.0+INT+INT4+cf", @@ -50,13 +50,13 @@ ] test_compile_specs = [ - ([CompileSpec("tosa_version", "TOSA-0.80+BI".encode())],), - ([CompileSpec("tosa_version", "TOSA-0.80+BI+u55".encode())],), + ([CompileSpec("tosa_version", "TOSA-0.80.0+BI".encode())],), + ([CompileSpec("tosa_version", "TOSA-0.80.0+BI+u55".encode())],), ([CompileSpec("tosa_version", "TOSA-1.00.0+INT".encode())],), ] test_compile_specs_no_version = [ - ([CompileSpec("other_key", "TOSA-0.80+BI".encode())],), + ([CompileSpec("other_key", "TOSA-0.80.0+BI".encode())],), ([CompileSpec("other_key", "some_value".encode())],), ] diff --git a/backends/arm/test/models/test_mobilenet_v2_arm.py b/backends/arm/test/models/test_mobilenet_v2_arm.py index 6fbea63fb00..24af9cf41a2 100644 --- a/backends/arm/test/models/test_mobilenet_v2_arm.py +++ b/backends/arm/test/models/test_mobilenet_v2_arm.py @@ -55,7 +55,7 @@ def test_mv2_tosa_MI(self): self.mv2, example_inputs=self.model_inputs, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -70,7 +70,7 @@ def test_mv2_tosa_BI(self): self.mv2, example_inputs=self.model_inputs, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_add.py b/backends/arm/test/ops/test_add.py index 8d18c7ab539..f40037f62fa 100644 --- a/backends/arm/test/ops/test_add.py +++ b/backends/arm/test/ops/test_add.py @@ -61,7 +61,7 @@ def _test_add_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.add.Tensor": 1}) @@ -80,7 +80,7 @@ def _test_add_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_avg_pool.py b/backends/arm/test/ops/test_avg_pool.py index c517b5ebe4c..4801849949a 100644 --- a/backends/arm/test/ops/test_avg_pool.py +++ b/backends/arm/test/ops/test_avg_pool.py @@ -56,7 +56,7 @@ def _test_avgpool2d_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -79,7 +79,7 @@ def _test_avgpool2d_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) diff --git a/backends/arm/test/ops/test_batch_norm.py b/backends/arm/test/ops/test_batch_norm.py index 17fe1bbea9c..297ac0af1c7 100644 --- a/backends/arm/test/ops/test_batch_norm.py +++ b/backends/arm/test/ops/test_batch_norm.py @@ -533,7 +533,7 @@ def _test_batchnorm2d_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_not(["torch.ops.quantized_decomposed"]) @@ -561,7 +561,7 @@ def _test_batchnorm2d_no_stats_tosa_MI_pipeline( ArmTester( module, example_example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten._native_batch_norm_legit.no_stats": 1}) @@ -590,7 +590,7 @@ def _test_batchnorm2d_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_bmm.py b/backends/arm/test/ops/test_bmm.py index e7a9a2a810e..0952d2595ff 100644 --- a/backends/arm/test/ops/test_bmm.py +++ b/backends/arm/test/ops/test_bmm.py @@ -56,7 +56,7 @@ def _test_bmm_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_not(["torch.ops.quantized_decomposed"]) @@ -76,7 +76,7 @@ def _test_bmm_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_cat.py b/backends/arm/test/ops/test_cat.py index 674363e991a..4cef019c36c 100644 --- a/backends/arm/test/ops/test_cat.py +++ b/backends/arm/test/ops/test_cat.py @@ -55,7 +55,7 @@ def _test_cat_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.cat.default": 1}) @@ -75,7 +75,7 @@ def _test_cat_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_clone.py b/backends/arm/test/ops/test_clone.py index 0238d62bb48..2e7726a0bc5 100644 --- a/backends/arm/test/ops/test_clone.py +++ b/backends/arm/test/ops/test_clone.py @@ -47,7 +47,7 @@ def _test_clone_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.clone.default": 1}) @@ -66,7 +66,7 @@ def _test_clone_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_conv1d.py b/backends/arm/test/ops/test_conv1d.py index 9a25da8aa12..e6e027ed6ea 100644 --- a/backends/arm/test/ops/test_conv1d.py +++ b/backends/arm/test/ops/test_conv1d.py @@ -226,7 +226,7 @@ def _test_conv1d_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -248,7 +248,7 @@ def _test_conv1d_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_conv2d.py b/backends/arm/test/ops/test_conv2d.py index 19e3067344f..222945cd162 100644 --- a/backends/arm/test/ops/test_conv2d.py +++ b/backends/arm/test/ops/test_conv2d.py @@ -253,7 +253,7 @@ def _test_conv2d_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -275,7 +275,7 @@ def _test_conv2d_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_conv_combos.py b/backends/arm/test/ops/test_conv_combos.py index aad16709948..86bf9cb6321 100644 --- a/backends/arm/test/ops/test_conv_combos.py +++ b/backends/arm/test/ops/test_conv_combos.py @@ -193,7 +193,7 @@ def _test_conv_combo_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -217,7 +217,7 @@ def _test_conv_combo_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_depthwise_conv.py b/backends/arm/test/ops/test_depthwise_conv.py index 5419332c378..083e9aaf68e 100644 --- a/backends/arm/test/ops/test_depthwise_conv.py +++ b/backends/arm/test/ops/test_depthwise_conv.py @@ -189,7 +189,7 @@ def _test_dw_conv_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -209,7 +209,7 @@ def _test_dw_conv_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_div.py b/backends/arm/test/ops/test_div.py index c28ba3acdf3..eaf6a21023d 100644 --- a/backends/arm/test/ops/test_div.py +++ b/backends/arm/test/ops/test_div.py @@ -102,7 +102,7 @@ def _test_div_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.div.Tensor": 1}) @@ -121,7 +121,7 @@ def _test_div_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_exp.py b/backends/arm/test/ops/test_exp.py index 0bbd5097c31..57cd23bb140 100644 --- a/backends/arm/test/ops/test_exp.py +++ b/backends/arm/test/ops/test_exp.py @@ -40,7 +40,7 @@ def _test_exp_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.exp.default"]) @@ -58,7 +58,7 @@ def _test_exp_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: Tuple): ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_expand.py b/backends/arm/test/ops/test_expand.py index bd6b74d77b0..a8cdd48b405 100644 --- a/backends/arm/test/ops/test_expand.py +++ b/backends/arm/test/ops/test_expand.py @@ -47,7 +47,7 @@ def _test_expand_tosa_MI_pipeline(self, module: torch.nn.Module, test_data: Tupl ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.expand.default": 1}) @@ -65,7 +65,7 @@ def _test_expand_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: Tupl ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_full.py b/backends/arm/test/ops/test_full.py index 0c8afe1390b..2ee41f8bc11 100644 --- a/backends/arm/test/ops/test_full.py +++ b/backends/arm/test/ops/test_full.py @@ -57,7 +57,7 @@ def _test_full_tosa_MI_pipeline( ArmTester( module, example_inputs=example_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.full.default": 1}) @@ -80,7 +80,7 @@ def _test_full_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=permute_memory_to_nhwc + "TOSA-0.80.0+BI", permute_memory_to_nhwc=permute_memory_to_nhwc ), ) .quantize() diff --git a/backends/arm/test/ops/test_hardtanh.py b/backends/arm/test/ops/test_hardtanh.py index 65d5ca92b26..1c763e81677 100644 --- a/backends/arm/test/ops/test_hardtanh.py +++ b/backends/arm/test/ops/test_hardtanh.py @@ -52,7 +52,7 @@ def _test_hardtanh_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.hardtanh.default"]) @@ -73,7 +73,7 @@ def _test_hardtanh_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_layer_norm.py b/backends/arm/test/ops/test_layer_norm.py index a1c17475ad5..502764fe053 100644 --- a/backends/arm/test/ops/test_layer_norm.py +++ b/backends/arm/test/ops/test_layer_norm.py @@ -75,7 +75,7 @@ def _test_layernorm_tosa_MI_pipeline( model=module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -96,7 +96,7 @@ def _test_layernorm_tosa_BI_pipeline( model=module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_linear.py b/backends/arm/test/ops/test_linear.py index 4385ca9864a..8aabd365af4 100644 --- a/backends/arm/test/ops/test_linear.py +++ b/backends/arm/test/ops/test_linear.py @@ -135,7 +135,7 @@ def _test_linear_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -155,7 +155,7 @@ def _test_linear_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_log.py b/backends/arm/test/ops/test_log.py index f9c34b1ff5e..4dd1fc97c7f 100644 --- a/backends/arm/test/ops/test_log.py +++ b/backends/arm/test/ops/test_log.py @@ -40,7 +40,7 @@ def _test_log_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.log.default"]) @@ -58,7 +58,7 @@ def _test_log_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: Tuple): ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_logsoftmax.py b/backends/arm/test/ops/test_logsoftmax.py index 69c8ee06ecf..910384e0a09 100644 --- a/backends/arm/test/ops/test_logsoftmax.py +++ b/backends/arm/test/ops/test_logsoftmax.py @@ -61,7 +61,7 @@ def _test_logsoftmax_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.log_softmax.int"]) @@ -81,7 +81,7 @@ def _test_logsoftmax_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_max_pool.py b/backends/arm/test/ops/test_max_pool.py index ed2a3743198..3a12616df62 100644 --- a/backends/arm/test/ops/test_max_pool.py +++ b/backends/arm/test/ops/test_max_pool.py @@ -63,7 +63,7 @@ def _test_maxpool2d_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -90,7 +90,7 @@ def _test_maxpool2d_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) diff --git a/backends/arm/test/ops/test_mean_dim.py b/backends/arm/test/ops/test_mean_dim.py index e4f6afcbd63..e725eb1ef42 100644 --- a/backends/arm/test/ops/test_mean_dim.py +++ b/backends/arm/test/ops/test_mean_dim.py @@ -81,7 +81,7 @@ def _test_adaptive_avg_pool2d_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.adaptive_avg_pool2d.default"]) @@ -101,7 +101,7 @@ def _test_adaptive_avg_pool2d_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() @@ -150,7 +150,7 @@ def _test_meandim_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_not(["torch.ops.quantized_decomposed"]) @@ -169,7 +169,7 @@ def _test_meandim_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_mm.py b/backends/arm/test/ops/test_mm.py index 5fa28076aac..21b02bbd104 100644 --- a/backends/arm/test/ops/test_mm.py +++ b/backends/arm/test/ops/test_mm.py @@ -54,7 +54,7 @@ def _test_mm_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.mm.default": 1}) @@ -74,7 +74,7 @@ def _test_mm_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_mul.py b/backends/arm/test/ops/test_mul.py index e18efc31a3b..ced71b0072b 100644 --- a/backends/arm/test/ops/test_mul.py +++ b/backends/arm/test/ops/test_mul.py @@ -71,7 +71,7 @@ def _test_mul_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=True + "TOSA-0.80.0+MI", permute_memory_to_nhwc=True ), ) .export() @@ -92,7 +92,7 @@ def _test_mul_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=True + "TOSA-0.80.0+BI", permute_memory_to_nhwc=True ), ) .quantize() diff --git a/backends/arm/test/ops/test_permute.py b/backends/arm/test/ops/test_permute.py index 72dd82f7262..581cd3cfbc4 100644 --- a/backends/arm/test/ops/test_permute.py +++ b/backends/arm/test/ops/test_permute.py @@ -57,7 +57,7 @@ def _test_permute_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=permute_memory_to_nhwc + "TOSA-0.80.0+MI", permute_memory_to_nhwc=permute_memory_to_nhwc ), ) .export() @@ -79,7 +79,7 @@ def _test_permute_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_reciprocal.py b/backends/arm/test/ops/test_reciprocal.py index ccee3d39619..a71396caf3a 100644 --- a/backends/arm/test/ops/test_reciprocal.py +++ b/backends/arm/test/ops/test_reciprocal.py @@ -46,7 +46,7 @@ def _test_reciprocal_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.reciprocal.default": 1}) @@ -65,7 +65,7 @@ def _test_reciprocal_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_relu.py b/backends/arm/test/ops/test_relu.py index 5a7bd4f5ecf..595c907b323 100644 --- a/backends/arm/test/ops/test_relu.py +++ b/backends/arm/test/ops/test_relu.py @@ -48,7 +48,7 @@ def _test_relu_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.relu.default"]) @@ -69,7 +69,7 @@ def _test_relu_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_repeat.py b/backends/arm/test/ops/test_repeat.py index f43f7af13c3..de555e7c803 100644 --- a/backends/arm/test/ops/test_repeat.py +++ b/backends/arm/test/ops/test_repeat.py @@ -48,7 +48,7 @@ def _test_repeat_tosa_MI_pipeline(self, module: torch.nn.Module, test_data: Tupl ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.repeat.default": 1}) @@ -66,7 +66,7 @@ def _test_repeat_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: Tupl ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_rshift.py b/backends/arm/test/ops/test_rshift.py index 4c13beb7c4d..dfbd0fdb3e6 100644 --- a/backends/arm/test/ops/test_rshift.py +++ b/backends/arm/test/ops/test_rshift.py @@ -33,7 +33,7 @@ def _test_rshift_tosa_MI(self, test_data): ArmTester( self.Rshift(), example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge_transform_and_lower() @@ -46,7 +46,7 @@ def _test_rshift_tosa_BI(self, test_data): ArmTester( self.Rshift(), example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_rsqrt.py b/backends/arm/test/ops/test_rsqrt.py index 2bf5fc371c8..2cddc8da26e 100644 --- a/backends/arm/test/ops/test_rsqrt.py +++ b/backends/arm/test/ops/test_rsqrt.py @@ -35,7 +35,7 @@ def _test_rsqrt_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.rsqrt.default": 1}) @@ -53,7 +53,7 @@ def _test_rsqrt_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_scalars.py b/backends/arm/test/ops/test_scalars.py index f03d8f72d19..60c32a45579 100644 --- a/backends/arm/test/ops/test_scalars.py +++ b/backends/arm/test/ops/test_scalars.py @@ -129,7 +129,7 @@ def _test_add_tosa_MI_pipeline(self, module: torch.nn.Module, test_data: tuple): ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -143,7 +143,7 @@ def _test_add_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: tuple): ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_select.py b/backends/arm/test/ops/test_select.py index f44e61c64fe..c7194833cc0 100644 --- a/backends/arm/test/ops/test_select.py +++ b/backends/arm/test/ops/test_select.py @@ -58,7 +58,7 @@ def _test_select_tosa_MI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+MI", permute_memory_to_nhwc=permute + "TOSA-0.80.0+MI", permute_memory_to_nhwc=permute ), ) .export() @@ -84,7 +84,7 @@ def _test_select_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=permute + "TOSA-0.80.0+BI", permute_memory_to_nhwc=permute ), ) .quantize() diff --git a/backends/arm/test/ops/test_sigmoid.py b/backends/arm/test/ops/test_sigmoid.py index a5c6c86c52b..f12658c985a 100644 --- a/backends/arm/test/ops/test_sigmoid.py +++ b/backends/arm/test/ops/test_sigmoid.py @@ -71,7 +71,7 @@ def _test_sigmoid_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.sigmoid.default"]) @@ -89,7 +89,7 @@ def _test_sigmoid_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: Tup ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_slice.py b/backends/arm/test/ops/test_slice.py index 511873a8c21..0fc92b011a0 100644 --- a/backends/arm/test/ops/test_slice.py +++ b/backends/arm/test/ops/test_slice.py @@ -39,7 +39,7 @@ def _test_slice_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.slice.Tensor"]) @@ -60,7 +60,7 @@ def _test_slice_tosa_BI_pipeline( module, example_inputs=test_data, compile_spec=common.get_tosa_compile_spec( - "TOSA-0.80+BI", permute_memory_to_nhwc=permute + "TOSA-0.80.0+BI", permute_memory_to_nhwc=permute ), ) .quantize() diff --git a/backends/arm/test/ops/test_softmax.py b/backends/arm/test/ops/test_softmax.py index fd78d1a9acf..30215b47f3e 100644 --- a/backends/arm/test/ops/test_softmax.py +++ b/backends/arm/test/ops/test_softmax.py @@ -63,7 +63,7 @@ def _test_softmax_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.softmax.int"]) @@ -83,7 +83,7 @@ def _test_softmax_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_split.py b/backends/arm/test/ops/test_split.py index a1ba53c881c..42395c4c2d8 100644 --- a/backends/arm/test/ops/test_split.py +++ b/backends/arm/test/ops/test_split.py @@ -56,7 +56,7 @@ def _test_split_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -79,7 +79,7 @@ def _test_split_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_squeeze.py b/backends/arm/test/ops/test_squeeze.py index ac26fd73fac..7e915da645d 100644 --- a/backends/arm/test/ops/test_squeeze.py +++ b/backends/arm/test/ops/test_squeeze.py @@ -61,7 +61,7 @@ def _test_squeeze_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({export_target: 1}) @@ -82,7 +82,7 @@ def _test_squeeze_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_sub.py b/backends/arm/test/ops/test_sub.py index 851516753da..05921410280 100644 --- a/backends/arm/test/ops/test_sub.py +++ b/backends/arm/test/ops/test_sub.py @@ -42,7 +42,7 @@ def _test_sub_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.sub.Tensor": 1}) @@ -62,7 +62,7 @@ def _test_sub_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_sum.py b/backends/arm/test/ops/test_sum.py index 098e0fd1bc2..111517afbba 100644 --- a/backends/arm/test/ops/test_sum.py +++ b/backends/arm/test/ops/test_sum.py @@ -61,7 +61,7 @@ def _test_sum_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.sum.dim_IntList": 1}) @@ -80,7 +80,7 @@ def _test_sum_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_tanh.py b/backends/arm/test/ops/test_tanh.py index 060d7933ea5..5f3859eadd9 100644 --- a/backends/arm/test/ops/test_tanh.py +++ b/backends/arm/test/ops/test_tanh.py @@ -44,7 +44,7 @@ def _test_tanh_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.tanh.default"]) @@ -62,7 +62,7 @@ def _test_tanh_tosa_BI_pipeline(self, module: torch.nn.Module, test_data: Tuple) ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_to_copy.py b/backends/arm/test/ops/test_to_copy.py index 6992ac2f8e6..a9d827f9034 100644 --- a/backends/arm/test/ops/test_to_copy.py +++ b/backends/arm/test/ops/test_to_copy.py @@ -52,7 +52,7 @@ def _test_to_copy_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .dump_artifact() diff --git a/backends/arm/test/ops/test_unsqueeze.py b/backends/arm/test/ops/test_unsqueeze.py index a6faf70af05..8936d55f8bf 100644 --- a/backends/arm/test/ops/test_unsqueeze.py +++ b/backends/arm/test/ops/test_unsqueeze.py @@ -35,7 +35,7 @@ def _test_unsqueeze_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.unsqueeze.default": 1}) @@ -53,7 +53,7 @@ def _test_unsqueeze_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_upsample_nearest2d.py b/backends/arm/test/ops/test_upsample_nearest2d.py index 8984d716a3d..d03ac1e4417 100644 --- a/backends/arm/test/ops/test_upsample_nearest2d.py +++ b/backends/arm/test/ops/test_upsample_nearest2d.py @@ -87,7 +87,7 @@ def _test_upsample_nearest_2d_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check(["torch.ops.aten.upsample_nearest2d.vec"]) @@ -111,7 +111,7 @@ def _test_upsample_nearest_2d_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py index 322ac5b0edd..727cd053930 100644 --- a/backends/arm/test/ops/test_var.py +++ b/backends/arm/test/ops/test_var.py @@ -96,7 +96,7 @@ def _test_var_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -117,7 +117,7 @@ def _test_var_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) .export() diff --git a/backends/arm/test/ops/test_view.py b/backends/arm/test/ops/test_view.py index 1603a2a37d1..07a32fe5951 100644 --- a/backends/arm/test/ops/test_view.py +++ b/backends/arm/test/ops/test_view.py @@ -56,7 +56,7 @@ def _test_view_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .check_count({"torch.ops.aten.view.default": 1}) @@ -74,7 +74,7 @@ def _test_view_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/passes/test_meandim_to_averagepool2d.py b/backends/arm/test/passes/test_meandim_to_averagepool2d.py index 93badc64356..978a4c6fe51 100644 --- a/backends/arm/test/passes/test_meandim_to_averagepool2d.py +++ b/backends/arm/test/passes/test_meandim_to_averagepool2d.py @@ -46,7 +46,7 @@ def test_tosa_BI_meandim_to_averagepool(self): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() @@ -63,7 +63,7 @@ def test_tosa_BI_meandim_no_modification(self): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) .quantize() .export() diff --git a/backends/arm/test/passes/test_unsqueeze_before_repeat_pass.py b/backends/arm/test/passes/test_unsqueeze_before_repeat_pass.py index 4323e7332db..d249c18ec85 100644 --- a/backends/arm/test/passes/test_unsqueeze_before_repeat_pass.py +++ b/backends/arm/test/passes/test_unsqueeze_before_repeat_pass.py @@ -37,7 +37,7 @@ def test_tosa_MI_insert_view(self): ArmTester( module, example_inputs=inputs, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() @@ -61,7 +61,7 @@ def test_tosa_MI_dont_insert_view(self): ArmTester( module, example_inputs=inputs, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), ) .export() .to_edge() diff --git a/backends/arm/test/quantizer/test_generic_annotater.py b/backends/arm/test/quantizer/test_generic_annotater.py index 61be0ccb3e9..353c8b6019b 100644 --- a/backends/arm/test/quantizer/test_generic_annotater.py +++ b/backends/arm/test/quantizer/test_generic_annotater.py @@ -32,7 +32,7 @@ def check_annotation(self, model): tester = ArmTester( model, model.example_inputs(), - common.get_tosa_compile_spec("TOSA-0.80+BI"), + common.get_tosa_compile_spec("TOSA-0.80.0+BI"), ) quant_model = tester.quantize().get_artifact() partitions = get_source_partitions(quant_model.graph, [model.op]) diff --git a/backends/arm/tosa_specification.py b/backends/arm/tosa_specification.py index 232eb34afdb..716e8daee23 100644 --- a/backends/arm/tosa_specification.py +++ b/backends/arm/tosa_specification.py @@ -72,9 +72,9 @@ class from the found value or return None on failure. def create_from_string(repr: str) -> "TosaSpecification": """ Creates a TOSA specification class from a string representation: - TOSA-0.80+MI - TOSA-0.80+BI+8k - TOSA-0.80+BI+u55 # Ethos-U55 extension to handle TOSA subset + TOSA-0.80.0+MI + TOSA-0.80.0+BI+8k + TOSA-0.80.0+BI+u55 # Ethos-U55 extension to handle TOSA subset TOSA-0.90.0+MI TOSA-1.00.0+INT+FP+int4+cf """ diff --git a/backends/arm/tosa_utils.py b/backends/arm/tosa_utils.py index 0b03b31582f..1ae319e0cd7 100644 --- a/backends/arm/tosa_utils.py +++ b/backends/arm/tosa_utils.py @@ -78,7 +78,7 @@ def dbg_fail(node, tosa_graph, path): # Helper function to match TOSA's broadcasting rank requirement -# Ref: TOSA 0.80 specification - 1.9.3. Data Layouts from +# Ref: TOSA 0.80.0 specification - 1.9.3. Data Layouts from # https://www.mlplatform.org/tosa/tosa_spec.html def promote_shape(tosa_fb, arg, promoted_shape, out_dtype): assert np.prod(arg.shape) == np.prod(promoted_shape), "Incompatible promoted shape" @@ -90,7 +90,7 @@ def promote_shape(tosa_fb, arg, promoted_shape, out_dtype): # Helper transpose function to match TOSA's shape requirements -# E.g., TOSA 0.80 specification - 2.3.3 CONV2D shapes: +# E.g., TOSA 0.80.0 specification - 2.3.3 CONV2D shapes: # https://www.mlplatform.org/tosa/tosa_spec.html#_conv2d def transpose_helper(tosa_fb, input, new_order, out_dtype): # Check new_order's length is equal to input rank diff --git a/examples/arm/aot_arm_compiler.py b/examples/arm/aot_arm_compiler.py index 6713c9b6f8f..956086f547c 100644 --- a/examples/arm/aot_arm_compiler.py +++ b/examples/arm/aot_arm_compiler.py @@ -263,7 +263,7 @@ def get_compile_spec( if target == "TOSA": spec_builder = ( ArmCompileSpecBuilder() - .tosa_compile_spec("TOSA-0.80+BI") + .tosa_compile_spec("TOSA-0.80.0+BI") .set_permute_memory_format(True) ) elif "ethos-u55" in target: diff --git a/examples/arm/setup.sh b/examples/arm/setup.sh index bf922360fde..9e20d6043a9 100755 --- a/examples/arm/setup.sh +++ b/examples/arm/setup.sh @@ -88,7 +88,7 @@ ethos_u_base_rev="24.08" # tosa reference model tosa_reference_model_url="https://review.mlplatform.org/tosa/reference_model" -tosa_reference_model_rev="v0.80.1" +tosa_reference_model_rev="c5570b79e90c3a36ab8c4ddb8ee3fbc2cd3f7c38" # vela vela_repo_url="https://review.mlplatform.org/ml/ethos-u/ethos-u-vela"