From 6c3a792a99b470e38b42b675a615b1d38e0dd323 Mon Sep 17 00:00:00 2001 From: lucylq Date: Fri, 20 Dec 2024 18:34:36 -0800 Subject: [PATCH] linter Differential Revision: D67551054 Pull Request resolved: https://github.com/pytorch/executorch/pull/7422 --- exir/emit/test/test_emit.py | 6 +++--- exir/tests/test_quant_fusion_pass.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exir/emit/test/test_emit.py b/exir/emit/test/test_emit.py index 6aea0297f9..a645fa5377 100644 --- a/exir/emit/test/test_emit.py +++ b/exir/emit/test/test_emit.py @@ -335,7 +335,8 @@ def forward(self, x: torch.Tensor) -> torch.Tensor: program = ( to_edge(export(f, (torch.randn(2, 3, 5),), strict=True)) - .to_executorch().executorch_program + .to_executorch() + .executorch_program ) exir.print_program.pretty_print(program) @@ -522,8 +523,7 @@ def forward(self, x: torch.Tensor, n: torch.Tensor) -> torch.Tensor: program = ( to_edge(export(f, (x, x), strict=True)) # .to_edge(self.compile_config) # TODO(larryliu): fix cat - .to_executorch() - .executorch_program + .to_executorch().executorch_program ) self.assertEqual(len(program.execution_plan[0].chains[0].instructions), 1) diff --git a/exir/tests/test_quant_fusion_pass.py b/exir/tests/test_quant_fusion_pass.py index bb829688bc..a339ad9781 100644 --- a/exir/tests/test_quant_fusion_pass.py +++ b/exir/tests/test_quant_fusion_pass.py @@ -163,7 +163,9 @@ def forward(self, x, y): exactly=True, ).check("executorch_exir_dialects_edge__ops_aten_slice_copy_Tensor").check( "executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default" - ).check("executorch_exir_dialects_edge__ops_aten_slice_copy_Tensor").check( + ).check( + "executorch_exir_dialects_edge__ops_aten_slice_copy_Tensor" + ).check( "executorch_exir_dialects_edge__ops_quantized_decomposed_add_default" ).check( "executorch_exir_dialects_edge__ops_quantized_decomposed_dequantize_per_tensor_default" @@ -175,9 +177,7 @@ def forward(self, x, y): # check that we are using out variant of add and slice_copy FileCheck().check("torch.ops.quantized_decomposed.add.out").check( "torch.ops.aten.slice_copy.Tensor_out" - ).run( - m.exported_program().graph_module.code - ) + ).run(m.exported_program().graph_module.code) def test_cat(self) -> None: class M(torch.nn.Module):