diff --git a/test/models/export_delegated_program.py b/test/models/export_delegated_program.py index a37fe32e55..a85dab6753 100644 --- a/test/models/export_delegated_program.py +++ b/test/models/export_delegated_program.py @@ -130,7 +130,9 @@ def __init__(self, fn): def forward(self, *args, **kwargs): return self.fn(*args, **kwargs) - exported_program = export(WrapperModule(getattr(eager_module, method)), args=inputs) + exported_program = export( + WrapperModule(getattr(eager_module, method)), args=inputs, strict=True + ) edge_config = EdgeCompileConfig(_check_ir_validity=False) et_config = exir.ExecutorchBackendConfig( @@ -167,7 +169,7 @@ def forward(self, *args, **kwargs): composite_module(*inputs) executorch_program = to_edge( - export(composite_module, args=inputs) + export(composite_module, args=inputs, strict=True) ).to_executorch(config=et_config) return executorch_program.buffer diff --git a/test/models/generate_linear_out_bundled_program.py b/test/models/generate_linear_out_bundled_program.py index 93fd1445ef..c98ea7ed68 100644 --- a/test/models/generate_linear_out_bundled_program.py +++ b/test/models/generate_linear_out_bundled_program.py @@ -37,7 +37,7 @@ def main() -> None: trace_inputs = (torch.ones(2, 2, dtype=torch.float),) # Trace to FX Graph. - exec_prog = to_edge(export(model, trace_inputs)).to_executorch( + exec_prog = to_edge(export(model, trace_inputs, strict=True)).to_executorch( config=ExecutorchBackendConfig( memory_planning_pass=MemoryPlanningPass(), to_out_var_pass=ToOutVarPass(),