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

fix start index of statistic arrays #2926

Closed
wants to merge 1 commit into from
Closed

Conversation

jasberc
Copy link
Contributor

@jasberc jasberc commented Mar 26, 2024

This fixes corruption of "python resnet50.py" with "--run 1" and correct statistic results.

@jasberc jasberc requested a review from causten as a code owner March 26, 2024 02:57
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.83%. Comparing base (a4a2202) to head (6437d6d).

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.
📢 Have feedback on the report? Share it here.

@@ -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:])))),
Copy link
Member

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.

Copy link
Collaborator

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.

Copy link
Collaborator

@TedThemistokleous TedThemistokleous left a 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 jasberc closed this Mar 27, 2024
@TedThemistokleous
Copy link
Collaborator

@jasberc why was this closed?

@jasberc
Copy link
Contributor Author

jasberc commented Apr 16, 2024

@jasberc why was this closed?

it's reformed in #2928 and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants