Skip to content

Commit 47d39b8

Browse files
zhxchen17facebook-github-bot
authored andcommitted
Work around spec violation in executorch program unit test.
Summary: 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
1 parent 167b72d commit 47d39b8

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)