diff --git a/backends/arm/test/ops/test_layer_norm.py b/backends/arm/test/ops/test_layer_norm.py index 4e91554e05a..7ed181711a1 100644 --- a/backends/arm/test/ops/test_layer_norm.py +++ b/backends/arm/test/ops/test_layer_norm.py @@ -77,47 +77,31 @@ def test_native_layer_norm_tosa_BI(test_data): test_data[0], "torch.ops.aten.sub.Tensor", # Just check for sub op included in the layernorm decomposition ) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() @common.parametrize("test_data", test_data_suite) +@common.XfailIfNoCorstone300 def test_native_layer_norm_u55_BI(test_data): pipeline = EthosU55PipelineBI[input_t]( test_data[1], test_data[0], "torch.ops.aten.sub.Tensor", # Just check for sub op included in the layernorm decomposition + run_on_fvp=True, ) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() @common.parametrize("test_data", test_data_suite) +@common.XfailIfNoCorstone320 def test_native_layer_norm_u85_BI(test_data): - pipeline = EthosU85PipelineBI[input_t]( - test_data[1], - test_data[0], - "torch.ops.aten.sub.Tensor", # Just check for sub op included in the layernorm decomposition - ) - pipeline.run() - - -@common.parametrize("test_data", test_data_suite) -@common.SkipIfNoCorstone300 -def test_native_layer_norm_u55_BI_on_fvp(test_data): - pipeline = EthosU55PipelineBI[input_t]( - test_data[1], - test_data[0], - "torch.ops.aten.sub.Tensor", # Just check for sub op included in the layernorm decomposition - ) - pipeline.run() - - -@common.parametrize("test_data", test_data_suite) -@common.SkipIfNoCorstone320 -def test_native_layer_norm_u85_BI_on_fvp(test_data): pipeline = EthosU85PipelineBI[input_t]( test_data[1], test_data[0], "torch.ops.aten.sub.Tensor", # Just check for sub op included in the layernorm decomposition run_on_fvp=True, ) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() diff --git a/backends/arm/test/ops/test_logsoftmax.py b/backends/arm/test/ops/test_logsoftmax.py index 3e4cc1c0faa..7068ee77e01 100644 --- a/backends/arm/test/ops/test_logsoftmax.py +++ b/backends/arm/test/ops/test_logsoftmax.py @@ -47,6 +47,7 @@ def test_log_softmax_tosa_MI(test_data): pipeline.add_stage_after( "to_edge_transform_and_lower", pipeline.tester.check_not, [exir_op] ) + pipeline.run() @@ -55,22 +56,7 @@ def test_log_softmax_tosa_BI(test_data): data, dim = test_data pipeline = TosaPipelineBI[input_t1](LogSoftmax(dim), data, []) pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) - pipeline.run() - - -@common.parametrize("test_data", LogSoftmax.test_data) -def test_log_softmax_u55_BI(test_data): - data, dim = test_data - pipeline = EthosU55PipelineBI[input_t1](LogSoftmax(dim), data, [], run_on_fvp=False) - pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) - pipeline.run() - - -@common.parametrize("test_data", LogSoftmax.test_data) -def test_log_softmax_u85_BI(test_data): - data, dim = test_data - pipeline = EthosU85PipelineBI[input_t1](LogSoftmax(dim), data, [], run_on_fvp=False) - pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() @@ -81,11 +67,12 @@ def test_log_softmax_u85_BI(test_data): "randn_mult_batches": "MLETORCH-433: Multiple batches not supported on FVP" }, ) -@common.SkipIfNoCorstone300() -def test_log_softmax_u55_BI_on_fvp(test_data): +@common.XfailIfNoCorstone300() +def test_log_softmax_u55_BI(test_data): data, dim = test_data pipeline = EthosU55PipelineBI[input_t1](LogSoftmax(dim), data, [], run_on_fvp=True) pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() @@ -96,9 +83,10 @@ def test_log_softmax_u55_BI_on_fvp(test_data): "randn_mult_batches": "MLETORCH-433: Multiple batches not supported on FVP" }, ) -@common.SkipIfNoCorstone320 -def test_log_softmax_u85_BI_on_fvp(test_data): +@common.XfailIfNoCorstone320 +def test_log_softmax_u85_BI(test_data): data, dim = test_data pipeline = EthosU85PipelineBI[input_t1](LogSoftmax(dim), data, [], run_on_fvp=True) pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() diff --git a/backends/arm/test/ops/test_mean_dim.py b/backends/arm/test/ops/test_mean_dim.py index 9d67030cc4f..2351b0f9e9c 100644 --- a/backends/arm/test/ops/test_mean_dim.py +++ b/backends/arm/test/ops/test_mean_dim.py @@ -139,48 +139,36 @@ def test_mean_tosa_MI(test_data): @common.parametrize("test_data", MeanDim.test_data_suite) def test_mean_tosa_BI(test_data): - TosaPipelineBI[input_t]( - MeanDim(test_data[1], test_data[2]), - (test_data[0],), - "torch.ops.aten.sum.dim_IntList", # Just check for sum op included in the mean decomposition - ).run() - - -@common.parametrize("test_data", MeanDim.test_data_suite) -def test_mean_u55(test_data): - EthosU55PipelineBI[input_t]( - MeanDim(test_data[1], test_data[2]), - (test_data[0],), - "torch.ops.aten.sum.dim_IntList", # Just check for sum op included in the mean decomposition - ).run() - - -@common.parametrize("test_data", MeanDim.test_data_suite) -def test_mean_u85(test_data): - EthosU85PipelineBI[input_t]( + pipeline = TosaPipelineBI[input_t]( MeanDim(test_data[1], test_data[2]), (test_data[0],), "torch.ops.aten.sum.dim_IntList", # Just check for sum op included in the mean decomposition - ).run() + ) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) + pipeline.run() @common.parametrize("test_data", MeanDim.test_data_suite) -@common.SkipIfNoCorstone300 -def test_mean_u55_on_fvp(test_data): - EthosU55PipelineBI[input_t]( +@common.XfailIfNoCorstone300 +def test_mean_u55_BI(test_data): + pipeline = EthosU55PipelineBI[input_t]( MeanDim(test_data[1], test_data[2]), (test_data[0],), "torch.ops.aten.sum.dim_IntList", # Just check for sum op included in the mean decomposition run_on_fvp=True, - ).run() + ) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) + pipeline.run() @common.parametrize("test_data", MeanDim.test_data_suite) -@common.SkipIfNoCorstone320 -def test_mean_u85_on_fvp(test_data): - EthosU85PipelineBI[input_t]( +@common.XfailIfNoCorstone320 +def test_mean_u85_BI(test_data): + pipeline = EthosU85PipelineBI[input_t]( MeanDim(test_data[1], test_data[2]), (test_data[0],), "torch.ops.aten.sum.dim_IntList", # Just check for sum op included in the mean decomposition run_on_fvp=True, - ).run() + ) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) + pipeline.run() diff --git a/backends/arm/test/ops/test_softmax.py b/backends/arm/test/ops/test_softmax.py index d51f20040b0..dcee5d038f2 100644 --- a/backends/arm/test/ops/test_softmax.py +++ b/backends/arm/test/ops/test_softmax.py @@ -57,22 +57,7 @@ def test_softmax_tosa_BI(test_data): data, dim = test_data pipeline = TosaPipelineBI[input_t1](Softmax(dim), data, []) pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) - pipeline.run() - - -@common.parametrize("test_data", Softmax.test_data) -def test_softmax_u55_BI(test_data): - data, dim = test_data - pipeline = EthosU55PipelineBI[input_t1](Softmax(dim), data, [], run_on_fvp=False) - pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) - pipeline.run() - - -@common.parametrize("test_data", Softmax.test_data) -def test_softmax_u85_BI(test_data): - data, dim = test_data - pipeline = EthosU85PipelineBI[input_t1](Softmax(dim), data, [], run_on_fvp=False) - pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() @@ -83,11 +68,12 @@ def test_softmax_u85_BI(test_data): "randn_mult_batches": "MLETORCH-433: Multiple batches not supported on FVP" }, ) -@common.SkipIfNoCorstone300 -def test_softmax_u55_BI_on_fvp(test_data): +@common.XfailIfNoCorstone300 +def test_softmax_u55_BI(test_data): data, dim = test_data pipeline = EthosU55PipelineBI[input_t1](Softmax(dim), data, [], run_on_fvp=True) pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run() @@ -98,9 +84,10 @@ def test_softmax_u55_BI_on_fvp(test_data): "randn_mult_batches": "MLETORCH-433: Multiple batches not supported on FVP" }, ) -@common.SkipIfNoCorstone320 -def test_softmax_u85_BI_on_fvp(test_data): +@common.XfailIfNoCorstone320 +def test_softmax_u85_BI(test_data): data, dim = test_data pipeline = EthosU85PipelineBI[input_t1](Softmax(dim), data, [], run_on_fvp=True) pipeline.add_stage_after("quantize", pipeline.tester.check_not, [aten_op]) + pipeline.change_args("run_method_and_compare_outputs", qtol=1) pipeline.run()