-
Notifications
You must be signed in to change notification settings - Fork 235
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 GPU profiler #1997
base: main
Are you sure you want to change the base?
Add GPU profiler #1997
Conversation
jainapurva
commented
Apr 1, 2025
•
edited
Loading
edited
- Introduces functions to upload trace files, generate Perfetto UI URLs, and profile model and memory usage.
- Adds comprehensive tests to validate profiler and memory profiling functionalities.
- Updates benchmark configuration and runner logic to integrate these new profiling features.
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1997
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 328b7bf with merge base 70fc520 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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 pull request adds profiling capabilities and integrates a Perfetto UI link to the benchmark framework while also enhancing memory profiling and test coverage.
- Introduces functions to upload trace files, generate Perfetto UI URLs, and profile model and memory usage.
- Adds comprehensive tests to validate profiler and memory profiling functionalities.
- Updates benchmark configuration and runner logic to integrate these new profiling features.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
benchmarks/microbenchmarks/utils.py | New functions added for trace file upload, Perfetto URL generation, and model/memory profiling. |
benchmarks/microbenchmarks/test/test_benchmark_profiler.py | New tests added to verify profiler and memory profiling functionality. |
benchmarks/microbenchmarks/test/benchmark_config.yml | Updated configuration to enable profiling for specific models. |
benchmarks/microbenchmarks/benchmark_runner.py | Enhanced error handling and conditional inclusion of benchmark results. |
benchmarks/microbenchmarks/benchmark_inference.py | Integrated profiling steps into the inference benchmark run. |
Comments suppressed due to low confidence (2)
benchmarks/microbenchmarks/utils.py:95
- [nitpick] Consider using an f-string to construct the Perfetto UI URL for improved readability, e.g., using f"https://interncache-all.fbcdn.net/manifold/perfetto-artifacts/tree/ui/index.html#!/?url=https://interncache-all.fbcdn.net/manifold/{manifold_path}" instead of string concatenation.
"https://interncache-all.fbcdn.net/manifold/perfetto-artifacts/tree/ui/index.html#!/?url=https://interncache-all.fbcdn.net/manifold/" + manifold_path
benchmarks/microbenchmarks/utils.py:81
- [nitpick] Consider adding a test case to simulate a failure in upload_trace_file (e.g., by mocking subprocess.run to return a non-zero code) to ensure that error handling in generate_model_profile works as expected.
print("[ERROR] Upload failed, maybe the trace file exists.")
ace610f
to
967ea76
Compare
4acb7e8
to
dd9f50d
Compare