A C++ library for storing and retrieving ROCm profiling data using SQLite (rocpd database format).
profiler-hub provides a high-performance storage layer for ROCm profiling tools. It offers a structured way to persist profiling data in the rocpd (SQLite) database format, enabling interoperability with ROCm profiling tools and analysis workflows.
This library is part of the rocm-systems monorepo and is used by rocprofiler-systems for trace data output.
At configure time, profiler-hub clones RocPD schema SQL from rocm-systems and
embeds it as generated C++ headers. No installed rocprofiler-sdk-rocpd package
is required.
These options apply on Linux and Windows.
| Option | Default | Description |
|---|---|---|
PROFILER_HUB_BUILD_TESTS |
ON | Build unit tests |
PROFILER_HUB_BUILD_BENCHMARKS |
ON | Build performance benchmarks |
PROFILER_HUB_ENABLE_LOGGING |
OFF | Enable debug logging |
PROFILER_HUB_ENABLE_COVERAGE |
OFF | Enable code coverage instrumentation (requires Debug build, gcov, and lcov or gcovr) |
PROFILER_HUB_FETCH_DEPENDENCIES |
OFF | Download missing dependencies at configure time. Required on Windows when SQLite3 is not already on CMAKE_PREFIX_PATH |
SQLITE3_AMALGAMATION_URL |
sqlite.org amalgamation zip for 3.45.3 | URL of the prebuilt amalgamation zip used on Windows |
SQLITE3_AMALGAMATION_SHA256 |
(pinned for 3.45.3) | Expected SHA256 of SQLITE3_AMALGAMATION_URL; bump together with the URL / SQLITE3_GIT_TAG |
- CMake 3.25+
- C++20 compatible compiler
- SQLite3 (bundled via CMake module)
- spdlog and fmt (system packages or FetchContent fallback)
Ubuntu/Debian:
sudo apt install libsqlite3-dev libspdlog-dev libfmt-devRHEL/Rocky Linux:
sudo dnf install sqlite-devel spdlog-devel fmt-developenSUSE:
sudo zypper install sqlite3-devel spdlog-devel fmt-develFrom the profilers/profiler-hub directory:
cmake -S . -B build
cmake --build build -j$(nproc)cmake --install build --prefix /opt/rocmFor projects using an installed profiler-hub:
find_package(profiler-hub REQUIRED)
target_link_libraries(your_target PRIVATE profiler-hub::profiler-hub)A native MSVC build is supported (CI runs on Linux and Windows). fmt, spdlog, nlohmann_json, GoogleTest, and Google Benchmark are fetched when they are not already installed. SQLite3 is fetched only when -DPROFILER_HUB_FETCH_DEPENDENCIES=ON is set.
| Tool | Notes |
|---|---|
| Visual Studio 2022 or 2026 Build Tools | Install the Desktop development with C++ workload (MSVC compiler + Windows SDK). Builds as C++20. |
| CMake 3.25+ | Bundled with Visual Studio, or install standalone: winget install -e --id Kitware.CMake |
| Git for Windows | Used to clone the RocPD schema. SQLite on Windows is downloaded from sqlite.org (no git clone for SQLite). |
-
Install the Visual Studio C++ toolchain (skip if already installed). You only need the Build Tools — the full Visual Studio IDE is not required.
- Download from https://visualstudio.microsoft.com/downloads/ : scroll to Tools for Visual Studio Build Tools for Visual Studio 2022 (or 2026), or the full Community edition.
- Or install from the command line with winget:
winget install -e --id Microsoft.VisualStudio.2022.BuildTools
- In the installer, select the Desktop development with C++ workload (this pulls in the MSVC compiler, CMake, and the Windows SDK), then click Install.
-
Open a Visual Studio developer shell so
cmakeandcl.exeare onPATH.The simplest way is to open the Start menu and launch x64 Native Tools Command Prompt for VS. This sets up the environment for you.
Alternatively, from any
cmdwindow, run theVsDevCmd.batthat ships with your install. Its path depends on the Visual Studio version number (2022 =2022, 2026 =2026) and the edition (BuildTools,Community,Professional, orEnterprise):"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -
Configure and build from the
profilers/profiler-hubdirectory:cd C:\path\to\rocm-systems\profilers\profiler-hub cmake -S . -B build -DPROFILER_HUB_FETCH_DEPENDENCIES=ON cmake --build build --config Release --parallel -
Run the tests (optional):
ctest --test-dir build -C Release --output-on-failure
With the Visual Studio generator, artifacts live under a configuration subfolder
(Release/Debug), not directly under build\lib\:
| Artifact | Path (Release) | Description |
|---|---|---|
| Shared library (DLL) | build\bin\Release\profiler-hub.dll |
Loaded at run time |
| DLL import library | build\lib\Release\profiler-hub.lib |
Link stub for the shared target profiler-hub::profiler-hub |
| Static archive | build\lib\Release\profiler-hub-static.lib |
Full static lib for profiler-hub::profiler-hub-static |
| Fetched SQLite DLL | build\bin\Release\profiler-hub-sqlite3.dll |
Separate SQLite library used by profiler-hub.dll |
| SQLite import library | build\lib\Release\profiler-hub-sqlite3.lib |
Link stub for profiler-hub-sqlite3.dll |
| Public headers | build\include\profiler-hub\ |
Generated/copied API headers |
| CMake package | build\profiler-hub-config.cmake |
Use from the build tree without installing |
On Windows a .lib can be either an import library or a static archive, so the two
profiler-hub targets use distinct base names: profiler-hub.lib (import lib, pairs with the DLL) vs
profiler-hub-static.lib (static archive).
- SQLite3: with
PROFILER_HUB_FETCH_DEPENDENCIES=ON, Windows downloads the official amalgamation zip fromSQLITE3_AMALGAMATION_URL(default matchesSQLITE3_GIT_TAGversion-3.45.3), verifiesSQLITE3_AMALGAMATION_SHA256over TLS, and buildsprofiler-hub-sqlite3.dll, which exports the SQLite C API. Keep that DLL next toprofiler-hub.dll(or onPATH) at run time. - Dependencies: fmt, spdlog, nlohmann_json, GoogleTest, and Google Benchmark are
fetched via CMake
FetchContentwhen not found on the system. - Language standard: library, tests, and benchmarks are built as C++20.
cmake --install build --config Release --prefix C:\opt\profiler-hubInstalled layout: bin\profiler-hub.dll, lib\profiler-hub.lib (import lib),
lib\profiler-hub-static.lib (static archive), include\profiler-hub\*.hpp, and the
find_package config under lib\cmake\profiler-hub\. When SQLite was fetched, also
ship profiler-hub-sqlite3.dll beside profiler-hub.dll.
For projects using an installed profiler-hub:
find_package(profiler-hub REQUIRED)
target_link_libraries(your_target PRIVATE profiler-hub::profiler-hub)Point the consumer at the package with -DCMAKE_PREFIX_PATH=C:\opt\profiler-hub or
-Dprofiler-hub_DIR=<build-tree> to use the build tree directly. Ensure
profiler-hub.dll and, when SQLite was fetched, profiler-hub-sqlite3.dll are next
to the consumer executable or on PATH at run time.
MIT License — Copyright (c) 2025 Advanced Micro Devices, Inc.
See LICENSE for details.