diff --git a/backends/arm/README.md b/backends/arm/README.md index 6f4642f8d44..a7458db07ce 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.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. +- 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. 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 93b45483906..e2fdc42b113 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.0+BI" + base_tosa_version = "TOSA-0.80+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 ee8d5965a11..bf548982b74 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.0+BI"), - TosaSpecification.create_from_string("TOSA-0.80.0+MI"), + TosaSpecification.create_from_string("TOSA-0.80+BI"), + TosaSpecification.create_from_string("TOSA-0.80+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 dcf2ce316be..f2968585f24 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.0+BI"), - TosaSpecification.create_from_string("TOSA-0.80.0+MI"), + TosaSpecification.create_from_string("TOSA-0.80+BI"), + TosaSpecification.create_from_string("TOSA-0.80+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 2e6e0f9ad08..7f92574cfd1 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.0+BI"): {}, - TosaSpecification.create_from_string("TOSA-0.80.0+MI"): {}, + TosaSpecification.create_from_string("TOSA-0.80+BI"): {}, + TosaSpecification.create_from_string("TOSA-0.80+MI"): {}, } diff --git a/backends/arm/operators/node_visitor.py b/backends/arm/operators/node_visitor.py index 9e98ebcab98..87ef6ed4c67 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.0+BI"), - TosaSpecification.create_from_string("TOSA-0.80.0+MI"), + TosaSpecification.create_from_string("TOSA-0.80+BI"), + TosaSpecification.create_from_string("TOSA-0.80+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.0+BI"): {}, - TosaSpecification.create_from_string("TOSA-0.80.0+MI"): {}, + TosaSpecification.create_from_string("TOSA-0.80+BI"): {}, + TosaSpecification.create_from_string("TOSA-0.80+MI"): {}, } diff --git a/backends/arm/operators/op_add.py b/backends/arm/operators/op_add.py index bdae16fffbd..a81e52c5c6e 100644 --- a/backends/arm/operators/op_add.py +++ b/backends/arm/operators/op_add.py @@ -26,7 +26,7 @@ class AddVisitor_080_BI(NodeVisitor): target = "aten.add.Tensor" tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80.0+BI"), + TosaSpecification.create_from_string("TOSA-0.80+BI"), ] def __init__(self, *args): @@ -40,7 +40,7 @@ def define_node( output: TosaArg, is_quant_node: bool, ) -> None: - # Specification (0.80.0) states that input and output types + # Specification (0.80) states that input and output types # should all be the same assert inputs[0].dtype == inputs[1].dtype == output.dtype # Handle int8 (quantized) and int32 @@ -84,7 +84,7 @@ class AddVisitor_080_MI(AddVisitor_080_BI): # inheriting 'target' from BI class tosa_specs = [ - TosaSpecification.create_from_string("TOSA-0.80.0+MI"), + TosaSpecification.create_from_string("TOSA-0.80+MI"), ] def __init__(self, *args): @@ -98,7 +98,7 @@ def define_node( output: TosaArg, is_quant_node: bool, ) -> None: - # Specification (0.80.0) states that input and output types + # Specification (0.80) states that input and output types # should all be the same assert inputs[0].dtype == inputs[1].dtype == output.dtype diff --git a/backends/arm/test/misc/test_debug_feats.py b/backends/arm/test/misc/test_debug_feats.py index f82b5afc3b8..47d259da470 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+MI", + "TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 d7406afe95e..0698773e6f8 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/misc/test_lifted_tensor.py b/backends/arm/test/misc/test_lifted_tensor.py index 12b8d0665be..a16b1e639b1 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/misc/test_tosa_spec.py b/backends/arm/test/misc/test_tosa_spec.py index 5cbad140b77..77b10cf3151 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.0+BI", - "TOSA-0.80.0+MI+8k", - "TOSA-0.80.0+BI+u55", + "TOSA-0.80+BI", + "TOSA-0.80+MI+8k", + "TOSA-0.80+BI+u55", ] test_valid_1_00_strings = [ "TOSA-1.00.0+INT+FP+fft", @@ -35,11 +35,11 @@ } test_invalid_strings = [ - "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-0.80+bi", + "TOSA-0.80", + "TOSA-0.80+8k", + "TOSA-0.80+BI+MI", + "TOSA-0.80+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.0+BI".encode())],), - ([CompileSpec("tosa_version", "TOSA-0.80.0+BI+u55".encode())],), + ([CompileSpec("tosa_version", "TOSA-0.80+BI".encode())],), + ([CompileSpec("tosa_version", "TOSA-0.80+BI+u55".encode())],), ([CompileSpec("tosa_version", "TOSA-1.00.0+INT".encode())],), ] test_compile_specs_no_version = [ - ([CompileSpec("other_key", "TOSA-0.80.0+BI".encode())],), + ([CompileSpec("other_key", "TOSA-0.80+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 24af9cf41a2..6fbea63fb00 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 f40037f62fa..8d18c7ab539 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_avg_pool.py b/backends/arm/test/ops/test_avg_pool.py index 4801849949a..c517b5ebe4c 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 297ac0af1c7..17fe1bbea9c 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_bmm.py b/backends/arm/test/ops/test_bmm.py index 0952d2595ff..e7a9a2a810e 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_cat.py b/backends/arm/test/ops/test_cat.py index 4cef019c36c..674363e991a 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_clone.py b/backends/arm/test/ops/test_clone.py index 2e7726a0bc5..0238d62bb48 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 e6e027ed6ea..9a25da8aa12 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 222945cd162..19e3067344f 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 86bf9cb6321..aad16709948 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 083e9aaf68e..5419332c378 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 eaf6a21023d..c28ba3acdf3 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_exp.py b/backends/arm/test/ops/test_exp.py index 57cd23bb140..0bbd5097c31 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_expand.py b/backends/arm/test/ops/test_expand.py index a8cdd48b405..bd6b74d77b0 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 2ee41f8bc11..0c8afe1390b 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI", permute_memory_to_nhwc=permute_memory_to_nhwc + "TOSA-0.80+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 1c763e81677..65d5ca92b26 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 502764fe053..a1c17475ad5 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 8aabd365af4..4385ca9864a 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 4dd1fc97c7f..f9c34b1ff5e 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_logsoftmax.py b/backends/arm/test/ops/test_logsoftmax.py index 910384e0a09..69c8ee06ecf 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_max_pool.py b/backends/arm/test/ops/test_max_pool.py index 3a12616df62..ed2a3743198 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+BI", permute_memory_to_nhwc=True ), ) .quantize(Quantize(quantizer, get_symmetric_quantization_config())) diff --git a/backends/arm/test/ops/test_maximum.py b/backends/arm/test/ops/test_maximum.py index 61e1cccd0be..7e750645229 100644 --- a/backends/arm/test/ops/test_maximum.py +++ b/backends/arm/test/ops/test_maximum.py @@ -49,7 +49,7 @@ def _test_maximum_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), ) .export() .check_count({"torch.ops.aten.maximum.default": 1}) @@ -68,7 +68,7 @@ def _test_maximum_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_mean_dim.py b/backends/arm/test/ops/test_mean_dim.py index e725eb1ef42..e4f6afcbd63 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_minimum.py b/backends/arm/test/ops/test_minimum.py index b63bf80f69c..ddbdb24657a 100644 --- a/backends/arm/test/ops/test_minimum.py +++ b/backends/arm/test/ops/test_minimum.py @@ -49,7 +49,7 @@ def _test_minimum_tosa_MI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), ) .export() .check_count({"torch.ops.aten.minimum.default": 1}) @@ -68,7 +68,7 @@ def _test_minimum_tosa_BI_pipeline( ArmTester( module, example_inputs=test_data, - compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_mm.py b/backends/arm/test/ops/test_mm.py index 21b02bbd104..5fa28076aac 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_mul.py b/backends/arm/test/ops/test_mul.py index ced71b0072b..e18efc31a3b 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.0+MI", permute_memory_to_nhwc=True + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=True + "TOSA-0.80+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 581cd3cfbc4..72dd82f7262 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.0+MI", permute_memory_to_nhwc=permute_memory_to_nhwc + "TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 a71396caf3a..ccee3d39619 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_relu.py b/backends/arm/test/ops/test_relu.py index 595c907b323..5a7bd4f5ecf 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 de555e7c803..f43f7af13c3 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 dfbd0fdb3e6..4c13beb7c4d 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_rsqrt.py b/backends/arm/test/ops/test_rsqrt.py index 2cddc8da26e..2bf5fc371c8 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_scalars.py b/backends/arm/test/ops/test_scalars.py index 60c32a45579..f03d8f72d19 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_select.py b/backends/arm/test/ops/test_select.py index c7194833cc0..f44e61c64fe 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.0+MI", permute_memory_to_nhwc=permute + "TOSA-0.80+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.0+BI", permute_memory_to_nhwc=permute + "TOSA-0.80+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 f12658c985a..a5c6c86c52b 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_slice.py b/backends/arm/test/ops/test_slice.py index 0fc92b011a0..511873a8c21 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI", permute_memory_to_nhwc=permute + "TOSA-0.80+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 30215b47f3e..fd78d1a9acf 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_split.py b/backends/arm/test/ops/test_split.py index 42395c4c2d8..a1ba53c881c 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_squeeze.py b/backends/arm/test/ops/test_squeeze.py index 7e915da645d..ac26fd73fac 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_sub.py b/backends/arm/test/ops/test_sub.py index 05921410280..851516753da 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_sum.py b/backends/arm/test/ops/test_sum.py index 111517afbba..098e0fd1bc2 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_tanh.py b/backends/arm/test/ops/test_tanh.py index 5f3859eadd9..060d7933ea5 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_to_copy.py b/backends/arm/test/ops/test_to_copy.py index a9d827f9034..6992ac2f8e6 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"), ) .export() .dump_artifact() diff --git a/backends/arm/test/ops/test_unsqueeze.py b/backends/arm/test/ops/test_unsqueeze.py index 8936d55f8bf..a6faf70af05 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_upsample_nearest2d.py b/backends/arm/test/ops/test_upsample_nearest2d.py index d03ac1e4417..8984d716a3d 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py index 727cd053930..322ac5b0edd 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 07a32fe5951..1603a2a37d1 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"), ) .quantize() .export() diff --git a/backends/arm/test/passes/test_fold_qdq_pass.py b/backends/arm/test/passes/test_fold_qdq_pass.py index 222070b4223..cd7cf751391 100644 --- a/backends/arm/test/passes/test_fold_qdq_pass.py +++ b/backends/arm/test/passes/test_fold_qdq_pass.py @@ -54,7 +54,7 @@ def test_fold_qdq_pass(self): ArmTester( module, example_inputs=module.get_inputs(), - compile_spec=common.get_tosa_compile_spec("TOSA-0.80.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 978a4c6fe51..93badc64356 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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+BI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 d249c18ec85..4323e7332db 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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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.0+MI"), + compile_spec=common.get_tosa_compile_spec("TOSA-0.80+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 353c8b6019b..61be0ccb3e9 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.0+BI"), + common.get_tosa_compile_spec("TOSA-0.80+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 716e8daee23..232eb34afdb 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.0+MI - TOSA-0.80.0+BI+8k - TOSA-0.80.0+BI+u55 # Ethos-U55 extension to handle TOSA subset + TOSA-0.80+MI + TOSA-0.80+BI+8k + TOSA-0.80+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 1ae319e0cd7..0b03b31582f 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.0 specification - 1.9.3. Data Layouts from +# Ref: TOSA 0.80 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.0 specification - 2.3.3 CONV2D shapes: +# E.g., TOSA 0.80 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 6d899c21461..7fc2cf0564f 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.0+BI") + .tosa_compile_spec("TOSA-0.80+BI") .set_permute_memory_format(True) ) elif "ethos-u55" in target: diff --git a/examples/arm/setup.sh b/examples/arm/setup.sh index 9e20d6043a9..bf922360fde 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="c5570b79e90c3a36ab8c4ddb8ee3fbc2cd3f7c38" +tosa_reference_model_rev="v0.80.1" # vela vela_repo_url="https://review.mlplatform.org/ml/ethos-u/ethos-u-vela"