Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] perftest: add a ROCm build to CI
@ 2026-11-04 15:50 Stephen Bates
  2026-11-04 15:55 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Bates @ 2026-11-04 15:50 UTC (permalink / raw)
  To: linux-rdma; +Cc: Stephen Bates, sshaul, stephen.bates

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.

Link: https://github.com/linux-rdma/perftest/pull/418
Signed-off-by: Stephen Bates <sbates@raithlin.com>
---
 .github/workflows/ubuntu24_04_rocm7_2.yaml | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 .github/workflows/ubuntu24_04_rocm7_2.yaml

diff --git a/.github/workflows/ubuntu24_04_rocm7_2.yaml b/.github/workflows/ubuntu24_04_rocm7_2.yaml
new file mode 100644
index 0000000..0a4c706
--- /dev/null
+++ b/.github/workflows/ubuntu24_04_rocm7_2.yaml
@@ -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
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perftest: add a ROCm build to CI
  2026-11-04 15:50 [PATCH] perftest: add a ROCm build to CI Stephen Bates
@ 2026-11-04 15:55 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-04 15:55 UTC (permalink / raw)
  To: Stephen Bates, linux-rdma

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 <sbates@raithlin.com>

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.

Link: https://github.com/linux-rdma/perftest/pull/418

> diff --git a/.github/workflows/ubuntu24_04_rocm7_2.yaml b/.github/workflows/ubuntu24_04_rocm7_2.yaml
> new file mode 100644
> index 0000000000000..0a4c706ea5ca5
> --- /dev/null
> +++ b/.github/workflows/ubuntu24_04_rocm7_2.yaml
> @@ -0,0 +1,66 @@

[ ... ]

> +    strategy:
> +      fail-fast: false
> +      matrix:
> +        rocm_arch: [gfx950, gfx1250]
> +
> +    name: ROCm (${{ matrix.rocm_arch }})
> +
> +    steps:

[ ... ]

> +      - 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

[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?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104155023.250706-1-sbates@raithlin.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-04 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 15:50 [PATCH] perftest: add a ROCm build to CI Stephen Bates
2026-11-04 15:55 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox