Skip to content

Commit 5fb4787

Browse files
gmagogsfmfacebook-github-bot
authored andcommitted
executorch/test/models (#7387)
Summary: Pull Request resolved: #7387 Reviewed By: avikchaudhuri, ydwu4 Differential Revision: D67384250
1 parent c337bef commit 5fb4787

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/models/export_delegated_program.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ def __init__(self, fn):
130130
def forward(self, *args, **kwargs):
131131
return self.fn(*args, **kwargs)
132132

133-
exported_program = export(WrapperModule(getattr(eager_module, method)), args=inputs)
133+
exported_program = export(
134+
WrapperModule(getattr(eager_module, method)), args=inputs, strict=True
135+
)
134136

135137
edge_config = EdgeCompileConfig(_check_ir_validity=False)
136138
et_config = exir.ExecutorchBackendConfig(
@@ -167,7 +169,7 @@ def forward(self, *args, **kwargs):
167169
composite_module(*inputs)
168170

169171
executorch_program = to_edge(
170-
export(composite_module, args=inputs)
172+
export(composite_module, args=inputs, strict=True)
171173
).to_executorch(config=et_config)
172174

173175
return executorch_program.buffer

test/models/generate_linear_out_bundled_program.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main() -> None:
3737
trace_inputs = (torch.ones(2, 2, dtype=torch.float),)
3838

3939
# Trace to FX Graph.
40-
exec_prog = to_edge(export(model, trace_inputs)).to_executorch(
40+
exec_prog = to_edge(export(model, trace_inputs, strict=True)).to_executorch(
4141
config=ExecutorchBackendConfig(
4242
memory_planning_pass=MemoryPlanningPass(),
4343
to_out_var_pass=ToOutVarPass(),

0 commit comments

Comments
 (0)