-
Notifications
You must be signed in to change notification settings - Fork 701
Add RenderDoc API calls to profile Vulkan backend (non-presenting) #20558
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
Comments
As an alternative, how hard would it be to present some (empty) frames (to a null/virtual surface)? I think this would potentially help with more profilers than just renderdoc. |
We should already be using the renderdoc API, since #10893. That code is quite old though, so it may need some debugging/updating. |
Yeah, the API as implemented in #10893 is the right way to go. It worked as of last summer. See https://iree.dev/developers/performance/profiling-gpu-vulkan/#renderdoc. @kuhar I have a branch floating around that did that but it's an opt-in at cmake configure time because of how heavy-weight it is (pulls in WSI goo and requires platform-specific tricks, and the tools I was testing with did not pick up null/virtual surfaces so I had to create offscreen windows and other things that only work in certain contexts). You can check it out at main...benvanik:iree:users/benvanik/vk-present - it wasn't reliable enough to use, though, as the tools I tried it with (that don't have an API or capture without the need for frame swaps) were also bad enough to do things like always ignore the first N frames, only capture when the user hits a hotkey, or only capture when the application has focus (which with an offscreen window doesn't happen). I also had a branch for RGP that used their API: main...users/benvanik/rgp that was significantly more reliable than the offscreen window trick but their "API" is a trashfire that was unreliable enough to not be useful. It raced itself and you'd have to do 10+ capture requests and hope at least one of them captured. RenderDoc does this itself internally because it's so broken: https://github.com/baldurk/renderdoc/blob/788a0ca98fac37c35a66be5fcb9ccc9197df7f34/renderdoc/replay/replay_controller.cpp#L1755 Sucks, but tools that hook into the process and don't provide an API to trigger a capture reliably aren't really worth supporting outside of hacks - they break too often and are too difficult to test ;( |
Request description
RenderDoc can only capture headless (non-presenting) via the in-application API.
Add calls to
StartFrameCapture()
andEndFrameCapture()
iniree-run-module
andiree-benchmark-module
.What component(s) does this issue relate to?
Runtime
Additional context
No response
The text was updated successfully, but these errors were encountered: