Skip to content

feat(hotswap): integrate entry trampoline subprojects#6018

Closed
harsh-amd wants to merge 14 commits into
ROCm:mainfrom
harsh-amd:therock-hotswap-plus-entry-trampolines
Closed

feat(hotswap): integrate entry trampoline subprojects#6018
harsh-amd wants to merge 14 commits into
ROCm:mainfrom
harsh-amd:therock-hotswap-plus-entry-trampolines

Conversation

@harsh-amd

@harsh-amd harsh-amd commented Jun 21, 2026

Copy link
Copy Markdown

ISSUE ID: ROCm/llvm-project#3000

Summary

Related PRs

Testing

  • llvm-project: ASAN_OPTIONS=use_sigaltstack=0 cmake --build build-comgr-displacement-asan --target check-comgr --parallel 8 passed on rebased hotswap-entry-trampolines at d037ab1b0c73b135333587b6efadb15c0ffeda0c.
  • llvm-project ASAN details: lit reported 70 passed / 11 unsupported; CTest reported 31/31 passed; unit binaries reported HotswapElfTests 6/6, HotswapMCTests 53/53, RaiserScaffoldingTests 6/6, and DemangleSymbolNameTest 27/27.
  • TheRock: git diff --check rocm/pr-6007..HEAD passed after replaying feat(hotswap): integrate entry trampoline subprojects #6018 on the latest Enable comgr hotswap via THEROCK_ENABLE_HOTSWAP #6007 head.
  • TheRock submodule fetchability: verified 6523fc65bc87bb35dc954ae4138f512c4126b09f fetches from https://github.com/harsh-amd/llvm-project.git with git fetch --depth=1.
  • TheRock submodule fetchability: verified edd6590c50fe10331a71ae2da4039a56dab32c84 fetches from https://github.com/harsh-amd/rocm-systems.git with git fetch --depth=1.

lamb-j added 3 commits June 19, 2026 18:27
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.
@harsh-amd harsh-amd force-pushed the therock-hotswap-plus-entry-trampolines branch 2 times, most recently from 09f6a3b to 3d9fe09 Compare June 22, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants