Skip to content

Basic CI for hrx-v2 #130

Basic CI for hrx-v2

Basic CI for hrx-v2 #130

Workflow file for this run

name: HRX v2 CI
on:
push:
branches:
- hrx-v2
pull_request:
types: [opened, synchronize, reopened]
branches:
- hrx-v2
workflow_dispatch:
permissions:
contents: read
actions: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
hrx2-build:
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: gfx1151_strix-halo
gpu_target: gfx1151
runner: linux-gfx1151-gpu-rocm
rocm_tarball: therock-dist-linux-gfx1151-7.14.0a20260617.tar.gz
- name: gfx1201_9070
gpu_target: gfx1201
runner: linux-gfx120X-gpu-rocm
rocm_tarball: therock-dist-linux-gfx120X-all-7.14.0a20260617.tar.gz
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
container:
image: ghcr.io/rocm/no_rocm_image_ubuntu24_04@sha256:fba5f55a122dbb15925e98c51fe65bffe88c36e11ebb25b73daf2bea04202dc3
# --user 0:0: actions running inside the container need to write to some
# files set up outside the container by the runner agent. In
# June 2026 some runner agents set those files up with
# permissions for a "tester" user with UID/GID 1001, which
# matches the user in no_rocm_image_ubuntu24_04, and some are
# set up as root; accessing a file owned by root with user
# "tester" gives an EACCES. Running as root is the common
# denominator.
# --device kfd/dri: GPU access.
options: >-
--user 0:0
--device /dev/kfd
--device /dev/dri
env:
DEVWS_REPOSITORY: AaronStGeorge/llamacpp-devws
DEVWS_REF: ci-scripts
DEVWS_DIR: ${{ github.workspace }}/devws-src
ROCM_DIR: /work/rocm
ROCM_TARBALL_BASE_URL: https://rocm.nightlies.amd.com/tarball-multi-arch
ROCM_TARBALL_NAME: ${{ matrix.rocm_tarball }}
LLAMACPP_DEVWS_SKIP_VENV: "1"
CCACHE_COMPILERCHECK: content
HSA_FORCE_FINE_GRAIN_PCIE: "1"
steps:
- name: Checkout dev workspace tooling
uses: actions/checkout@v6
with:
repository: ${{ env.DEVWS_REPOSITORY }}
ref: ${{ env.DEVWS_REF }}
path: devws-src
- name: Checkout llama.cpp under test
uses: actions/checkout@v6
with:
path: devws-src/sources/llama.cpp
- name: Checkout HRX System
uses: actions/checkout@v6
with:
repository: ROCm/hrx-system
ref: main
path: devws-src/sources/hrx-system
- name: Runner identity
env:
MATRIX_NAME: ${{ matrix.name }}
MATRIX_GPU_TARGET: ${{ matrix.gpu_target }}
MATRIX_RUNS_ON: ${{ matrix.runner }}
run: "${GITHUB_WORKSPACE}/devws-src/ci/runner-info.sh"
- name: Install host build dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
ccache \
cmake \
curl \
git \
glslc \
libvulkan-dev \
ninja-build \
pkg-config \
python3 \
tar \
xz-utils
- name: Fetch ROCm nightly tarball
run: "${DEVWS_DIR}/ci/fetch-rocm-nightly.sh"
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: hrx-v2-${{ matrix.name }}
evict-old-files: 1d
save: ${{ github.event_name == 'pull_request' }}
- name: Build HRX
run: |
cd "${DEVWS_DIR}"
source .envrc
python3 skills/bootstrap-hrx-llama-builds/scripts/bootstrap_builds.py \
--workspace "${DEVWS_DIR}" \
--action check \
--action hrx \
--action loom \
--action rocm-health \
--action llama-hrx \
--skip-source-branch-check \
--gfx-targets auto \
--jobs "$(nproc)"
- name: Run sample MUL_MAT correctness config on HRX
run: |
cd "${DEVWS_DIR}"
source .envrc
mkdir -p "${GITHUB_WORKSPACE}/benchmark-results"
"${DEVWS_DIR}/ci/tools/run-op-test.py" \
--test-backend-ops "${DEVWS_DIR}/build/llama-hrx/bin/test-backend-ops" \
--test-file "${DEVWS_DIR}/ci/benchmark-configs/test/mul_mat_f16.txt" \
--op MUL_MAT \
--backend HRX0 \
--output "${GITHUB_WORKSPACE}/benchmark-results/sample-mul-mat-f16-hrx-test.jsonl" \
--raw-output "${GITHUB_WORKSPACE}/benchmark-results/sample-mul-mat-f16-hrx-test.txt"
- name: Run sample MUL_MAT benchmark config on HRX
run: |
cd "${DEVWS_DIR}"
source .envrc
mkdir -p "${GITHUB_WORKSPACE}/benchmark-results"
"${DEVWS_DIR}/ci/tools/run-op-perf.py" \
--test-backend-ops "${DEVWS_DIR}/build/llama-hrx/bin/test-backend-ops" \
--test-file "${DEVWS_DIR}/ci/benchmark-configs/test/mul_mat_f16.txt" \
--op MUL_MAT \
--backend HRX0 \
--output "${GITHUB_WORKSPACE}/benchmark-results/sample-mul-mat-f16-hrx-perf.jsonl" \
--raw-output "${GITHUB_WORKSPACE}/benchmark-results/sample-mul-mat-f16-hrx-perf.txt"
- name: Upload HRX benchmark results
uses: actions/upload-artifact@v5
with:
name: hrx-benchmark-results-${{ matrix.name }}
path: benchmark-results/
if-no-files-found: error