[AMDGPU][COMGR] Add hotswap entry trampolines#3008
Draft
harsh-amd wants to merge 14 commits into
Draft
Conversation
This was referenced Jun 22, 2026
3c42707 to
c3065ae
Compare
3a769bf to
b070a45
Compare
Port the non-blit loader behavior from ROCm/rocm-systems#7581 into COMGR's opt-in hotswap entry-trampoline path. Keep COMPUTE_PGM_RSRC3.INST_PREF_SIZE intact and append an s_code_end guard sized from max(INST_PREF_SIZE * 128 - 256, 0) so prefetch from appended stubs stays within readable .text bytes. Enable entry trampolines for the gfx12.5/gfx125 family, including gfx12-5-generic, while keeping B0/A0 instruction patching limited to gfx1250.
b070a45 to
1819c8c
Compare
Use COMGR ISA parsing for hotswap target identifiers and centralize gfx12-5-generic metadata. Resolve hotswap stub opcodes through MC assembly parsing instead of TableGen mnemonic names, and add fallback diagnostics for rejected byte replacements.
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.
Summary
AMD_COMGR_HOTSWAP_ENTRY_TRAMPOLINES.Stack
GitHub cannot use a fork-only branch as the ROCm PR base. The layer-only diff is
harsh-amd:comgr-hotswap-tool-removal...harsh-amd:comgr-hotswap-entry-trampolines.Testing
git diff --check comgr-hotswap-tool-removal..comgr-hotswap-entry-trampolinesmake -j$(nproc) HotswapElfTests HotswapMCTests hotswap-rewriteinbuild-comgr-displacement-sharedbuild-comgr-displacement-shared/test-unit/HotswapElfTestsbuild-comgr-displacement-shared/test-unit/HotswapMCTestsmake -j$(nproc) test-litinbuild-comgr-displacement-shared(70 passed / 11 unsupported)