-
Notifications
You must be signed in to change notification settings - Fork 800
More representative runner with better timing #16641
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16641
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 6534ac7 with merge base d58c8ee ( BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
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.
Pull request overview
This PR refactors the Parakeet model runner to improve timing instrumentation and make it more representative for benchmarking. The changes introduce a ParakeetRunner class that encapsulates model loading and inference, adds granular timing measurements for different pipeline stages, and supports warmup and repeated inference runs.
Changes:
- Introduced
ParakeetRunnerclass to encapsulate model, tokenizer, and configuration - Added detailed timing instrumentation (preprocessor, encoder, decoder components)
- Added
--repeatand--warmup_repeatflags for benchmarking
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/models/parakeet/main.cpp | Refactored to use ParakeetRunner class with timing instrumentation and benchmarking support |
| examples/models/parakeet/README.md | Updated documentation for new flags and corrected default tokenizer path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const int num_iterations = std::max(1, FLAGS_repeat); | ||
| const int num_warmup = std::max(1, FLAGS_warmup_repeat); |
Copilot
AI
Jan 15, 2026
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.
Using std::max(1, ...) ensures values are at least 1, but FLAGS_repeat and FLAGS_warmup_repeat are already defined with default value 1. If the intent is to guard against negative values, consider adding validation with clear error messages instead of silently clamping to 1. This would make invalid input more obvious to users.
| const int num_iterations = std::max(1, FLAGS_repeat); | |
| const int num_warmup = std::max(1, FLAGS_warmup_repeat); | |
| if (FLAGS_repeat <= 0) { | |
| ET_LOG( | |
| Error, | |
| "Invalid value for --repeat: %d. Expected a positive integer.", | |
| FLAGS_repeat); | |
| return 1; | |
| } | |
| if (FLAGS_warmup_repeat <= 0) { | |
| ET_LOG( | |
| Error, | |
| "Invalid value for --warmup_repeat: %d. Expected a positive integer.", | |
| FLAGS_warmup_repeat); | |
| return 1; | |
| } | |
| const int num_iterations = FLAGS_repeat; | |
| const int num_warmup = FLAGS_warmup_repeat; |
| } timing; | ||
| }; | ||
|
|
||
| class ParakeetRunner { |
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.
reinventing asr runner from first principals lol
| result.tokens, *tokenizer_); | ||
|
|
||
| // Compute timestamps | ||
| try { |
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.
Is this just defensive llm stuff
Here's the output on M1 laptop
https://gist.github.com/mergennachin/a0ffb2b95bb398031ab420e4ec60f499