Skip to content

Profiler hub interface library draft - #1026

Open
vstempen wants to merge 3 commits into
mainfrom
vs-profiler-hub-interface
Open

vstempen wants to merge 3 commits into
mainfrom
vs-profiler-hub-interface

Conversation

@vstempen

Copy link
Copy Markdown
Contributor

Motivation

This PR is just to save and share the work done for Profiler Hub interface with Optiq.
It's a bridge library. It should speed up profiler-hub integration and make it functional.
The library code should be a part of profiler hub repository in future, if design is accepted.
We need to decide how profiler hub will be integrated into a client. One way is by just adding headers and library binary.
Another way integrating with "git add submodule" and "git sparse-checkout" from rocm-systems.
I do not currently have permissions to push it to rocm-systems branch, so I created temporary branch in roc-Optiq repository for profiler-hub interface library.
Proposing integrating profiler hub into roc-Optiq in 3 stages:
First stage of integration is creating a test utility, which will run profiler-hub and data-model in parallel and check functionality, data integrity and performance.
Second stage is using profiler hub as one of data-model adapters.
Third stage is completely move to profiler hub with data-model as thin interface layer between profiler hub and controller.

Technical Details

Profiler hub code is not a part of this change. We need to decide how do we integrate it first.
The interface library is to be used with profiler-hub test utility developed within roc-optiq repository as a first stage of integration.
The interface library is located in thirdparty/profiler-hub-client/optiq directory. Cmake file will require thirdparty/profiler-hub to build the library.
It's just a draft and main purpose is to speed up changes in profiler-hub. It also serves as a source of requirements.
All the required changes are listed in either missing_t class or profiler_hub::missing_types namespace.
The requirements may not be 100% complete at this point, but we need to set a direction and establish integration process first.

@vstempen
vstempen requested a review from drchen-amd as a code owner August 27, 2026 14:35
Comment on lines +7 to +17
typedef void* profiler_hub_handle_t;
typedef profiler_hub_handle_t profiler_hub_trace_handle_t;
typedef profiler_hub_handle_t client_trace_handle_t;
typedef profiler_hub_handle_t profiler_hub_future_handle_t;
typedef profiler_hub_handle_t profiler_hub_value_handle_t;
typedef profiler_hub_handle_t profiler_hub_timeslice_handle_t;
typedef profiler_hub_handle_t profiler_hub_flowtrace_handle_t;
typedef profiler_hub_handle_t profiler_hub_ext_data_handle_t;
typedef profiler_hub_handle_t profiler_hub_table_handle_t;
typedef profiler_hub_handle_t profiler_hub_table_row_handle_t;
typedef profiler_hub_handle_t profiler_hub_call_stack_handle_t;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going with void* here pretty much kills the types

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the goal. All the handlers are void* type. Basically, it's C interface feature, or even ABI feature. The types created out of void* are just for better readability and for placing data into proper container. I'm still not convinced that C++ API interface is better. But We can change the types when we agree on interface.

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

Successfully merging this pull request may close these issues.

2 participants