Skip to content

feat(rocjitsu): package HSA hotswap runtime - #6872

Merged
marbre merged 6 commits into
mainfrom
users/Groverkss/rocjitsu-hotswap-packaging
Jul 28, 2026
Merged

marbre merged 6 commits into
mainfrom
users/Groverkss/rocjitsu-hotswap-packaging

Conversation

@Groverkss

@Groverkss Groverkss commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Publish libhsa_hotswap_rocjitsu.so as a dedicated rocjitsu artifact component. ROCr's HSA_HOTSWAP_ENABLE=2 mode requires this library, so the HSA hotswap hook must be included in runtime distributions.

Keeping it as an independently selectable component lets runtime packages ship the HSA hotswap library without pulling in the general librocjitsu shared library or introducing a ROCr build or link dependency. The currently validated unstripped shared library is 5,996,136 bytes (approximately 5.72 MiB).

Include the component in the rocm-sdk-core wheel, the amdrocm-runtime native package, and base artifact installations. Validate the staged shared library and add focused coverage for wheel selection and base artifact retrieval.

ISSUE ID: ROCm/rocm-systems#8939

@Groverkss

Copy link
Copy Markdown
Contributor Author

Depends on ROCm/rocm-systems#9262

@therock-pr-bot

therock-pr-bot Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Title/Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

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

@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 27, 2026
@therock-pr-bot

therock-pr-bot Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@stellaraccident stellaraccident left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the urgency, we can land like this, but generally we don't arbitrarily extend components like that. We should come back and set it up as its own artifact. Please add such a todo ti te toml file before landing.

@Groverkss

Groverkss commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Can be landed after #6897 (and after ci passes ofcourse)

@Groverkss
Groverkss marked this pull request as ready for review July 27, 2026 17:48
@Groverkss
Groverkss requested a review from a team as a code owner July 27, 2026 17:48
Groverkss and others added 3 commits July 28, 2026 13:42
Publish libhsa_hotswap_rocjitsu.so as a dedicated rocjitsu artifact component. ROCr's HSA_HOTSWAP_ENABLE=2 mode requires this library, so the HSA hotswap hook must be included in runtime distributions.

Keeping it as an independently selectable component lets runtime packages ship the HSA hotswap hook without pulling in the general librocjitsu shared library or introducing a ROCr build or link dependency. The currently validated unstripped shared library is 5,996,136 bytes (approximately 5.72 MiB).

Include the component in the rocm-sdk-core wheel, the amdrocm-runtime native package, and base artifact installations. Validate the staged shared library and add focused coverage for wheel selection and base artifact retrieval.
@Groverkss
Groverkss force-pushed the users/Groverkss/rocjitsu-hotswap-packaging branch from 2c34fa0 to 31d1d90 Compare July 28, 2026 12:46
@marbre

marbre commented Jul 28, 2026

Copy link
Copy Markdown
Member

Can be landed after #6897 (and after ci passes ofcourse)

This PR was marked and closed as stale but I assume another bump landed that ships the base for this?

@Groverkss

Copy link
Copy Markdown
Contributor Author

Can be landed after #6897 (and after ci passes ofcourse)

This PR was marked and closed as stale but I assume another bump landed that ships the base for this?

Yes

@Groverkss

Copy link
Copy Markdown
Contributor Author

Given the urgency, we can land like this, but generally we don't arbitrarily extend components like that. We should come back and set it up as its own artifact. Please add such a todo ti te toml file before landing.

Created a new artifact instead of leaving a TODO.

@therock-pr-bot therock-pr-bot Bot removed the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 28, 2026
"core-hipinfo_run",
"core-runtime_run",
"core-runtime_lib",
"rocjitsu-hotswap_hook",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough context on rocjitsu and neither on hotswap but is this really a base requirement to run tests? I bet it is not (as of today).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not needed for tests today yes. But eventually, we plan to choose which backend to make default and if we do make it default any tests on a gfx1250 A0 machine CI won't work, because the runtime will use this library. For context, anything that uses rocr-runtime (almost everything that runs on a gpu) for gfx1250 A0 needs hotswap. The comgr backend is default today, but we might switch to the rocjitsu backend. If any CI decides to use the rocjitsu comgr backend, it will not be able to run tests without this.

Comment thread emulation/artifact-rocjitsu.toml Resolved
Comment thread emulation/CMakeLists.txt Resolved
@Groverkss
Groverkss requested a review from marbre July 28, 2026 14:42

@marbre marbre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly good, a few NITs.

Comment thread emulation/CMakeLists.txt Resolved
Comment thread emulation/CMakeLists.txt Resolved
Comment thread emulation/CMakeLists.txt Resolved
@marbre marbre changed the title feat(rocjitsu): package HSA hotswap hook with runtime feat(rocjitsu): package HSA hotswap runtime Jul 28, 2026

@marbre marbre left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified _rocm_sdk_core/lib/libhsa_hotswap_rocjitsu.so made it's way into rocm-sdk-core. CI failures are unrelated.

@marbre
marbre merged commit ccaba7c into main Jul 28, 2026
147 of 153 checks passed
@marbre
marbre deleted the users/Groverkss/rocjitsu-hotswap-packaging branch July 28, 2026 17:58
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Jul 28, 2026
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