[hotswap] Install and link libhsa-hotswap tool#7577
Closed
harsh-amd wants to merge 2 commits into
Closed
Conversation
8c77b47 to
c856fa5
Compare
2d361ed to
2eeaf68
Compare
2eeaf68 to
81c0eff
Compare
Contributor
|
We need to re-point the tool names to the new names: projects/clr/rocclr/device/hotswap.hpp line 30: (instead of old name use:) projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp line 2722 (similar fix) |
1 task
nirmie
added a commit
to nirmie/rocm-systems
that referenced
this pull request
Jun 22, 2026
Fold in the install rule and HSA runtime linkage previously provided by ROCm#7577 so this branch no longer depends on it: add GNUInstallDirs, find_package(hsa-runtime64), link hsa-runtime64::hsa-runtime64, and install(TARGETS hsa-hotswap).
nirmie
added a commit
to nirmie/rocm-systems
that referenced
this pull request
Jun 22, 2026
Fold in the install rule and HSA runtime linkage previously provided by ROCm#7577 so this branch no longer depends on it: add GNUInstallDirs, find_package(hsa-runtime64), link hsa-runtime64::hsa-runtime64, and install(TARGETS hsa-hotswap).
Contributor
Author
|
No longer needed, instead use #7629 |
harsh-amd
added a commit
that referenced
this pull request
Jun 26, 2026
… header paths (#7629) ## Motivation This PR contains two components. One component is to update to use the tooling bundled in projects/hotswap instead of the tool that exists at comgr (deprecated). The other component is to resolve amd_comgr header issues during the build. Additionally, there are some changes to the CMakeLists.txt to have the hotswap HSA tool against hsa-runtime64::hsa-runtime64. <!-- Explain the purpose of this PR and the goals it aims to achieve. --> ## Technical Details ~~Builds on top of Harsh's PRs here: #7577~~ (deprecated, #7577 code is directly in this) Relevant PRs: amd-llvm: ROCm/llvm-project#3007 <!-- Explain the changes along with any relevant GitHub links. --> ## JIRA ID N/A <!-- If applicable, mention the JIRA ID resolved by this PR (Example: Resolves SWDEV-12345). --> <!-- Do not post any JIRA links here. --> ## Test Plan Contained build for the tool (verifies if linking resolves) ``` git sparse-checkout add projects/rocr-runtime/runtime/hsa-runtime/inc 2>/dev/null || true P=~/hotswap/npi-build/_gapfix/comgr-prefix DIST=~/hotswap/npi-build/therock/build/dist/rocm cmake -S projects/hotswap -B /tmp/build-hotswap -GNinja -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH="$DIST" \ -Damd_comgr_DIR="$P/lib/cmake/amd_comgr" \ -Dhsa-runtime64_DIR="$DIST/lib/cmake/hsa-runtime64" cmake --build /tmp/build-hotswap --target hsa-hotswap ``` Tool name testing must be done with full build <!-- Explain any relevant testing done to verify this PR. --> ## Test Result Ran: ls -l /tmp/build-hotswap/libhsa-hotswap.so nm -D /tmp/build-hotswap/libhsa-hotswap.so | grep hotswap_rewrite ``` nm -D /tmp/build-hotswap/libhsa-hotswap.so | grep hotswap_rewrite -rwxrwxr-x 1 nisenthi nisenthi 50480 Jun 22 18:45 /tmp/build-hotswap/libhsa-hotswap.so U amd_comgr_hotswap_rewrite@amd_comgr_3.2 ``` <!-- Briefly summarize test outcomes. --> ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
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.
ISSUE ID: ROCm/llvm-project#3000
Stack
Layer 1 of the rocm-systems hotswap stack, paired with ROCm/llvm-project#3007.
libhsa-hotswap.soSummary
libhsa-hotswap.sofromprojects/hotswapso TheRock can package it.hsa-runtime64::hsa-runtime64.libhsa-hotswap.soas the runtime HSA tools library while COMGR provides the rewrite API.Testing
cmake -S projects/hotswap -B build-hotswap-reorder-layer1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -Damd_comgr_DIR=/home/harsh/llvm-pr3000-refactor/build-comgr-displacement-shared/lib/cmake/amd_comgr -Dhsa-runtime64_DIR=/opt/rocm-7.2.0/lib/cmake/hsa-runtime64cmake --build build-hotswap-reorder-layer1 --target hsa-hotswap hotswap_test hotswap_tool_test --parallel 32cmake --install build-hotswap-reorder-layer1 --prefix build-hotswap-reorder-layer1/install-checkFull hotswap CTest is run at layer 2, where the same-ISA passthrough and entry-trampoline gating behavior are introduced.