feat(hotswap): integrate entry trampoline subprojects#6018
Closed
harsh-amd wants to merge 14 commits into
Closed
Conversation
Adds a single THEROCK_ENABLE_HOTSWAP option (ON) that turns on the comgr hotswap transpiler and runtime tool, and bumps compiler/amd-llvm to a commit that includes the link-order fix so enabling hotswap does not break build-time AOT compilation (e.g. rocFFT's rocfft_aot_helper on gfx1250). The amd-llvm bump duplicates ROCm#5989 and is here only so CI can exercise the enabled build end-to-end; it can be dropped from this PR once ROCm#5989 lands. Changes: - CMakeLists.txt: add THEROCK_ENABLE_HOTSWAP option (ON), replacing the THEROCK_BUILD_COMGR_HOTSWAP name from ROCm#5988. - compiler/CMakeLists.txt: wire the option into amd-comgr, passing COMGR_ENABLE_HOTSWAP_TRANSPILE=ON and (Linux) HOTSWAP_BUILD_TOOL=ON plus the HSA include root, producing libamd_comgr_hotswap_tool.so. - compiler/amd-llvm: bump to 46fcb339 (users/lambj/therock-hotswap-cherrypick-v3 tip, includes the link-order fix). Note: making the runtime actually load the tool requires HSA_TOOLS_LIB to be set in the runtime/test environment (ROCr reads it only from the env); that is handled separately in the CI test scripts, not by this build option.
Add a hotswap smoke test to the Linux hip-tests stage: set HSA_TOOLS_LIB to the built libamd_comgr_hotswap_tool.so so ROCr/CLR exercise the tool-load path during tests that load code objects on the GPU. The tool is inert on non-gfx1250 targets, so this guards against the enabled tool perturbing existing results. THEROCK_ENABLE_HOTSWAP is on by default, so the tool must be present; a missing tool indicates a broken/misconfigured build and fails the step loudly rather than silently skipping. Note: the test job consumes prebuilt artifacts and cannot read the build-time THEROCK_ENABLE_HOTSWAP value, so this gates on "Linux hip-tests run" as a proxy. A build with THEROCK_ENABLE_HOTSWAP=OFF running hip-tests would falsely fail here; carrying the flag from build to test would require an artifact marker. Changes: - .github/workflows/test_component.yml: add "Enable hotswap tool loading" step before the Test step, scoped to Linux hip-tests.
This reverts commit 7d072cd.
a7aee7c to
0e42244
Compare
This was referenced Jun 21, 2026
09f6a3b to
3d9fe09
Compare
ISSUE ID: ROCm/llvm-project#3000 Build on PR ROCm#6007 by pinning amd-llvm to a commit that includes the COMGR hotswap kernel-entry trampoline implementation and rocm-systems to the paired loader-side revert.
16cbd3d to
f8a9013
Compare
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
Summary
THEROCK_ENABLE_HOTSWAP.compiler/amd-llvmto6523fc65bc87bb35dc954ae4138f512c4126b09f, which is TheRock's amd-llvm pin plus the rebased [AMDGPU][COMGR] Add hotswap text displacement infrastructure llvm-project#3000 hotswap entry/displacement commits.rocm-systemstoedd6590c50fe10331a71ae2da4039a56dab32c84, which carries the paired [hotswap] Install and link libhsa-hotswap tool rocm-systems#7577 runtime hotswap tool work plus the latest hipfile ASAN link fix.libamd_comgr_hotswap_tool.sopath.libhsa-hotswap.soas a core runtime subproject depending onROCR-Runtimeandamd-comgr.hip-tests, setHSA_TOOLS_LIBto the packagedlibhsa-hotswap.soand setAMD_COMGR_HOTSWAP_ENTRY_TRAMPOLINES=1so CI exercises the HSA tool load path and the opt-in entry rewrite.Related PRs
Testing
ASAN_OPTIONS=use_sigaltstack=0 cmake --build build-comgr-displacement-asan --target check-comgr --parallel 8passed on rebasedhotswap-entry-trampolinesatd037ab1b0c73b135333587b6efadb15c0ffeda0c.HotswapElfTests6/6,HotswapMCTests53/53,RaiserScaffoldingTests6/6, andDemangleSymbolNameTest27/27.git diff --check rocm/pr-6007..HEADpassed after replaying feat(hotswap): integrate entry trampoline subprojects #6018 on the latest Enable comgr hotswap via THEROCK_ENABLE_HOTSWAP #6007 head.6523fc65bc87bb35dc954ae4138f512c4126b09ffetches fromhttps://github.com/harsh-amd/llvm-project.gitwithgit fetch --depth=1.edd6590c50fe10331a71ae2da4039a56dab32c84fetches fromhttps://github.com/harsh-amd/rocm-systems.gitwithgit fetch --depth=1.