[profiler] Integrate profiler-hub as its own subproject and package - #6922
Draft
avansick-amd wants to merge 10 commits into
Draft
[profiler] Integrate profiler-hub as its own subproject and package#6922avansick-amd wants to merge 10 commits into
avansick-amd wants to merge 10 commits into
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
marbre
reviewed
Jul 28, 2026
marbre
left a comment
Member
There was a problem hiding this comment.
This will need review feedback from different subteams. Can you split into build, testing (which seem to be missing) and packaging?
Address review feedback that testing appeared missing for the profiler-hub packaging integration. Adds a standalone post-install smoke test that installs the built amdrocm-profiler-base .deb and then configures, compiles, and runs a trivial consumer via find_package(profiler-hub CONFIG) against the installed CMake package config. This exercises the full consumer chain: find_package resolution, header availability, link against libprofiler-hub.so, and runtime NEEDED-dependency resolution. Wired into the deb path of the multi-arch native-packages workflow, after the simulated-install step.
Replaces the glob-based resolve_install_root (and its sorted()[-1] lexicographic tie-break bug) with dpkg -L / staging rglob discovery anchored on the profiler-hub-config.cmake key component. Adds pytest unit tests. Supersedes the previous glob approach.
Forward-only bump onto Branch 1 tip 6d5d83820f; resolves the stale-pin flag raised after the ASAN comment trim.
…ofiler-hub-integration # Conflicts: # profiler/CMakeLists.txt # rocm-systems
…ps fix Re-pins the rocm-systems submodule to include task 019's rewrite of the profiler-hub-config.cmake find_dependency preamble (fatal find_dependency -> conditional find_package + component-gated resolution), rebased cleanly onto this branch's existing integration commit with zero conflicts. Purpose: get a real CI verdict from Linux::release / Build DEB Packages, the exact job currently failing on the spdlog find_dependency abort this fix targets. Standing debt: while the pin points at this commit, this PR carries a design that has not been through the team and must be re-pinned to a develop-reachable commit before it can merge. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ofiler-hub-integration # Conflicts: # rocm-systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
profiler-hub is a general-purpose, schema-versioned data storage library for profiling and tracing tools: it defines a common on-disk schema and a writer/reader API for storing trace, PMC, and profiling data, so multiple independent tools can share a single storage format instead of each implementing their own. It is designed to be built and consumed on its own, not as an implementation detail of any single tool.
TheRock currently only builds and packages profiling libraries as part of whichever specific tool happens to consume them. This PR gives profiler-hub its own subproject and its own package, so it is built and shipped as a standalone artifact — available to any current or future consumer, not tied to one. This PR intentionally does not touch rocprofiler-systems or any other consumer; wiring an actual consumer to profiler-hub is separate, follow-on work.
JIRA ID: ROCPDSNA-73
Technical Details
profiler-hubas its own CMake subproject inprofiler/CMakeLists.txt, gated by a newTHEROCK_ENABLE_PROFILER_HUBfeature flag, built from therocm-systemssubmodule'sprofilers/profiler-hubsubdirectory. DeclaresDISABLE_AMDGPU_TARGETSsince profiler-hub is pure host C++ with no GPU/HIP code — without it, any CI stage building with zero AMDGPU targets selected hits a hard CMake configure error.profiler/artifact-profiler-hub.tomlartifact entry and registers it inBUILD_TOPOLOGY.toml(profiler-coregroup).profiler-hubas its own standalone deb/rpm package entry inbuild_tools/packaging/linux/package.json'samdrocm-profiler-base(lib/dev/run/doc) andamdrocm-profiler-test(test) packages, so the package is produced regardless of which consumer is also selected. Supporting changes inbuild_package.py,deb_package.py, andtemplate/debian_rules.j2.build_tools/packaging/linux/tests/build_package_test.py.rocm-systemssubmodule forward onto itsdevelopline to pull in the profiler-hub source together with the profiler-hub unit-test build fixes for the amd-llvm/ASAN toolchain (companion PR fix(profiler-hub): build profiler-hub_unit_tests under amd-llvm/ASAN toolchain rocm-systems#9367). This ancestry already includes the schema-API signature fix (#8610) that profiler-hub requires to compile against rocprofiler-sdk-rocpd. Once #9367 lands ondevelop, this pin advances forward to pick it up before merge.Relationship to #6734: This is a clean, squashed reconstruction of the integration work originally staged in #6734. That PR's GitHub-rendered diff was inflated by a stale merge-base that repeatedly merged
origin/main, dragging in ~50 unrelated upstream commits; the true net contribution is 9 files, presented here as four focused commits (subproject/artifact → deb/rpm package → packaging tests → submodule pin) on currentmainfor easier review.Test Plan
ninja profiler-hubbuilds standalone, producinglibprofiler-hub.so, without building or touchingrocprofiler-systems, with a clean configure.DISABLE_AMDGPU_TARGETSpath).profiler-hubartifact components (lib/dev/run/doc/dbg/test) and confirmed correct file placement (shared lib inlib, headers/static lib/cmake package config indev)..debviabuild_tools/packaging/linux/build_package.py --pkg-names amdrocm-profiler-baseand confirmed viadpkg-deb --contentsthat the shared lib, static lib, headers, and CMake package config are present.package.jsonvalidated withpython3 -m json.tool;BUILD_TOPOLOGY.tomlandartifact-profiler-hub.tomlvalidated withtomllib.Test Result
All of the above passed locally against a from-scratch reconfigure and rebuild. CI results pending on this PR.
Submission Checklist