Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compile count in Dynamo test more general #6802

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/dynamo/test_dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,10 @@ def test_resnet18(self):
# Graph 5: sync input for backward (TODO(JackCaoG) understand why there are two graphs)
# Graph 6, 7: PyTorch has updated the number of captured by resnet
# (https://github.com/pytorch/pytorch/pull/117434)
self.assertEqual(met.metric_data('CompileTime')[0], 7)
self.assertLessEqual(met.metric_data('CompileTime')[0], 7)
# We execute 4 graphs per step (+ 1 for SGD) when optimizer is enabled.
self.assertEqual(met.metric_data('ExecuteTime')[0], sample_count * 4 + 1)
self.assertLessEqual(
met.metric_data('ExecuteTime')[0], sample_count * 4 + 1)
# one for each forward, backward and optimizer
self.assertEqual(
met.metric_data('RunCachedGraphInputData')[0], sample_count * 3)
Expand Down
1 change: 1 addition & 0 deletions torch_patches/.torch_pin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#122349
Loading