perftest: add a ROCm build to CI
PATCH 1/1 perftest: add a ROCm build to CI
CI builds only the CUDA configuration. The two existing workflows pass no --enable-rocm, so src/rocm_memory.c and everything behind HAVE_ROCM and HAVE_ROCM_DMABUF is never compiled on a pull request, and a change that breaks the ROCm backend goes green.
Add an Ubuntu 24.04 job building --enable-rocm --enable-rocm-dmabuf, alongside the two CUDA jobs and triggered the same way, as a matrix over gfx950 (Instinct MI355X, CDNA4) and gfx1250 (Instinct MI455X, CDNA5). Those two were picked to cover consecutive Instinct generations: HIP sources that compile correctly for one generation may have microarchitecture-specific issues on the next, and testing both catches that. fail-fast is off: a failure is far more likely to be specific to one generation than common to both, and cancelling the other leg hides exactly the comparison that would say so.
It runs in AMD's slim ROCm image rather than installing ROCm on the runner. The -full and -complete tags, and an apt install of the amdrocm-core metapackages, all pull the whole ML stack: Composable Kernel alone is over 2 GB, before rocSHMEM, MIOpen and the BLAS and FFT libraries. A compile check touches none of it. rocm/dev-ubuntu-24.04:7.2.4 is about 1.1 GB against 8.3 GB for the smallest 10.1 image, and still ships hipcc, the HIP and HSA headers, and device support for both matrix targets -- llc -mcpu=help lists gfx950 and gfx1250, and both compile.
7.2.4 rather than 10.1 because AMD publishes slim tags only through 7.2.x; every 10.x tag is -full. What this job needs is a toolchain that compiles the sources for the targets in the matrix, which that image provides. Moving to a newer ROCm is a one-line change to the container tag if a slim 10.x image appears, or if something here starts depending on a newer HIP API.
Like the CUDA jobs this builds and installs only. There is no RDMA device in a runner, and the project has no test suite.
Verified by running this workflow in a fork of the repository across both matrix architectures. Both legs passed: configure accepts every option, and make and make install succeed warning-free.
--- .github/workflows/ubuntu24_04_rocm7_2.yaml | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/ubuntu24_04_rocm7_2.yaml
.github/workflows/ubuntu24_04_rocm7_2.yaml new file +66 -0
@@ -0,0 +1,66 @@ +name: Build and Test perftest on Ubuntu 24.04 with ROCm + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-24.04 + + # AMD's slim ROCm image. The -full and -complete tags carry the whole ML + # stack -- Composable Kernel alone is over 2 GB -- which a compile check + # never touches. This one is about 1.1 GB and still ships hipcc, the HIP + # and HSA headers, and device support for every target below. + container: rocm/dev-ubuntu-24.04:7.2.4 + + strategy: + fail-fast: false + matrix: + rocm_arch: [gfx950, gfx1250] + + name: ROCm (${{ matrix.rocm_arch }}) + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # The job runs as root inside the container, so no sudo here. + - name: Install build dependencies + run: | + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y \ + build-essential \ + autoconf \ + automake \ + libtool \ + pkg-config \ + libibverbs-dev \ + librdmacm-dev \ + libibumad-dev \ + libpci-dev + + - name: Set up ROCm environment + run: | + echo "ROCM_PATH=/opt/rocm" >> $GITHUB_ENV + echo "/opt/rocm/bin" >> $GITHUB_PATH + + - name: Run autogen.sh + run: ./autogen.sh + + - name: Configure the build + run: | + ./configure --enable-rocm --enable-rocm-dmabuf \ + --with-rocm="$ROCM_PATH" + + - name: Build perftest + run: make + + - name: Install perftest + run: make install
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] perftest: matrix.rocm_arch is never passed to configure or make in CI workflow --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] perftest: matrix.rocm_arch is never passed to configure or make in CI workflow --
commit dee5fbc3aa52f87f3e4be6e0329a0a27dacd8a09
Author: Stephen Bates <[email protected]>
perftest: add a ROCm build to CI
This commit adds a GitHub Actions workflow to build perftest with ROCm and ROCm dmabuf support enabled on Ubuntu 24.04 inside AMD's slim ROCm container image across a matrix of gfx950 and gfx1250 targets.
Quoted 6 lines
.github/workflows/ubuntu24_04_rocm7_2.yaml new file +0
-0@@ -0,0 +1,66 @@
[ ... ]
Quoted 8 lines
.github/workflows/ubuntu24_04_rocm7_2.yaml new file +8
-0+ strategy: + fail-fast: false + matrix: + rocm_arch: [gfx950, gfx1250] + + name: ROCm (${{ matrix.rocm_arch }}) + + steps:
[ ... ]
Quoted 5 lines
.github/workflows/ubuntu24_04_rocm7_2.yaml new file +5
-0+ - name: Set up ROCm environment + run: | + echo "ROCM_PATH=/opt/rocm" >> $GITHUB_ENV + echo "/opt/rocm/bin" >> $GITHUB_PATH +
.github/workflows/ubuntu24_04_rocm7_2.yaml line 63
Quoted 10 lines
.github/workflows/ubuntu24_04_rocm7_2.yaml new file +10
-0+ - name: Run autogen.sh + run: ./autogen.sh + + - name: Configure the build + run: | + ./configure --enable-rocm --enable-rocm-dmabuf \ + --with-rocm="$ROCM_PATH" + + - name: Build perftest + run: make
[Severity: Medium]
In .github/workflows/ubuntu24_04_rocm7_2.yaml, jobs.build.strategy.matrix defines rocm_arch with gfx950 and gfx1250, and the commit message notes that this tests compilation across both Instinct generations.
However, ${{ matrix.rocm_arch }} is only referenced in the job display name and is never exported to the environment or passed to ./configure or make in jobs.build.steps.
Since GitHub Actions does not automatically export matrix variables into run steps, won't both legs of the matrix run identical builds without targeting either gfx950 or gfx1250?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1