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

Programatic frame capture API? #60

Open
JsMarq96 opened this issue Jan 19, 2025 · 3 comments
Open

Programatic frame capture API? #60

JsMarq96 opened this issue Jan 19, 2025 · 3 comments

Comments

@JsMarq96
Copy link

JsMarq96 commented Jan 19, 2025

I have been looking in the Radeon/GPUOpen software stack for a way to programatically toggle a Vulkan frame capture (for example, generating a .rgp file), in order to unify the GPU debuggers/profilers in the same package and workflow (RenderDoc, NSight and Radeon Dev Suite).

The closest that I got is to programatically capture the frame using the RenderDoc API, and then open the capture in RGP, but its labeld as a beta feature and that it might not accurately represent the real performance of the program.

Is there a more straightforward/accurate way to perform this operation in the Radeon Suit?

AFAIK the GPU Performance API gives access to performance counters, but does not capture or export the current frame.

Also, sorry if this is the wrong place/repo to ask this!

@jeromew
Copy link

jeromew commented Jan 22, 2025

I am not part of the project but am looking around for a way to profile a HIP application that has no gui.

what I found so far might help you :

There seem to exist an API to capture frames. You can see and download a version of it on the main page of the project

Image

This seems to be a .h / dev libs / runtimes libs bundle to programmatically capture frames according to the header of the DevDriverAPI.h file

/// \brief An API for the developer mode driver to initialize driver protocols.
/// Can be used by applications to take RGP profiles of themselves

I could not find a simple example for using it but it seems to be what renderdoc is using internally- cf https://github.com/baldurk/renderdoc/blob/v1.x/renderdoc/driver/ihv/amd/amd_rgp.cpp

also it seems that this is compiled and made available out of the code from another repo - see https://github.com/GPUOpen-Tools/dev_driver_tools/tree/master/source/DevDriverAPI and you will probably need to recompile it if you want a more recent version than the release made available on the main page (I did not track the versioning of this so maybe it is up to date with what RDP does)

Observing all this, I would tend to think that the RDP capture you get manually is the same you would get from DevDriverAPI and the same as the one you could get from renderdoc (they are all based on DevDriverAPI)

@jeromew
Copy link

jeromew commented Jan 23, 2025

I looked a bit futher into versioning.

according to https://github.com/baldurk/renderdoc/tree/v1.x/renderdoc/driver/ihv/amd/official/RGP

Image

it seems that renderdoc uses a DevDriverAPI.h from 2018.

This seems to be in line with what is in the dev_driver_tool repo with

Image

that also dates from 2018 and states "Update public version of DevDriverTools to V1.3.1"

then we have the

Image

that would be the "public" version 2.8.1 from 2023 as compared to version 1.3.1 from 2018.

well good luck understanding what has and what has not been published as it seems they are working on private repos and then sporadically re-publish versions in public repos. I don't know if they stopped updating "dev_driver_tools" because they went closed-source on this or because they re-publish it somewhere else.

a search for owner:GPUOpen-Tools DevDriverAPI.h only gives the dev_driver_tools repo
a search for owner:GPUOpen-LibrariesAndSDKs DevDriverAPI.h returns nothing
and a search for DevDriverAPI.h returns basically only dev_driver_tools and renderdoc

so the most up-to-date version would be the "public" version 2.8.1 from 2023 and it could be possible that you get improved results if you recompile renderdoc with this version.

but note that you have https://gpuopen.com/learn/new_version_of_rdts/ that mentions

Image

and I don't know which version of DevDriverAPI is used inside the Developer Panel 3.2 :

  • DevDriverAPI version 2.8.1 from 2023 - Mar 2, 2023
  • Developer Panel 3.2 from Oct 3, 2024

Note also that in the latest Radeon Developer Toolkit there is a RDP release note that states Radeon™ Developer Panel v3.2.0 10-01-2024 so 3.2 is indeed the latest available version of Developer Panel.

@JsMarq96
Copy link
Author

Thanks! Didnt know about the DevDriver API, even thought it would seem that they have forgotten about it...

Still will take a closer look, keep my eyes peeled for updates!

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

No branches or pull requests

2 participants