Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions BUILD_TOPOLOGY.toml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,13 @@ feature_group = "CORE" # Part of core, enabled by default
test_artifacts = ["core-hiptests"] # When building HIP, also build hip-tests
source_paths = ["clr", "hip", "amdgpu-windows-interop"]

[artifacts.core-hrr]
artifact_group = "hip-runtime"
type = "target-neutral"
artifact_deps = ["core-hip"]
source_paths = ["hrr"]
feature_group = "CORE" # Part of core, enabled by default

[artifacts.core-ocl-icd]
artifact_group = "opencl-runtime"
type = "target-neutral"
Expand Down Expand Up @@ -619,7 +626,7 @@ feature_group = "CORE" # Part of core, enabled by default
[artifacts.core-hiptests]
artifact_group = "runtime-tests"
type = "target-neutral"
artifact_deps = ["core-hip"]
artifact_deps = ["core-hip", "core-hrr"]
feature_group = "CORE" # Part of core, enabled by default
source_paths = ["hip-tests"]

Expand Down Expand Up @@ -895,7 +902,7 @@ disable_platforms = ["windows"]
[artifacts.rocjitsu]
artifact_group = "rocjitsu"
type = "target-neutral"
artifact_deps = []
artifact_deps = ["base", "sysdeps"]
feature_group = "EMULATION"
disable_platforms = ["windows"]
source_paths = ["rocjitsu", "machine-readable-isa"]
Expand All @@ -910,6 +917,6 @@ disable_platforms = ["windows"]
[artifacts.mirage]
artifact_group = "rocjitsu"
type = "target-neutral"
artifact_deps = []
artifact_deps = ["base", "sysdeps"]
feature_group = "EMULATION"
disable_platforms = ["windows"]
36 changes: 36 additions & 0 deletions build_tools/packaging/linux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,18 @@
}
]
},
{
"Artifact": "core-hrr",
"Artifact_Subdir": [
{
"Name": "hrr",
"Components": [
"doc",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doc component is empty. Are these modules distributed under same license as hip? Isnt it better to have seperate License file for hrr?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same license as HIP (MIT). A separate LICENSE file is optional; We can add one if you want it in that component.

"run"
]
Comment on lines +256 to +259

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lib is the shared-library component, so it belongs on this runtime package with run, same as core-hip. It is empty today.

Suggested change
"Components": [
"doc",
"run"
]
"Components": [
"lib",
"run",
"doc"
]

}
]
},
{
"Artifact": "amd-llvm",
Comment on lines +252 to 264

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hrr-playback is a replay and inspection tool. A HIP application does not load it to run, so this run slice should not ship in amdrocm-runtime.

Package it the way rocgdb is pulled in: its own package, depended on by the amdrocm-developer-tools metapackage. Leave it out of amdrocm-debugger (different product, license, and maintainer). Keep core-hrr in the CORE feature group with its core-hip dependency, so the binary is still built in the same TheRock run as the capture runtime inside amdhip64. artifact-core-hrr.toml and the hip-tests runtime dependency can stay. include/hrr/** is a single dev slice, so hrr_regions.h and the playback headers travel with this package.

amdrocm-runtime-test currently reaches the binary only because amdrocm-runtime-devel depends on amdrocm-runtime. After this move, add amdrocm-hrr to the test package dependencies. The lib and test slices are empty and can drop off amdrocm-runtime-test.

diff --git a/build_tools/packaging/linux/package.json b/build_tools/packaging/linux/package.json
--- a/build_tools/packaging/linux/package.json
+++ b/build_tools/packaging/linux/package.json
@@ -249,18 +249,6 @@
           }
         ]
       },
-      {
-        "Artifact": "core-hrr",
-        "Artifact_Subdir": [
-          {
-            "Name": "hrr",
-            "Components": [
-              "doc",
-              "run"
-            ]
-          }
-        ]
-      },
       {
         "Artifact": "amd-llvm",
@@ -337,18 +325,6 @@
           }
         ]
       },
-      {
-        "Artifact": "core-hrr",
-        "Artifact_Subdir": [
-          {
-            "Name": "hrr",
-            "Components": [
-              "dev",
-              "doc"
-            ]
-          }
-        ]
-      },
       {
         "Artifact": "core-kpack",
@@ -392,6 +368,8 @@
     "DEBDepends": [
       "amdrocm-runtime-devel",
+      "amdrocm-hrr",
       "amdrocm-sysdeps",
@@ -398,6 +376,7 @@
     "RPMRequires": [
       "amdrocm-runtime-devel",
+      "amdrocm-hrr",
       "amdrocm-sysdeps",
@@ -426,18 +405,6 @@
           }
         ]
       },
-      {
-        "Artifact": "core-hrr",
-        "Artifact_Subdir": [
-          {
-            "Name": "hrr",
-            "Components": [
-              "lib",
-              "test"
-            ]
-          }
-        ]
-      },
       {
         "Artifact": "rocrtst",
@@ -3796,6 +3763,46 @@
     "Gfxarch": "False"
   },
+  {
+    "Package": "amdrocm-hrr",
+    "Version": "",
+    "Architecture": "amd64",
+    "BuildArch": "x86_64",
+    "DEBDepends": [
+      "amdrocm-runtime"
+    ],
+    "RPMRequires": [
+      "amdrocm-runtime"
+    ],
+    "Maintainer": "ROCm Dev Support <rocm-dev.support@amd.com>",
+    "Description_Short": "HIP record and replay playback tool",
+    "Description_Long": "hrr-playback replays HIP captures produced by the HRR capture runtime in amdhip64. Provides archive inspection, replay, and device-to-host validation for debugging GPU workloads. Installs the playback binary and HRR headers.",
+    "Section": "devel",
+    "Priority": "optional",
+    "Group": "unknown",
+    "License": "MIT",
+    "Vendor": "Advanced Micro Devices, Inc",
+    "Homepage": "https://github.com/ROCm/rocm-systems",
+    "Artifactory": [
+      {
+        "Artifact": "core-hrr",
+        "Artifact_Subdir": [
+          {
+            "Name": "hrr",
+            "Components": [
+              "run",
+              "dev",
+              "doc"
+            ]
+          }
+        ]
+      }
+    ],
+    "Gfxarch": "False"
+  },
   {
     "Package": "amdrocm-developer-tools",
@@ -3808,7 +3815,8 @@
       "amdrocm-profiler-base",
       "amdrocm-profiler",
       "amdrocm-emulation",
-      "amdrocm-debugger"
+      "amdrocm-debugger",
+      "amdrocm-hrr"
     ],
     "RPMRequires": [
@@ -3817,7 +3825,8 @@
       "amdrocm-profiler-base",
       "amdrocm-profiler",
       "amdrocm-emulation",
-      "amdrocm-debugger"
+      "amdrocm-debugger",
+      "amdrocm-hrr"
     ],

The wheel allowlist and the Windows MSI are separate channels. This PR does not put hrr-playback in either, and that matches rocgdb being absent from the MSI.

"Artifact_Subdir": [
Expand Down Expand Up @@ -324,6 +336,18 @@
}
]
},
{
"Artifact": "core-hrr",
"Artifact_Subdir": [
{
"Name": "hrr",
"Components": [
"dev",
"doc"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

doc is already in runtime package. For now its empty so its not creating any conflict. But in future if any files are added it can create duplicate files and create conflict at installation

@danielbolsson danielbolsson Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes. I too suggest dropping doc from amdrocm-runtime-devel and leave it only on the runtime package, matching core-hip.

]
Comment on lines +344 to +347

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

doc is already on the runtime package. Listing it here too would install the same files twice once share/doc/** has content. core-hip keeps doc on the runtime package only.

Suggested change
"Components": [
"dev",
"doc"
]
"Components": [
"dev"
]

}
]
},
{
"Artifact": "core-kpack",
"Artifact_Subdir": [
Expand Down Expand Up @@ -401,6 +425,18 @@
}
]
},
{
"Artifact": "core-hrr",
"Artifact_Subdir": [
{
"Name": "hrr",
"Components": [
"lib",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isnt lib supposed to be part of runtime package and not test package?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes. lib is the shared-library slice, so it belongs on amdrocm-runtime next to run, same as core-hip.

"test"
]
Comment on lines +433 to +436

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Drop lib here once it is on the runtime package. This package should keep test only.

Suggested change
"Components": [
"lib",
"test"
]
"Components": [
"test"
]

}
]
},
{
"Artifact": "rocrtst",
"Artifact_Subdir": [
Expand Down
57 changes: 57 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,58 @@ if(THEROCK_ENABLE_HIP_RUNTIME)
libhiprtc-builtins.so
libhiprtc.so
)

if(THEROCK_ENABLE_CORE_HRR)
##############################################################################
# hrr
##############################################################################

set(HRR_BUILD_DEPS rocm-cmake)
if(THEROCK_BUILD_TESTING)
list(APPEND HRR_BUILD_DEPS therock-catch2)
endif()

therock_cmake_subproject_declare(hrr
USE_DIST_AMDGPU_TARGETS
EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/hrr"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/hrr"
INTERFACE_PROGRAM_DIRS
bin
BACKGROUND_BUILD
COMPILER_TOOLCHAIN
amd-hip
CMAKE_ARGS
"-DHRR_BUILD_PLAYBACK=ON"
"-DHRR_BUILD_TESTS=${THEROCK_BUILD_TESTING}"
"-DHRR_BUILD_INTEGRATION_TESTS=${THEROCK_BUILD_TESTING}"
"-DHIP_PLATFORM=amd"
BUILD_DEPS
${HRR_BUILD_DEPS}
RUNTIME_DEPS
hip-clr
INTERFACE_LINK_DIRS
"lib"
INTERFACE_INSTALL_RPATH_DIRS
"lib"
)
therock_cmake_subproject_glob_c_sources(hrr SUBDIRS .)
therock_cmake_subproject_activate(hrr)

therock_provide_artifact(core-hrr
TARGET_NEUTRAL
DESCRIPTOR artifact-core-hrr.toml
COMPONENTS
dbg
dev
doc
lib
run
test
SUBPROJECT_DEPS
hrr
)
endif()

if(WIN32)
##############################################################################
# hipInfo (from hip-tests)
Expand Down Expand Up @@ -574,6 +626,10 @@ endif(THEROCK_ENABLE_OCL_RUNTIME)

if(THEROCK_BUILD_TESTING AND THEROCK_ENABLE_CORE_HIPTESTS)
set(HIP_TESTS_CMAKE_ARGS)
set(HIP_TESTS_RUNTIME_DEPS)
if(THEROCK_ENABLE_CORE_HRR)
list(APPEND HIP_TESTS_RUNTIME_DEPS hrr)
endif()
set(_hip_tests_subproject_names)
therock_cmake_subproject_declare(hip-tests
USE_TEST_AMDGPU_TARGETS
Expand All @@ -590,6 +646,7 @@ if(THEROCK_BUILD_TESTING AND THEROCK_ENABLE_CORE_HIPTESTS)
therock-catch2
RUNTIME_DEPS
hip-clr
${HIP_TESTS_RUNTIME_DEPS}
${THEROCK_BUNDLED_NUMACTL}
INTERFACE_LINK_DIRS
lib
Expand Down
16 changes: 16 additions & 0 deletions core/artifact-core-hrr.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# hrr
[components.run."core/hrr/stage"]
include = [
"bin/**",
]
[components.dbg."core/hrr/stage"]
[components.lib."core/hrr/stage"]
[components.dev."core/hrr/stage"]
include = [
"include/hrr/**",
]
[components.doc."core/hrr/stage"]
[components.test."core/hrr/stage"]
include = [
"share/hrr/**",
]
8 changes: 8 additions & 0 deletions test_tools/therock_consumer_graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"hipsparselt",
"hiptensor",
"hipthreads",
"hrr",
"libhipcxx",
"miopen",
"miopenprovider",
Expand Down Expand Up @@ -337,6 +338,7 @@
"hipsparselt",
"hiptensor",
"hipthreads",
"hrr",
"libhipcxx",
"miopen",
"ocl-clr",
Expand Down Expand Up @@ -549,6 +551,7 @@
"therock-catch2": {
"consumers": [
"hip-tests",
"hrr",
"origami",
"rocroller"
]
Expand Down Expand Up @@ -859,5 +862,10 @@
"rocr-runtime",
"therock-elfutils"
]
},
"hrr": {
"consumers": [
"hip-tests"
]
}
}
Loading