Skip to content

fix(hotswap): gate entry trampoline rewrites for gfx12.5#7593

Open
harsh-amd wants to merge 15 commits into
ROCm:developfrom
harsh-amd:hotswap-entry-trampoline-gating
Open

fix(hotswap): gate entry trampoline rewrites for gfx12.5#7593
harsh-amd wants to merge 15 commits into
ROCm:developfrom
harsh-amd:hotswap-entry-trampoline-gating

Conversation

@harsh-amd

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

Copy link
Copy Markdown
Contributor

Stack

Layer 2 of the rocm-systems hotswap stack, paired with ROCm/llvm-project#3008.

GitHub targets this PR at develop, so the default Files view includes prior stack layers. Use the layer-only diff above for review of this layer.

Summary

  • Keep rocm-systems limited to loader routing and COMGR source/target ISA-pair construction; COMGR owns validation and all code-object transformations after the call.
  • Rename the local policy unit to hotswap_loader_policy and keep gfx12.5 matching plus gfx1250 stepping-feature construction private to that unit.
  • Treat AMD_COMGR_HOTSWAP_ENTRY_TRAMPOLINES as an opt-in for rocm-systems to attempt the gfx12.5 same-processor COMGR request path; COMGR owns what the flag enables internally.
  • Follow Install Kernel Trampolines #7581 by keeping the opt-in path keyed to the code-object ISA rather than using this path for processor retargeting.
  • Cover concrete gfx125* targets and gfx12-5-generic while keeping non-gfx12.5 agents and source code objects unchanged.
  • Preserve the existing gfx1250 A0 source/target ISA pair and leave pass selection to COMGR.
  • Add unit and loader-path coverage for the local routing behavior without testing COMGR pass internals.

Testing

  • cmake -S projects/hotswap -B build-hotswap-reorder-layer2 -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-runtime64
  • cmake --build build-hotswap-reorder-layer2 --target hsa-hotswap hotswap_test hotswap_tool_test hotswap_loader_test --parallel 32
  • ctest --test-dir build-hotswap-reorder-layer2 --output-on-failure
  • cmake --build build-hotswap-review --target hotswap_tool_test hotswap_loader_test --parallel 32
  • ctest --test-dir build-hotswap-review -R 'hotswap_(tool|loader)_test' --output-on-failure
  • git diff --cached --check

@harsh-amd harsh-amd force-pushed the hotswap-entry-trampoline-gating branch from 8176f14 to ad38f93 Compare June 26, 2026 20:01
@therock-pr-bot

therock-pr-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
JIRA ID : TESTAUTO-6039
JIRA ID - #330
JIRA ID #330
ISSUE ID : TESTUTO-3334
ISSUE ID #3334
ISSUE ID - TESTAUTO-3433
ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
Closes #10
Fixes octo-org/octo-repo#100
Resolves: #123
#123
https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Title/Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Title/Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@harsh-amd harsh-amd marked this pull request as ready for review June 27, 2026 17:22
@harsh-amd harsh-amd changed the title [hotswap] Gate entry trampoline rewrites explicitly fix(hotswap): gate entry trampoline rewrites for gfx12.5 Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant