Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiafei committed Jul 18, 2023
1 parent 6eb2963 commit 221d54a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytorch_blade/tests/disc/test_dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_capture(self):
import torch._dynamo as dynamo
import torch_blade.dynamo
explain_out = dynamo.explain(func1, b=torch.rand([2]))
self.assertEqual(explain_out.graph_count, 1)
if type(explain_out) is tuple:
self.assertEqual(len(explain_out[2]), 1)
else:
self.assertEqual(explain_out.graph_count, 1)

if __name__ == '__main__':
unittest.main()

0 comments on commit 221d54a

Please sign in to comment.