Skip to content

AMDGPU: add hotswap entry trampoline core#3008

Open
harsh-amd wants to merge 1 commit into
ROCm:amd-stagingfrom
harsh-amd:comgr-hotswap-entry-trampolines
Open

AMDGPU: add hotswap entry trampoline core#3008
harsh-amd wants to merge 1 commit into
ROCm:amd-stagingfrom
harsh-amd:comgr-hotswap-entry-trampolines

Conversation

@harsh-amd

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

Copy link
Copy Markdown

Stack:

  1. This PR - core hotswap entry trampoline implementation, unit coverage, and minimal public LIT coverage.
  2. AMDGPU: add hotswap entry trampoline lit coverage #3098 - expanded LIT coverage layered on this PR.

The temporary ROCm base branch users/harsh/comgr-hotswap-entry-core mirrors this PR head so #3098 shows only the incremental LIT diff.

Summary:

  • Adds gfx12.5 hotswap entry trampoline generation and descriptor fixups.
  • Adds ELF helpers for enumerating/updating kernel descriptors and SGPR metadata.
  • Wires the rewrite pipeline to fail closed when requested entry trampolines cannot be installed.
  • Adds focused unit coverage for the ELF helpers, trampoline builder, descriptor rewrites, SGPR metadata updates, idempotency, and failure paths.
  • Adds minimal public LIT coverage for enabled entry trampolines and fail-closed scratch-SGPR exhaustion.

Verification:

  • Rebased onto amd-staging at 9eeedba.
  • cmake --build build --target HotswapMCTests HotswapElfTests hotswap-rewrite -- -j8 passed.
  • build/bin/HotswapMCTests passed: 36 tests.
  • build/bin/HotswapElfTests passed: 13 tests.
  • build/bin/llvm-lit -sv build/tools/comgr/test-lit --filter hotswap-kernel-entry-trampoline passed: 1 test on this PR.
  • build/bin/llvm-lit -sv build/tools/comgr/test-lit --filter hotswap passed: 53 tests on the stack top.
  • git diff --check rocm/amd-staging...HEAD passed on the stack top.
  • The final stack tip remains tree-identical to the previous full top-of-stack before moving minimal LIT coverage into this PR.

@harsh-amd harsh-amd force-pushed the comgr-hotswap-entry-trampolines branch 2 times, most recently from 3c42707 to c3065ae Compare June 22, 2026 17:31
@lamb-j lamb-j added the hotswap Related to the Comgr Hotswap feature label Jun 23, 2026
@harsh-amd harsh-amd force-pushed the comgr-hotswap-entry-trampolines branch 11 times, most recently from e8897c6 to 280c69b Compare June 27, 2026 23:05
@harsh-amd harsh-amd changed the title [AMDGPU][COMGR] Add hotswap entry trampolines AMDGPU: add hotswap entry trampoline core Jun 27, 2026
@harsh-amd harsh-amd force-pushed the comgr-hotswap-entry-trampolines branch from 280c69b to 737534a Compare June 27, 2026 23:06
@harsh-amd harsh-amd marked this pull request as ready for review June 28, 2026 17:50
@harsh-amd harsh-amd force-pushed the comgr-hotswap-entry-trampolines branch from 737534a to 1de7a53 Compare June 28, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotswap Related to the Comgr Hotswap feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants