Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
Differential Revision: D67551054

Pull Request resolved: pytorch#7422
  • Loading branch information
lucylq authored Dec 21, 2024
1 parent c09d39b commit 6c3a792
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions exir/emit/test/test_emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions exir/tests/test_quant_fusion_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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):
Expand Down

0 comments on commit 6c3a792

Please sign in to comment.