Skip to content

Commit 2f24502

Browse files
zhxchen17facebook-github-bot
authored andcommitted
Work around spec violation in executorch program unit test. (#453)
Summary: Pull Request resolved: #453 In theory, we shouldn't serialize an executorch program with default serializer because there is a spec violation with out variant graph. Reviewed By: angelayi Differential Revision: D49548576 fbshipit-source-id: cedf9810c594b33019eb50514e645c36289ce192
1 parent cf0676b commit 2f24502

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exir/tests/test_serde.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def check_serde(self, m, inputs) -> None:
5656

5757
executorch = edge.to_executorch().dump_exported_program()
5858
executorch_new = deserialize(*serialize(executorch))
59-
self.check_ep(executorch, executorch_new, inputs)
59+
with torch.no_grad():
60+
self.check_ep(executorch, executorch_new, inputs)
6061

6162
def test_basic(self) -> None:
6263
class MyModule(torch.nn.Module):

0 commit comments

Comments
 (0)