Skip to content

build(rocjitsu): add rocjitsu to therock build system - #4942

Merged
amd-arosa merged 8 commits into
mainfrom
users/arosa/rj-ci
May 4, 2026
Merged

amd-arosa merged 8 commits into
mainfrom
users/arosa/rj-ci

Conversation

@amd-arosa

Copy link
Copy Markdown
Contributor

Motivation

Integrate rocjitsu (ROCm Just-in-Time Suite) into TheRock's CI build system. rocjitsu is a simulation, virtualization, and instrumentation toolset for AMD GPU applications. It provides ISA-level execution of AMD GPU and RISC-V machine code from HIP fat binaries without requiring GPU hardware. Until now it had only a standalone build and a separate CI workflow in rocm-systems; this PR brings it into the TheRock super-project so it participates in the unified build, artifact distribution, and test infrastructure.

Technical Details

followed https://github.com/ROCm/TheRock/blob/main/docs/development/build_system.md#adding-sub-projects

Test Plan

The CI should run and pass.

Test Result

Worked on my machine.

Submission Checklist

Comment thread emulation/CMakeLists.txt Resolved
Comment thread BUILD_TOPOLOGY.toml Resolved
Comment thread BUILD_TOPOLOGY.toml Resolved
@amd-arosa
amd-arosa marked this pull request as draft April 30, 2026 20:22
@amd-arosa
amd-arosa requested a review from geomin12 April 30, 2026 20:50
@amd-arosa
amd-arosa force-pushed the users/arosa/rj-ci branch from cd35c26 to 53c9114 Compare May 4, 2026 18:02
amd-arosa and others added 8 commits May 4, 2026 11:03
Co-authored-by: Copilot <copilot@github.com>
Move the rocjitsu TheRock wrapper under a new top-level simulation directory,
include its artifact group in the compiler-runtime stage, and change its feature
group to SIMULATION.

Also update the rocjitsu artifact descriptor paths to match the new
simulation/rocjitsu staging location.

Co-authored-by: Copilot <copilot@github.com>
Move the rocjitsu TheRock wrapper from simulation/ to emulation/, update artifact staging paths, and switch the generated feature group to EMULATION.
Prefer rocm-systems/emulation/rocjitsu when present, and fall back to
rocm-systems/experimental/rocjitsu for existing checkouts. Emit a clear
configure error if neither source layout is available.

Co-authored-by: Copilot <copilot@github.com>
@amd-arosa
amd-arosa force-pushed the users/arosa/rj-ci branch from 53c9114 to 02891cc Compare May 4, 2026 18:03
@amd-arosa
amd-arosa marked this pull request as ready for review May 4, 2026 18:03
@amd-arosa
amd-arosa requested a review from stellaraccident May 4, 2026 18:54

@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.

If it doesn't regress CI, LGTM.

@ScottTodd ScottTodd 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.

I'd like to check the Linux build logs for this to see if the new component is enabled by default and if it influences CI builds (e.g. adding binary size, adding build time, causing failures)... but we have a 3h+ queue for new AWS runners: https://github.com/ROCm/TheRock/actions/runs/25334890887/job/74277759247?pr=4942

Comment thread emulation/CMakeLists.txt Resolved
@amd-arosa
amd-arosa merged commit 3193265 into main May 4, 2026
17 checks passed
@amd-arosa
amd-arosa deleted the users/arosa/rj-ci branch May 4, 2026 21:36
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage May 4, 2026
@ScottTodd

Copy link
Copy Markdown
Member

The request here was to wait for the Linux jobs to get scheduled and complete, not just merge without signal...

@ScottTodd

Copy link
Copy Markdown
Member

This broke the build: https://github.com/ROCm/TheRock/actions/runs/25344864053/job/74312073259#step:15:181. Please listen to review feedback next time


82/84 Test #82: therock-validate-shared-lib-librocprofv3-list-avail.so ...........   Passed    0.05 sec
      Start 83: therock-validate-shared-lib-librocjitsu.so
83/84 Test #83: therock-validate-shared-lib-librocjitsu.so .......................***Failed    0.03 sec
Validating shared library: /__w/TheRock/TheRock/build/emulation/rocjitsu/dist/lib/librocjitsu.soTraceback (most recent call last):
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 27, in <module>
    main(sys.argv[1:])
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 23, in main
    run(args)
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 15, in run
    so = ctypes.cdll.LoadLibrary(shared_lib)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python/cp312-cp312/lib/python3.12/ctypes/__init__.py", line 460, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/python/cp312-cp312/lib/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /__w/TheRock/TheRock/build/emulation/rocjitsu/dist/lib/librocjitsu.so: undefined symbol: _ZNK8rocjitsu16RegisterLiveness19find_free_sgpr_pairEt

      Start 84: therock-examples-cpp-sdk-user
84/84 Test #84: therock-examples-cpp-sdk-user ....................................   Passed    3.99 sec

99% tests passed, 1 tests failed out of 84

Total Test time (real) =   5.86 sec

The following tests FAILED:
	 83 - therock-validate-shared-lib-librocjitsu.so (Failed)

ScottTodd added a commit that referenced this pull request May 4, 2026
Reverts #4942

Broke the build:
https://github.com/ROCm/TheRock/actions/runs/25344864053/job/74312073259#step:15:181
```

82/84 Test #82: therock-validate-shared-lib-librocprofv3-list-avail.so ...........   Passed    0.05 sec
      Start 83: therock-validate-shared-lib-librocjitsu.so
83/84 Test #83: therock-validate-shared-lib-librocjitsu.so .......................***Failed    0.03 sec
Validating shared library: /__w/TheRock/TheRock/build/emulation/rocjitsu/dist/lib/librocjitsu.soTraceback (most recent call last):
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 27, in <module>
    main(sys.argv[1:])
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 23, in main
    run(args)
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 15, in run
    so = ctypes.cdll.LoadLibrary(shared_lib)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python/cp312-cp312/lib/python3.12/ctypes/__init__.py", line 460, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/python/cp312-cp312/lib/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /__w/TheRock/TheRock/build/emulation/rocjitsu/dist/lib/librocjitsu.so: undefined symbol: _ZNK8rocjitsu16RegisterLiveness19find_free_sgpr_pairEt

      Start 84: therock-examples-cpp-sdk-user
84/84 Test #84: therock-examples-cpp-sdk-user ....................................   Passed    3.99 sec

99% tests passed, 1 tests failed out of 84

Total Test time (real) =   5.86 sec

The following tests FAILED:
	 83 - therock-validate-shared-lib-librocjitsu.so (Failed)
Errors while running CTest
Error: Process completed with exit code 8.
```
@ScottTodd

Copy link
Copy Markdown
Member

Reverted in #5033

@ScottTodd

Copy link
Copy Markdown
Member

but we have a 3h+ queue for new AWS runners: https://github.com/ROCm/TheRock/actions/runs/25334890887/job/74277759247?pr=4942

We're turning off those AWS runners with #5034 fyi

@amd-arosa
amd-arosa restored the users/arosa/rj-ci branch May 7, 2026 17:14
@amd-arosa

Copy link
Copy Markdown
Contributor Author

Reverted in #5033

Sorry, failure caused by ordering. New feature got added between what I tested and now.

@ScottTodd ScottTodd mentioned this pull request Jul 22, 2026
1 task done
amd-arosa added a commit that referenced this pull request Jul 27, 2026
## Motivation

* Fixes #6418.
* Rust is required to build the Mirage emulator UX, see
#5730 and
#4942.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
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.

3 participants