From c306d2b181c6f0317d6a662b4f0ef8f57b856879 Mon Sep 17 00:00:00 2001 From: "Yanan Cao (PyTorch)" Date: Thu, 19 Dec 2024 10:59:17 -0800 Subject: [PATCH] executorch/exir/verification/test (#7395) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/7395 Reviewed By: avikchaudhuri, ydwu4 Differential Revision: D67383435 --- exir/verification/test/test_verifier.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exir/verification/test/test_verifier.py b/exir/verification/test/test_verifier.py index 1ee48ef4d43..369f976076d 100644 --- a/exir/verification/test/test_verifier.py +++ b/exir/verification/test/test_verifier.py @@ -44,7 +44,7 @@ def forward(self, x, y): torch._check(z < 4) return x[z : z + y.shape[0]] - ep = torch.export.export(M(), (torch.randn(10), torch.tensor([3]))) + ep = torch.export.export(M(), (torch.randn(10), torch.tensor([3])), strict=True) compile_config_with_disable_ir_validity = EdgeCompileConfig( _check_ir_validity=False @@ -82,7 +82,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor: example_input = (torch.zeros([2, 2]),) - export_model = export(m, example_input) + export_model = export(m, example_input, strict=True) compile_config_without_edge_op = EdgeCompileConfig( _use_edge_ops=False, _skip_dim_order=False @@ -131,7 +131,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor: ), ) - export_model = export(m, example_input) + export_model = export(m, example_input, strict=True) compile_config_with_dim_order = EdgeCompileConfig(_skip_dim_order=False) compile_config_with_stride = EdgeCompileConfig(_skip_dim_order=True)