Skip to content

Commit f453acf

Browse files
Merge pull request #250 from menloresearch/update-dev-from-master-2025-09-15-00-36
Sync master with upstream release b6475
2 parents 06e5288 + b8e09f0 commit f453acf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10787
-5555
lines changed

.devops/rocm.Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG UBUNTU_VERSION=24.04
44
ARG ROCM_VERSION=6.4
55
ARG AMDGPU_VERSION=6.4
66

7-
# Target the CUDA build image
7+
# Target the ROCm build image
88
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
99

1010
### Build image
@@ -15,12 +15,12 @@ FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1515
# This is mostly tied to rocBLAS supported archs.
1616
# gfx803, gfx900, gfx1032, gfx1101, gfx1102,not officialy supported
1717
# gfx906 is deprecated
18-
#check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.2.4/reference/system-requirements.html
18+
#check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.4.1/reference/system-requirements.html
1919

20-
ARG ROCM_DOCKER_ARCH='gfx803,gfx900,gfx906,gfx908,gfx90a,gfx942,gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102'
20+
ARG ROCM_DOCKER_ARCH='gfx803,gfx900,gfx906,gfx908,gfx90a,gfx942,gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102,gfx1200,gfx1201'
2121
#ARG ROCM_DOCKER_ARCH=gfx1100
2222

23-
# Set nvcc architectured
23+
# Set ROCm architectured
2424
ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
2525
# Enable ROCm
2626
# ENV CC=/opt/rocm/llvm/bin/clang

.github/workflows/build.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
-DGGML_METAL_SHADER_DEBUG=ON \
8989
-DGGML_RPC=ON
9090
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
91+
leaks -atExit -- ./build/bin/test-thread-safety -hf ggml-org/gemma-3-270m-qat-GGUF -ngl 99 -p "$(printf 'hello %.0s' {1..128})" -n 16 -c 512 -ub 32 -np 2 -t 2 -lv 1
9192
9293
- name: Test
9394
id: cmake_test
@@ -126,7 +127,8 @@ jobs:
126127
-DCMAKE_BUILD_RPATH="@loader_path" \
127128
-DLLAMA_FATAL_WARNINGS=ON \
128129
-DGGML_METAL=OFF \
129-
-DGGML_RPC=ON
130+
-DGGML_RPC=ON \
131+
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
130132
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
131133
132134
- name: Test
@@ -1050,9 +1052,13 @@ jobs:
10501052
run: examples/sycl/win-build-sycl.bat
10511053

10521054
windows-latest-cmake-hip:
1053-
if: ${{ github.event.inputs.create_release != 'true' }}
10541055
runs-on: windows-2022
10551056

1057+
env:
1058+
# The ROCm version must correspond to the version used in the HIP SDK.
1059+
ROCM_VERSION: "6.4.2"
1060+
HIPSDK_INSTALLER_VERSION: "25.Q3"
1061+
10561062
steps:
10571063
- name: Clone
10581064
id: checkout
@@ -1061,24 +1067,22 @@ jobs:
10611067
- name: Clone rocWMMA repository
10621068
id: clone_rocwmma
10631069
run: |
1064-
git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
1070+
git clone https://github.com/rocm/rocwmma --branch rocm-${{ env.ROCM_VERSION }} --depth 1
10651071
10661072
- name: Cache ROCm Installation
10671073
id: cache-rocm
10681074
uses: actions/cache@v4
10691075
with:
10701076
path: C:\Program Files\AMD\ROCm
1071-
key: rocm-6.1-${{ runner.os }}-v1
1072-
restore-keys: |
1073-
rocm-6.1-${{ runner.os }}-
1077+
key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
10741078

10751079
- name: Install ROCm
10761080
if: steps.cache-rocm.outputs.cache-hit != 'true'
10771081
id: depends
10781082
run: |
10791083
$ErrorActionPreference = "Stop"
10801084
write-host "Downloading AMD HIP SDK Installer"
1081-
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
1085+
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
10821086
write-host "Installing AMD HIP SDK"
10831087
$proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -PassThru
10841088
$completed = $proc.WaitForExit(600000)

.github/workflows/release.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ jobs:
108108
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
109109
-DLLAMA_FATAL_WARNINGS=ON \
110110
-DGGML_METAL=OFF \
111-
-DGGML_RPC=ON
111+
-DGGML_RPC=ON \
112+
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
112113
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
113114
114115
- name: Determine tag name
@@ -528,11 +529,16 @@ jobs:
528529
windows-hip:
529530
runs-on: windows-2022
530531

532+
env:
533+
# The ROCm version must correspond to the version used in the HIP SDK.
534+
ROCM_VERSION: "6.4.2"
535+
HIPSDK_INSTALLER_VERSION: "25.Q3"
536+
531537
strategy:
532538
matrix:
533539
include:
534540
- name: "radeon"
535-
gpu_targets: "gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
541+
gpu_targets: "gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
536542

537543
steps:
538544
- name: Clone
@@ -542,21 +548,19 @@ jobs:
542548
- name: Clone rocWMMA repository
543549
id: clone_rocwmma
544550
run: |
545-
git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
551+
git clone https://github.com/rocm/rocwmma --branch rocm-${{ env.ROCM_VERSION }} --depth 1
546552
547553
- name: Cache ROCm Installation
548554
id: cache-rocm
549555
uses: actions/cache@v4
550556
with:
551557
path: C:\Program Files\AMD\ROCm
552-
key: rocm-6.1-${{ runner.os }}-v1
553-
restore-keys: |
554-
rocm-6.1-${{ runner.os }}-
558+
key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
555559

556560
- name: ccache
557561
uses: ggml-org/[email protected]
558562
with:
559-
key: windows-latest-cmake-hip-${{ matrix.name }}-x64
563+
key: windows-latest-cmake-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}-x64
560564
evict-old-files: 1d
561565

562566
- name: Install ROCm
@@ -565,7 +569,7 @@ jobs:
565569
run: |
566570
$ErrorActionPreference = "Stop"
567571
write-host "Downloading AMD HIP SDK Installer"
568-
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
572+
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
569573
write-host "Installing AMD HIP SDK"
570574
$proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -PassThru
571575
$completed = $proc.WaitForExit(600000)
@@ -610,9 +614,12 @@ jobs:
610614
-DLLAMA_CURL=OFF
611615
cmake --build build --target ggml-hip -j ${env:NUMBER_OF_PROCESSORS}
612616
md "build\bin\rocblas\library\"
617+
md "build\bin\hipblaslt\library"
613618
cp "${env:HIP_PATH}\bin\hipblas.dll" "build\bin\"
619+
cp "${env:HIP_PATH}\bin\hipblaslt.dll" "build\bin\"
614620
cp "${env:HIP_PATH}\bin\rocblas.dll" "build\bin\"
615621
cp "${env:HIP_PATH}\bin\rocblas\library\*" "build\bin\rocblas\library\"
622+
cp "${env:HIP_PATH}\bin\hipblaslt\library\*" "build\bin\hipblaslt\library\"
616623
617624
- name: Pack artifacts
618625
id: pack_artifacts

ci/run.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ function gg_run_ctest_with_model_debug {
270270
local model; model=$(gg_get_model)
271271
cd build-ci-debug
272272
set -e
273+
273274
(LLAMACPP_TEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log
275+
274276
set +e
275277
cd ..
276278
}
@@ -281,7 +283,15 @@ function gg_run_ctest_with_model_release {
281283
local model; model=$(gg_get_model)
282284
cd build-ci-release
283285
set -e
286+
284287
(LLAMACPP_TEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log
288+
289+
# test memory leaks
290+
#if [[ ! -z ${GG_BUILD_METAL} ]]; then
291+
# # TODO: this hangs for some reason ...
292+
# (time leaks -quiet -atExit -- ./bin/test-thread-safety -m $model --parallel 2 -t 2 -p "hello") 2>&1 | tee -a $OUT/${ci}-leaks.log
293+
#fi
294+
285295
set +e
286296
cd ..
287297
}
@@ -860,20 +870,15 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
860870
fi
861871

862872
ret=0
863-
if [ -z ${GG_BUILD_SYCL} ]; then
864-
# SYCL build breaks with debug build flags
865-
test $ret -eq 0 && gg_run ctest_debug
866-
fi
873+
test $ret -eq 0 && gg_run ctest_debug
867874
test $ret -eq 0 && gg_run ctest_release
868875

869876
if [ -z ${GG_BUILD_LOW_PERF} ]; then
870877
test $ret -eq 0 && gg_run embd_bge_small
871878
test $ret -eq 0 && gg_run rerank_tiny
872879

873880
if [ -z ${GG_BUILD_CLOUD} ] || [ ${GG_BUILD_EXTRA_TESTS_0} ]; then
874-
if [ -z ${GG_BUILD_SYCL} ]; then
875-
test $ret -eq 0 && gg_run test_scripts_debug
876-
fi
881+
test $ret -eq 0 && gg_run test_scripts_debug
877882
test $ret -eq 0 && gg_run test_scripts_release
878883
fi
879884

@@ -884,9 +889,7 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
884889
test $ret -eq 0 && gg_run pythia_2_8b
885890
#test $ret -eq 0 && gg_run open_llama_7b_v2
886891
fi
887-
if [ -z ${GG_BUILD_SYCL} ]; then
888-
test $ret -eq 0 && gg_run ctest_with_model_debug
889-
fi
892+
test $ret -eq 0 && gg_run ctest_with_model_debug
890893
test $ret -eq 0 && gg_run ctest_with_model_release
891894
fi
892895
fi

0 commit comments

Comments
 (0)