Skip to content

Commit 6f560ea

Browse files
angelayifacebook-github-bot
authored andcommitted
Fix .module() calls (#2258)
Summary: D53827930 Reviewed By: aakhundov Differential Revision: D54542173
1 parent 911094e commit 6f560ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exir/emit/test/test_emit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def forward(self, x):
215215
return [((1, 3, 1.2), True, [x + x, x * x])]
216216

217217
ep = torch.export.export(M(), (torch.ones(2, 3),))
218-
res = ep(torch.ones(2, 3))
218+
res = ep.module()(torch.ones(2, 3))
219219
self.assertEqual(res[0][0], (1, 3, 1.2))
220220
program = to_edge(ep).to_executorch().executorch_program
221221
outputs = program.execution_plan[0].outputs
@@ -235,7 +235,7 @@ def forward(self, x, y, z):
235235
return x + y, x + x, x + y + z
236236

237237
ep = torch.export.export(M(), (torch.ones(2, 3), 2, True))
238-
ep(torch.ones(2, 3), 2, True)
238+
ep.module()(torch.ones(2, 3), 2, True)
239239
program = to_edge(ep).to_executorch().executorch_program
240240
inputs = program.execution_plan[0].inputs
241241
self.assertEqual(len(inputs), 3)

0 commit comments

Comments
 (0)