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

Update gloo benchmark output #294

Closed
wants to merge 1 commit into from

Conversation

sofong5
Copy link
Contributor

@sofong5 sofong5 commented Feb 25, 2021

Summary:
The purpose of this diff is to update how errors are displayed during correctness verification.

Originally, the benchmark would exit right away once it detects a mismatch. This diff changes this so that the currently running benchmark is now run to completion and mismatches are only displayed at the very end.

If a user does not specify element size, the benchmark by default will do a sweep of numbers ranging from 100 to 5000000. In this case, the benchmark will stop the next sweep at the first instance of a mismatch (but will still run current one to completion). See test plan for example.

Change Summary:

  • Refactor out a common verify pattern into a new function constStrideVerify where there is a constant stride between elements in the array
  • Add new errorMsg parameter to the verify function which will catch all error messages generated to print at the end
  • Add new class function printMismatches that outputs the mismatches
  • Break output into more readable sections by printing headers

Differential Revision: D26637016

@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D26637016

sofong5 pushed a commit to sofong5/gloo that referenced this pull request Mar 2, 2021
Summary:
Pull Request resolved: facebookincubator#294

Design Doc: https://fb.quip.com/vWFvAIF4HK0f

The purpose of this diff is to update the output format of the gloo benchmark. More specifically, we want to:
- Update how errors are displayed during correctness verification.
- Add sections for better readability
- Clarify column titles

For mismatch errors:

Originally, the benchmark would exit right away once it detects a mismatch. This diff changes this so that the currently running benchmark is now run to completion and mismatches are only displayed at the very end.

If a user does not specify element size, the benchmark by default will do a sweep of numbers ranging from 100 to 5000000. In this case, the benchmark will stop the next sweep at the first instance of a mismatch (but will still run current one to completion). See test plan for example.

Change Summary:
- Print value of verify flag in options
- Refactor out a common verify pattern into a new function `constStrideVerify` where there is a constant stride between elements in the array
- Add new `errors` parameter to the verify function which will catch all error messages generated to print at the end
- New class function `checkErrors` that prints the errors and exits
- New class functions `printVerifyHeader` and `printFooter`
- Break output into more readable sections by printing headers
- Add new `size` column to benchmark results
- Set default for verify to be `true`
- Add new option `--show-all-errors` to display all errors (default will truncate to 20 errors if number of errors is greater or equal to 100)

Differential Revision: D26637016

fbshipit-source-id: 5589760c3325e29f2828fe2e75390d4b73f6b2ca
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D26637016

@sofong5 sofong5 changed the title Update how mismatch errors are displayed during verify Update gloo benchmark output Mar 2, 2021
Summary:
Pull Request resolved: facebookincubator#294

Design Doc: https://fb.quip.com/vWFvAIF4HK0f

The purpose of this diff is to update the output format of the gloo benchmark. More specifically, we want to:
- Update how errors are displayed during correctness verification.
- Add sections for better readability
- Clarify column titles

For mismatch errors:

Originally, the benchmark would exit right away once it detects a mismatch. This diff changes this so that the currently running benchmark is now run to completion and mismatches are only displayed at the very end.

If a user does not specify element size, the benchmark by default will do a sweep of numbers ranging from 100 to 5000000. In this case, the benchmark will stop the next sweep at the first instance of a mismatch (but will still run current one to completion). See test plan for example.

Change Summary:
- Print value of verify flag in options
- Refactor out a common verify pattern into a new function `constStrideVerify` where there is a constant stride between elements in the array
- Add new `errors` parameter to the verify function which will catch all error messages generated to print at the end
- New class function `checkErrors` that prints the errors and exits
- New class functions `printVerifyHeader` and `printFooter`
- Break output into more readable sections by printing headers
- Add new `size` column to benchmark results
- Set default for verify to be `true`
- Add new option `--show-all-errors` to display all errors (default will truncate to 20 errors if number of errors is greater or equal to 100)

Reviewed By: osalpekar

Differential Revision: D26637016

fbshipit-source-id: 9dc2a20984861b9e9e30c3bdf657174797fd8b95
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D26637016

@facebook-github-bot
Copy link

This pull request has been merged in 4b41412.

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

Successfully merging this pull request may close these issues.

2 participants