-
Notifications
You must be signed in to change notification settings - Fork 6
Profile layer: Add per-frame counter sampling #164
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
Conversation
ff351e6 to
a2909a7
Compare
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 adds per-frame performance measurement capabilities to layer_gpu_profile, including support for VK_EXT_frame_boundary to mark frame boundaries. The implementation adds a new "frame" sampling mode that complements the existing "workload" mode, allowing users to choose between detailed per-workload profiling or simpler per-frame metrics.
- Adds new configuration options to differentiate frame selection (
frame_mode) from counter sampling granularity (sample_mode) - Implements
VK_EXT_frame_boundaryextension support for manual frame boundary marking - Refactors the Python service to handle both per-workload and per-frame sample messages
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lglpy/comms/service_gpu_profile.py | Adds support for per-frame sample messages and refactors variable naming for clarity |
| layer_gpu_timeline/source/layer_instance_functions.hpp | Removes unused vkCreateDevice function declaration |
| layer_gpu_timeline/source/layer_instance_functions.cpp | Removes frame boundary emulation code that tracked extension support |
| layer_gpu_timeline/source/layer_device_functions_queue.cpp | Updates function signature to use reference instead of pointer and removes emulation-specific code |
| layer_gpu_timeline/source/device.hpp | Removes flag tracking frame boundary emulation state |
| layer_gpu_profile/source/layer_instance_functions.hpp | Adds new file with physical device feature query functions |
| layer_gpu_profile/source/layer_instance_functions.cpp | Implements feature queries to enable VK_EXT_frame_boundary support |
| layer_gpu_profile/source/layer_device_functions_queue.cpp | Adds per-frame sampling logic and manual frame boundary handling |
| layer_gpu_profile/source/layer_device_functions.hpp | Adds vkQueueBindSparse function declaration |
| layer_gpu_profile/source/layer_config.hpp | Splits configuration into frame selection and counter sampling modes |
| layer_gpu_profile/source/layer_config.cpp | Updates configuration parsing for new two-mode system |
| layer_gpu_profile/source/instance.cpp | Adds VK_EXT_frame_boundary to injected device extensions |
| layer_gpu_profile/source/device_utils.hpp | Adds workload sampling check to instrumentation guard |
| layer_gpu_profile/source/CMakeLists.txt | Adds new instance functions source file to build |
| layer_gpu_profile/layer_config.json | Updates default config to use new frame sampling mode |
| layer_gpu_profile/README_LAYER.md | Documents new configuration options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
96cba77 to
d79d895
Compare
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
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d79d895 to
08fbb6a
Compare
e95b9e6 to
4846843
Compare
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
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| columns: list[str] = [] | ||
|
|
||
| columns.append(f'{self.frame_id}') |
Copilot
AI
Dec 19, 2025
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 self.frame_id directly could result in 'None' being formatted into the string if frame_id hasn't been set. While frame_id is set on line 243 before this method is called, the assertion on line 224 only checks table_header. Add an assertion for self.frame_id to ensure it's not None before use.
4846843 to
3f2e89b
Compare
This PR adds per-frame performance measurements to
layer_gpu_profile, including support forVK_EXT_frame_boundarydemarcating frame boundaries.TODO list:
VK_EXT_frame_boundary.Fixes #156