Skip to content

Commit

Permalink
2024-06-15 nightly release (4b6331d)
Browse files Browse the repository at this point in the history
  • Loading branch information
pytorchbot committed Jun 15, 2024
1 parent 1d2fb27 commit e08e0a1
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion backends/arm/test/models/test_mobilenet_v2_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_mv2_tosa_MI(self):
.check(list(self.all_operators))
.partition()
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=self.model_inputs)
)

def test_mv2_tosa_BI(self):
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _test_add_tosa_MI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_add_tosa_BI_pipeline(
Expand All @@ -91,7 +91,7 @@ def _test_add_tosa_BI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_add_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_avg_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _test_avgpool2d_tosa_MI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten_avg_pool2d_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_avgpool2d_tosa_BI_pipeline(
Expand All @@ -81,7 +81,7 @@ def _test_avgpool2d_tosa_BI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten_avg_pool2d_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_avgpool2d_tosa_u55_BI_pipeline(
Expand Down
6 changes: 3 additions & 3 deletions backends/arm/test/ops/test_batch_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def _test_batchnorm2d_tosa_MI_pipeline(
]
)
.to_executorch()
.run_method_and_compare_outputs(test_data)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_batchnorm2d_no_stats_tosa_MI_pipeline(
Expand Down Expand Up @@ -581,7 +581,7 @@ def _test_batchnorm2d_no_stats_tosa_MI_pipeline(
]
)
.to_executorch()
.run_method_and_compare_outputs(test_data)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_batchnorm2d_tosa_BI_pipeline(
Expand Down Expand Up @@ -613,7 +613,7 @@ def _test_batchnorm2d_tosa_BI_pipeline(
]
)
.to_executorch()
.run_method_and_compare_outputs(test_data)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_batchnorm2d_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _test_clone_tosa_MI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_clone_tosa_BI_pipeline(
Expand All @@ -66,7 +66,7 @@ def _test_clone_tosa_BI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_clone_tosa_u55_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _test_conv2d_tosa_MI_pipeline(
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.check_not(["executorch_exir_dialects_edge__ops_aten_convolution_default"])
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_conv2d_tosa_BI_pipeline(
Expand All @@ -277,7 +277,7 @@ def _test_conv2d_tosa_BI_pipeline(
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.check_not(["executorch_exir_dialects_edge__ops_aten_convolution_default"])
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_conv2d_u55_BI_pipeline(
Expand Down
6 changes: 4 additions & 2 deletions backends/arm/test/ops/test_conv_combos.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _test_conv_combo_tosa_MI_pipeline(
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.check_not(list(module.edge_op_list))
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_conv_combo_tosa_BI_pipeline(
Expand All @@ -192,7 +192,9 @@ def _test_conv_combo_tosa_BI_pipeline(
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.check_not(list(module.edge_op_list))
.to_executorch()
.run_method_and_compare_outputs(atol=atol, rtol=rtol, qtol=1)
.run_method_and_compare_outputs(
inputs=test_data, atol=atol, rtol=rtol, qtol=1
)
)

def _test_conv_combo_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_depthwise_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _test_dw_conv2d_tosa_MI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten_convolution_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_dw_conv2d_tosa_BI_pipeline(
Expand All @@ -161,7 +161,7 @@ def _test_dw_conv2d_tosa_BI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten_convolution_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_dw_conv2d_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_div.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _test_div_tosa_MI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(test_data)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_div_tosa_BI_pipeline(
Expand All @@ -137,7 +137,7 @@ def _test_div_tosa_BI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(test_data)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_div_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _test_linear_tosa_MI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_linear_tosa_BI_pipeline(
Expand All @@ -149,7 +149,7 @@ def _test_linear_tosa_BI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=True)
.run_method_and_compare_outputs(inputs=test_data, qtol=True)
)

def _test_linear_tosa_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_mean_dim.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _test_meandim_tosa_MI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten_mean_dim"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_meandim_tosa_BI_pipeline(
Expand All @@ -86,7 +86,7 @@ def _test_meandim_tosa_BI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten_mean_dim"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_meandim_tosa_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _test_softmax_tosa_MI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten__softmax_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs()
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_softmax_tosa_BI_pipeline(
Expand All @@ -74,7 +74,7 @@ def _test_softmax_tosa_BI_pipeline(
.check_not(["executorch_exir_dialects_edge__ops_aten__softmax_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_softmax_tosa_u55_BI_pipeline(
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/test/ops/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _test_view_tosa_MI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data)
)

def _test_view_tosa_BI_pipeline(
Expand All @@ -63,7 +63,7 @@ def _test_view_tosa_BI_pipeline(
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(qtol=1)
.run_method_and_compare_outputs(inputs=test_data, qtol=1)
)

def _test_view_u55_BI_pipeline(
Expand Down
3 changes: 2 additions & 1 deletion exir/lowered_backend_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from executorch.exir.schema import Program

from executorch.exir.tracer import Value
from torch._library.fake_class_registry import FakeScriptObject

from torch._subclasses import FakeTensor
from torch.export.exported_program import (
Expand Down Expand Up @@ -430,7 +431,7 @@ def _get_new_signature( # noqa: C901
) -> Tuple[
ExportGraphSignature,
Dict[str, Union[torch.Tensor, torch.nn.Parameter]],
Dict[str, Union[torch.Tensor, torch.ScriptObject]],
Dict[str, Union[torch.Tensor, FakeScriptObject, torch.ScriptObject]],
]:
"""
Args:
Expand Down

0 comments on commit e08e0a1

Please sign in to comment.