-
Notifications
You must be signed in to change notification settings - Fork 89
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
fix start index of statistic arrays #2926
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2926 +/- ##
========================================
Coverage 91.83% 91.83%
========================================
Files 479 479
Lines 18340 18340
========================================
Hits 16842 16842
Misses 1498 1498 ☔ View full report in Codecov by Sentry. |
@@ -263,12 +263,12 @@ def main(): | |||
|
|||
if flags.QPS: | |||
print("resnet50, Rate = {} QPS ".format( | |||
format((((flags.batch) / (sum(latency[1:]) / len(latency[1:])))), | |||
format((((flags.batch) / (sum(latency[0:]) / len(latency[0:])))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find.
I assume the reason why it started with [1:]
was that it considered first run as the warmup run.
If you doing --run 1
it wouldn't give you the most accurate performance numbers.
I think it is better to do warm up runs as a separate calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we needed the warmup run since there was overhead during setup.
This is required as this step also includes the additional run. A better approach here would be to set the amount of runs to run 1
+ 1 so that you still do a warmup run, but run two runs under the hood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 256, make this flags.run + 1
That should handle the case --run 1 but doing two runs, one cold start another valid. Then you can still use latency[1:] vs [0:]
@jasberc why was this closed? |
This fixes corruption of "python resnet50.py" with "--run 1" and correct statistic results.