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

Add speed benchmarking pipeline #321

Merged
merged 20 commits into from May 11, 2020
Merged

Add speed benchmarking pipeline #321

merged 20 commits into from May 11, 2020

Conversation

tanaysoni
Copy link
Contributor

@tanaysoni tanaysoni commented Apr 14, 2020

This PR adds an automated speed benchmarking pipeline using pytest-benchmark.

As a first benchmark, a test case is added comparing inference latency for Question Answering using PyTorch vs ONNX against different combinations of batch_size and max_seq_len.

Additionally, this PR also fixes the test for multiprocessing in the Inferencer.

TODO

  • writing output to json (and potentially in a spreadsheet)
  • dockerfile for onnx-gpu
  • add param for length of doc (140k=40 pages, 35k=10 pages, 3.5k => 1 page)
  • modularizing the benchmark further so that you can run pytorch and onnx, cpu and gpu separately

@tanaysoni tanaysoni changed the title WIP: Add speed benchmarking pipeline Add speed benchmarking pipeline Apr 24, 2020
@tanaysoni tanaysoni requested a review from tholor April 24, 2020 13:00
Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add:

  • a small readme with instructions on how to run (e.g. which env needed for onnx?)
  • writing the results somewhere to a file / table than we can link in the repo and update after releases / major changes

Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@tanaysoni tanaysoni merged commit 397bbaa into master May 11, 2020
@brandenchan brandenchan deleted the benchmarks branch August 12, 2020 14:49
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.

None yet

2 participants