1- name : HRX CI
1+ name : HRX v2 CI
22
33on :
4+ push :
5+ branches :
6+ - hrx-v2
47 pull_request :
58 types : [opened, synchronize, reopened]
69 branches :
7- - hrx-integration
10+ - hrx-v2
11+ workflow_dispatch :
812
913permissions :
1014 contents : read
@@ -15,81 +19,128 @@ concurrency:
1519 cancel-in-progress : true
1620
1721jobs :
18- hrx-build :
19- name : ubuntu-latest
20- runs-on : ubuntu-latest
22+ hrx2-build :
23+ name : ${{ matrix.name }}
24+ strategy :
25+ fail-fast : false
26+ matrix :
27+ include :
28+ - name : gfx120X
29+ runner : linux-gfx120X-gpu-rocm
30+ rocm_tarball : therock-dist-linux-gfx120X-all-7.14.0a20260617.tar.gz
31+ - name : gfx125X
32+ runner : linux-gfx125X-gpu-rocm
33+ rocm_tarball : therock-dist-linux-gfx125X-dcgpu-7.14.0a20260617.tar.gz
34+ runs-on : ${{ matrix.runner }}
35+ timeout-minutes : 120
36+ defaults :
37+ run :
38+ shell : bash --noprofile --norc -exo pipefail {0}
39+ container :
40+ image : ghcr.io/rocm/no_rocm_image_ubuntu24_04@sha256:fba5f55a122dbb15925e98c51fe65bffe88c36e11ebb25b73daf2bea04202dc3
41+ options : >-
42+ --user 0:0
43+ --device /dev/kfd
44+ --device /dev/dri
2145 env :
22- HRX_WORK_DIR : ${{ github.workspace }}
23- # Public location for bench tooling (rsuderman/llamacpp_ci and fork
24- # AaronStGeorge/llamacpp_ci)
25- # TODO: switch to ROCm/llamacpp-hrx-bench once it is open sourced.
26- BENCH_REPOSITORY : AaronStGeorge/llamacpp_ci
27- BENCH_REF : ' main'
28- BENCH_DIR : ${{ github.workspace }}/bench
29- LLAMA_SRC_DIR : ${{ github.workspace }}/llama-src
30- HRX_ARTIFACT_SET : ' core-with-upstream-hip'
46+ DEVWS_REPOSITORY : AaronStGeorge/llamacpp-devws
47+ DEVWS_REF : build-hrx-v2
48+ DEVWS_DIR : /work/llamacpp-devws
49+ ROCM_DIR : /work/rocm
50+ ROCM_TARBALL_BASE_URL : https://rocm.nightlies.amd.com/tarball-multi-arch
51+ ROCM_TARBALL_NAME : ${{ matrix.rocm_tarball }}
3152 CCACHE_COMPILERCHECK : content
53+ HSA_FORCE_FINE_GRAIN_PCIE : " 1"
3254
3355 steps :
34- - name : Checkout llama.cpp (under test)
56+ - name : Checkout dev workspace tooling
57+ uses : actions/checkout@v6
58+ with :
59+ repository : ${{ env.DEVWS_REPOSITORY }}
60+ ref : ${{ env.DEVWS_REF }}
61+ path : devws-src
62+
63+ - name : Checkout llama.cpp under test
3564 uses : actions/checkout@v6
3665 with :
3766 path : llama-src
3867
39- - name : Checkout bench tooling
68+ - name : Checkout HRX System
4069 uses : actions/checkout@v6
4170 with :
42- repository : ${{ env.BENCH_REPOSITORY }}
43- ref : ${{ env.BENCH_REF }}
44- path : bench
71+ repository : ROCm/hrx-system
72+ ref : main
73+ path : hrx-system-src
4574
46- - name : Install ROCm build dependencies
47- run : " ${BENCH_DIR}/scripts/hrx/install-rocm-deps.sh"
75+ - name : Runner identity
76+ if : always()
77+ run : |
78+ printf 'RUNNER_NAME=%s\n' "${RUNNER_NAME:-}"
79+ printf 'RUNNER_OS=%s\n' "${RUNNER_OS:-}"
80+ printf 'GITHUB_EVENT_NAME=%s\n' "${GITHUB_EVENT_NAME:-}"
81+ hostname
82+ uname -a
83+ ls -l /dev/kfd /dev/dri || true
84+ printenv | sort | grep -E '^(GITHUB_|RUNNER_|ROCM_|HSA_|HIP_)' || true
85+
86+ - name : Install host build dependencies
87+ run : |
88+ apt-get update
89+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
90+ build-essential \
91+ ca-certificates \
92+ ccache \
93+ cmake \
94+ curl \
95+ git \
96+ glslc \
97+ libvulkan-dev \
98+ ninja-build \
99+ pkg-config \
100+ python3 \
101+ tar \
102+ xz-utils
103+
104+ - name : Stage dev workspace under /work
105+ run : |
106+ rm -rf "${DEVWS_DIR}"
107+ mkdir -p "${DEVWS_DIR}/sources"
108+ cp -a "${GITHUB_WORKSPACE}/devws-src/." "${DEVWS_DIR}/"
109+ cp -a "${GITHUB_WORKSPACE}/llama-src" "${DEVWS_DIR}/sources/llama.cpp"
110+ cp -a "${GITHUB_WORKSPACE}/hrx-system-src" "${DEVWS_DIR}/sources/hrx-system"
111+ git -C "${DEVWS_DIR}/sources/llama.cpp" checkout -B hrx-v2
112+ git -C "${DEVWS_DIR}/sources/hrx-system" checkout -B main
113+
114+ - name : Fetch ROCm nightly tarball
115+ run : |
116+ rm -rf "${ROCM_DIR}" /work/rocm-tarball
117+ mkdir -p "${ROCM_DIR}" /work/rocm-tarball
118+ curl -fsSL "${ROCM_TARBALL_BASE_URL}/${ROCM_TARBALL_NAME}" \
119+ -o "/work/rocm-tarball/${ROCM_TARBALL_NAME}"
120+ tar -xzf "/work/rocm-tarball/${ROCM_TARBALL_NAME}" -C "${ROCM_DIR}"
121+ ln -sfn "${ROCM_DIR}" "${DEVWS_DIR}/rocm"
122+ test -x "${DEVWS_DIR}/rocm/bin/rocminfo"
123+ test -x "${DEVWS_DIR}/rocm/bin/amdclang++"
48124
49125 - name : ccache
50126 uses : ggml-org/ccache-action@v1.2.21
51127 with :
52- key : ubuntu-latest -${{ env.HRX_ARTIFACT_SET }}
128+ key : hrx-v2 -${{ matrix.name }}
53129 evict-old-files : 1d
54130 save : ${{ github.event_name == 'pull_request' }}
55131
56- - name : Checkout HRX
57- run : " ${BENCH_DIR}/scripts/hrx/checkout-hrx.sh"
58-
59- - name : Fetch ROCm assets
60- run : " ${BENCH_DIR}/scripts/hrx/fetch-rocm-assets.sh"
61-
62- - name : Build HRX
63- run : " ${BENCH_DIR}/scripts/hrx/build-hrx.sh"
64-
65- - name : Validate HRX
66- run : " ${BENCH_DIR}/scripts/hrx/validate-hrx.sh"
67-
68- - name : Build llama.cpp with HRX
69- run : " ${BENCH_DIR}/scripts/hrx/build-llama-hrx.sh"
70-
71- - name : Run sample MUL_MAT correctness config on CPU
132+ - name : Build HRX2
72133 run : |
73- . "${BENCH_DIR}/scripts/hrx/env.sh"
74- "${BENCH_DIR}/tools/run-op-test.py" \
75- --test-backend-ops "${LLAMA_BUILD_DIR}/bin/test-backend-ops" \
76- --test-file "${BENCH_DIR}/benchmark-configs/test/mul_mat_f16.txt" \
77- --op MUL_MAT \
78- --backend CPU \
79- --output benchmark-results/sample-mul-mat-f16-cpu-test.jsonl
80-
81- - name : Run sample MUL_MAT benchmark config on CPU
134+ cd "${DEVWS_DIR}"
135+ python3 skills/bootstrap-hrx-llama-builds/scripts/bootstrap_builds.py \
136+ --action check \
137+ --action hrx \
138+ --action loom \
139+ --action rocm-health \
140+ --action llama-hrx2 \
141+ --gfx-targets auto \
142+ --jobs "$(nproc)"
143+
144+ - name : Verify HRX2 build configuration
82145 run : |
83- . "${BENCH_DIR}/scripts/hrx/env.sh"
84- "${BENCH_DIR}/tools/run-op-perf.py" \
85- --test-backend-ops "${LLAMA_BUILD_DIR}/bin/test-backend-ops" \
86- --test-file "${BENCH_DIR}/benchmark-configs/test/mul_mat_f16.txt" \
87- --op MUL_MAT \
88- --backend CPU \
89- --output benchmark-results/sample-mul-mat-f16-cpu-perf.jsonl
90-
91- - name : Upload CPU benchmark results
92- uses : actions/upload-artifact@v5
93- with :
94- name : cpu-benchmark-results
95- path : benchmark-results/
146+ grep -F 'GGML_HRX2:BOOL=ON' "${DEVWS_DIR}/build/llama-hrx2/CMakeCache.txt"
0 commit comments