[rocjitsu] Add CI workflow with HIP device kernel tests - #6448
Conversation
|
@amd-arosa I want to land this as a stop-gap until you have rocjitsu tests running in CI. Currently there are no rocjitsu tests run in CI (unless I'm mistaken) which isn't good. |
| # Add the AMD ROCm apt repo and its signing key. | ||
| sudo mkdir -p --mode=0755 /etc/apt/keyrings | ||
| wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key \ | ||
| | gpg --dearmor \ | ||
| | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null | ||
| echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] \ | ||
| https://repo.radeon.com/rocm/apt/latest noble main" \ | ||
| | sudo tee /etc/apt/sources.list.d/rocm.list |
There was a problem hiding this comment.
Why not grab therock tarball / pip install?
There was a problem hiding this comment.
That's what I (well, Claude) was trying initially, but couldn't get it work one CI job where it failed: https://github.com/ROCm/rocm-systems/actions/runs/26478854701/job/77971169397
So when Claude got it working with an apt install I pivoted to this approach. I can try with therock again, is would be nicer.
| CC: clang | ||
| CXX: clang++ |
There was a problem hiding this comment.
nit: set these via -DCMAKE_CXX_COMPILER / C_COMPILER? it's a bit awkward to use to separate configuration mechanisms
| name: Linux (clang, Release) | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
I think the best practice is to pin to a specific SHA
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed from the AMD apt repo for hipcc and device libraries. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related: ROCm#6479 (alternative using pip rocm-sdk-core)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul, rocBLAS GEMM). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK and math libraries installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm SDK installed via pip from TheRock. Decouple HIP test cmake gate from HSA_RUNTIME64 — the HIP tests only need hipcc for compilation and LD_PRELOAD at runtime. Prefer ROCM_PATH from env over deriving from compiler location in rj_add_device_kernel, for pip SDK compatibility. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative approach using ROCm apt packages - ROCm#6441: earlier pip attempt (closed)
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
|
See #6499 |
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting. After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed via TheRock nightly tarball. RocminfoTest excluded (requires /dev/kfd, unavailable on CI). Related PRs: - ROCm#6448: alternative using ROCm apt packages - ROCm#6479: alternative using ROCm pip packages
Summary
Before this PR, the TheRock CI builds rocjitsu (as part of THEROCK_ENABLE_EMULATION) but does not run its tests — rocjitsu is not in repos-config.json. The only rocjitsu-specific CI is pre-commit formatting.
After this PR, every PR touching emulation/rocjitsu/ gets a dedicated job that builds rocjitsu and runs its full ctest suite (~450 tests), including HIP integration tests (memcpy, vector_add, matmul). No GPU hardware needed — tests run on the built-in CPU emulator. ROCm installed from the AMD apt repo for hipcc and device libraries.
RocminfoTest excluded (requires /dev/kfd, unavailable on CI).
Test plan