Skip to content

CI: ROCm workflow for LTS-C* (strict C++17) - #403

Merged
morousg merged 2 commits into
LTS-C++17from
LTS-C++17-rocm-ci
Oct 29, 2026
Merged

morousg merged 2 commits into
LTS-C++17from
LTS-C++17-rocm-ci

Conversation

@morousg

@morousg morousg commented Oct 29, 2026

Copy link
Copy Markdown
Member

Adds a ROCm CI job for the LTS branches: a port of main's cmake-linux-rocm-amd64.yml. Follow-up to #401, which added the HIP backend to LTS-C++17 but no workflow that builds it.

CI only: this PR adds one workflow file and changes no library, test or CMake code.

The job

  • Trigger and runner: pull requests to LTS-C*, on the self-hosted ROCm runner ([self-hosted, linux, x64, rocm]), with ROCm 10.1.
  • Build: HIP backend only (-DENABLE_HIP=ON -DENABLE_CUDA=OFF -DENABLE_CPU=OFF), in Release, with amdclang++ as CXX and HIP compiler. The CPU and CUDA backends are covered by the other LTS workflows.
  • Strict C++17: every source is compiled with -Werror=c++20-extensions -pedantic-errors.
    • -Wno-gnu-anonymous-struct is the one exception. fk::Array's unions in array.h use anonymous structs for x/y/z/w. That is a GNU extension every supported compiler accepts, and main has the same code.
  • First run: it will be the first ROCm CI run on LTS code. The HIP architecture is not set, so CMake detects it from the runner's GPU (gfx1200).

Differences from main's workflow

  • Triggers on LTS-C* instead of main.
  • No -DENABLE_CPU_MULTITHREAD (not ported to LTS) and no submodule checkout (LTS has no submodules).
  • Builds the benchmarks (-DENABLE_BENCHMARK=ON) and leaves them out of ctest (-E "^benchmark_"), as the other LTS workflows do.
  • actions/checkout@v6, as the other LTS workflows.
  • The strict flags above.
  • cmake from $HOME/cmake-4.4.4-linux-x86_64, which is installed on the runner.

To report back to main

  • Main's workflow puts $HOME/cmake-4.4.2-linux-x86_64/bin on the PATH, but that directory does not exist on the runner. Main therefore silently uses the system cmake (4.2.3), not 4.4.2.

Verification

  • Local compile-only check: the job's configure and build commands, run on the runner machine with cmake 4.4.4 and Ninja, plus -DHIP_ARCH=gfx1200 so CMake does not query the GPU. Result: 0 errors, 0 warnings, 42 _hip binaries (38 tests and 4 benchmarks), 38 ctest tests. Nothing was run on the GPU.
  • CI: see the checks below.

🤖 Generated with Claude Code

https://claude.ai/code/session_019iTqfS8rWiAyRMrM4uU64n

morousg and others added 2 commits October 29, 2026 19:40
Port of main's cmake-linux-rocm-amd64.yml to the LTS branches. It runs on
the self-hosted ROCm runner ([self-hosted, linux, x64, rocm]) with ROCm 10.1,
amdclang++ as CXX and HIP compiler, and builds the HIP backend only
(-DENABLE_HIP=ON -DENABLE_CUDA=OFF -DENABLE_CPU=OFF) in Release.

Differences from main:
- Triggers on pull requests to LTS-C* instead of main.
- No -DENABLE_CPU_MULTITHREAD (not ported to LTS) and no submodule checkout
  (LTS has no thread-pool submodule).
- Builds the benchmarks (-DENABLE_BENCHMARK=ON) and skips them in ctest
  (-E "^benchmark_"), as the other LTS workflows do.
- actions/checkout@v6, as the other LTS workflows.
- cmake from $HOME/cmake-4.4.4-linux-x86_64, which is the one installed on the
  runner (main's 4.4.2 path does not exist there, so main falls back to the
  system cmake).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iTqfS8rWiAyRMrM4uU64n
The ROCm job now passes -Werror=c++20-extensions -pedantic-errors for both
CXX and HIP sources (CMAKE_CXX_FLAGS and CMAKE_HIP_FLAGS), so CI enforces
the strict C++17 that the LTS branch promises. The CMake already adds
-Werror=c++20-extensions to the HIP sources; this extends it to the host
sources compiled by amdclang++ and adds -pedantic-errors to both.

-Wno-gnu-anonymous-struct is the one exception: the ArrayVector unions in
array.h use anonymous structs for x/y/z/w, a GNU extension that every
supported compiler accepts and that main has too.

Checked locally with the job's configure and build commands (cmake 4.4.4,
Ninja, amdclang++ 24.0.0, plus -DHIP_ARCH=gfx1200): 0 errors, 0 warnings,
42 _hip binaries, 38 ctest tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iTqfS8rWiAyRMrM4uU64n
@morousg
morousg merged commit 25057d8 into LTS-C++17 Oct 29, 2026
13 checks passed
@morousg
morousg deleted the LTS-C++17-rocm-ci branch October 29, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant