char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
89fe24240
char/aliceai-t5-moe
1name : CI (self-hosted) 2 3on : 4workflow_dispatch : # allows manual triggering 5push : 6branches : 7- master 8paths : [ 9'.github/workflows/build-self-hosted.yml' , 10'ci/run.sh' , 11'**/CMakeLists.txt' , 12'**/.cmake' , 13'**/*.h' , 14'**/*.hpp' , 15'**/*.c' , 16'**/*.cpp' , 17'**/*.cu' , 18'**/*.cuh' , 19'**/*.swift' , 20'**/*.m' , 21'**/*.metal' , 22'**/*.comp' , 23'**/*.glsl' , 24'**/*.wgsl' 25] 26 27pull_request : 28types : [ opened , synchronize , reopened ] 29paths : [ 30'.github/workflows/build-self-hosted.yml' , 31'ci/run.sh' , 32'**/CMakeLists.txt' , 33'**/.cmake' , 34'**/*.h' , 35'**/*.hpp' , 36'**/*.c' , 37'**/*.cpp' , 38'**/*.cu' , 39'**/*.cuh' , 40'**/*.swift' , 41'**/*.m' , 42'**/*.metal' , 43'**/*.comp' , 44'**/*.glsl' , 45'**/*.wgsl' 46] 47 48concurrency : 49group : ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} 50cancel-in-progress : true 51 52env : 53# note: this is dud token to avoid rate limiting (https://github.com/ggml-org/llama.cpp/pull/25706#issuecomment-4979941302) 54HF_TOKEN : ${{ secrets.HF_TOKEN_CI }} 55GGML_NLOOP : 3 56GGML_N_THREADS : 1 57LLAMA_ARG_LOG_COLORS : 1 58LLAMA_ARG_LOG_PREFIX : 1 59LLAMA_ARG_LOG_TIMESTAMPS : 1 60 61jobs : 62gpu-cuda : 63runs-on : "hf-jobs-t4-small:cuda13" 64 65steps : 66- name : Clone 67id : checkout 68uses : actions/checkout@v6 69 70- name : Install dependencies 71run : | 72sudo apt update 73sudo apt install -y cmake libssl-dev time unzip wget python3 python3-venv python3-pip 74 75- name : ccache 76uses : ggml-org/ccache-action@v1.2.24 77with : 78restore : false 79save : false 80 81- name : ccache-buckets-restore 82uses : ./.github/actions/ccache-buckets 83with : 84key : self-hosted-gpu-cuda 85folder : llama.cpp 86hf_bucket : ggml-org/cache 87 88- name : Test 89id : ggml-ci 90run : | 91nvidia-smi 92GG_BUILD_CUDA=1 CUDACXX=/usr/local/cuda/bin/nvcc bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 93 94- name : ccache-buckets-save 95if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 96uses : ./.github/actions/ccache-buckets 97env : 98HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }} 99with : 100key : self-hosted-gpu-cuda 101folder : llama.cpp 102evict-old-files : 1d 103hf_bucket : ggml-org/cache 104save : true 105 106gpu-rocm : 107runs-on : [ self-hosted , Linux , AMD ] 108 109steps : 110- name : Clone 111id : checkout 112uses : actions/checkout@v6 113 114- name : Test 115id : ggml-ci 116# HIP_LAUNCH_BLOCKING=1: workaround for an async-execution correctness 117# issue on integrated RDNA3.5 (gfx1151) where batched inference returns 118# incorrect output (perplexity ~88 vs ~9.4). Serializing kernel launches 119# restores correctness. Remove once the underlying ROCm/HIP issue is fixed. 120env : 121HIP_LAUNCH_BLOCKING : "1" 122run : | 123rocminfo 124GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS=gfx1151 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 125 126gpu-vulkan-nvidia-cm : 127runs-on : [ self-hosted , Linux , NVIDIA ] 128 129steps : 130- name : Clone 131id : checkout 132uses : actions/checkout@v6 133 134- name : Test 135id : ggml-ci 136run : | 137vulkaninfo --summary 138GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 139 140gpu-vulkan-nvidia-cm2 : 141runs-on : [ self-hosted , Linux , NVIDIA , COOPMAT2 ] 142 143steps : 144- name : Clone 145id : checkout 146uses : actions/checkout@v6 147 148- name : Test 149id : ggml-ci 150run : | 151vulkaninfo --summary 152GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 153 154gpu-webgpu-nvidia : 155runs-on : [ self-hosted , Linux , NVIDIA , X64 ] 156 157steps : 158- name : Clone 159id : checkout 160uses : actions/checkout@v6 161 162- name : Dawn Dependency 163id : dawn-depends 164run : | 165DAWN_VERSION="v20260908.214631" 166DAWN_OWNER="google" 167DAWN_REPO="dawn" 168DAWN_ASSET_NAME="Dawn-94c3c9cc0d5fb2e85aebb370fa8d37b71aa34655-ubuntu-latest-Release" 169echo "Fetching release asset from https://github.com/google/dawn/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.tar.gz" 170curl -L -o artifact.tar.gz \ 171"https://github.com/google/dawn/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.tar.gz" 172mkdir dawn 173tar -xvf artifact.tar.gz -C dawn --strip-components=1 174 175- name : Test 176id : ggml-ci 177run : | 178GG_BUILD_WEBGPU=1 \ 179GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \ 180GG_BUILD_WEBGPU_DAWN_DIR="$GITHUB_WORKSPACE/dawn/lib64/cmake/Dawn" \ 181bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 182 183# TODO: provision AMX-compatible machine 184#cpu-amx: 185# runs-on: [self-hosted, Linux, CPU, AMX] 186 187# steps: 188# - name: Clone 189# id: checkout 190# uses: actions/checkout@v6 191 192# - name: Test 193# id: ggml-ci 194# run: | 195# bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 196 197# TODO: provision AMD GPU machine 198# amd-vulkan: 199# runs-on: [self-hosted, Linux, AMD] 200 201# steps: 202# - name: Clone 203# id: checkout 204# uses: actions/checkout@v6 205 206# - name: Test 207# id: ggml-ci 208# run: | 209# vulkaninfo --summary 210# GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 211 212# TODO: provision AMD GPU machine 213# amd-rocm: 214# runs-on: [self-hosted, Linux, AMD] 215 216# steps: 217# - name: Clone 218# id: checkout 219# uses: actions/checkout@v6 220 221# - name: Test 222# id: ggml-ci 223# run: | 224# amd-smi static 225# GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS="gfx1101" bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 226 227gpu-metal : 228runs-on : [ self-hosted , macOS , ARM64 ] 229 230steps : 231- name : Clone 232id : checkout 233uses : actions/checkout@v6 234 235- name : Test 236id : ggml-ci 237run : | 238GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 239 240gpu-webgpu-apple : 241runs-on : [ self-hosted , macOS , ARM64 ] 242 243steps : 244- name : Clone 245id : checkout 246uses : actions/checkout@v6 247 248- name : Dawn Dependency 249id : dawn-depends 250run : | 251DAWN_VERSION="v20260908.214631" 252DAWN_OWNER="google" 253DAWN_REPO="dawn" 254DAWN_ASSET_NAME="Dawn-94c3c9cc0d5fb2e85aebb370fa8d37b71aa34655-macos-latest-Release" 255echo "Fetching release asset from https://github.com/google/dawn/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.tar.gz" 256curl -L -o artifact.tar.gz \ 257"https://github.com/google/dawn/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.tar.gz" 258mkdir dawn 259tar -xvf artifact.tar.gz -C dawn --strip-components=1 260 261- name : Test 262id : ggml-ci 263run : | 264GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \ 265bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 266 267gpu-vulkan-apple : 268runs-on : [ self-hosted , macOS , ARM64 ] 269 270steps : 271- name : Clone 272id : checkout 273uses : actions/checkout@v6 274 275- name : Test 276id : ggml-ci 277run : | 278vulkaninfo --summary 279GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 280 281gpu-vulkan-intel-linux : 282runs-on : [ self-hosted , Linux , Intel ] 283 284steps : 285- name : Clone 286id : checkout 287uses : actions/checkout@v6 288with : 289persist-credentials : false 290 291- name : Test 292id : ggml-ci 293run : | 294vulkaninfo --summary 295GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 296 297gpu-vulkan-intel-windows : 298runs-on : [ self-hosted , Windows , X64 , Intel ] 299 300steps : 301- name : Clone 302id : checkout 303uses : actions/checkout@v6 304 305- name : Test 306id : ggml-ci 307shell : C:\msys64\usr\bin\bash.exe --noprofile --norc -eo pipefail "{0}" 308env : 309MSYSTEM : UCRT64 310CHERE_INVOKING : 1 311PATH : C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Windows\System32;${{ env.PATH }} 312run : | 313vulkaninfo --summary 314# Skip python related tests with GG_BUILD_LOW_PERF=1 since Windows MSYS2 UCRT64 currently fails to create 315# a valid python environment for testing 316LLAMA_FATAL_WARNINGS=OFF GG_BUILD_NINJA=1 GG_BUILD_VULKAN=1 GG_BUILD_LOW_PERF=1 ./ci/run.sh ./results/llama.cpp ./mnt/llama.cpp 317 318gpu-openvino-low-perf : 319runs-on : [ self-hosted , Linux , Intel , OpenVINO ] 320 321env : 322# Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile 323OPENVINO_VERSION_MAJOR : "2026.3.1" 324OPENVINO_VERSION_FULL : "2026.3.1.22476.56d9685302d" 325 326steps : 327- name : Clone 328id : checkout 329uses : actions/checkout@v6 330 331- name : Setup OpenVINO Toolkit 332uses : ./.github/actions/linux-setup-openvino 333with : 334path : ./openvino_toolkit 335version_major : ${{ env.OPENVINO_VERSION_MAJOR }} 336version_full : ${{ env.OPENVINO_VERSION_FULL }} 337 338- name : Install OpenVINO dependencies 339run : | 340cd ./openvino_toolkit 341chmod +x ./install_dependencies/install_openvino_dependencies.sh 342echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh 343 344- name : Test 345id : ggml-ci 346run : | 347source ./openvino_toolkit/setupvars.sh 348GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 349 350cpu-x64-high-perf : 351runs-on : [ self-hosted , Linux , X64 ] 352 353steps : 354- name : Clone 355id : checkout 356uses : actions/checkout@v6 357 358- name : Test 359id : ggml-ci 360run : | 361LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 362 363cpu-arm64-high-perf-graviton4 : 364runs-on : ah-ubuntu_22_04-c8g_8x 365 366steps : 367- name : Clone 368id : checkout 369uses : actions/checkout@v6 370 371- name : Dependencies 372id : depends 373run : | 374set -euxo pipefail 375sudo apt-get update 376sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \ 377apt-get install -y \ 378build-essential \ 379python3-venv \ 380gpg \ 381wget \ 382time \ 383git-lfs 384 385git lfs install 386 387# install the latest cmake 388sudo install -d /usr/share/keyrings 389wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc \ 390| gpg --dearmor \ 391| sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null 392echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' \ 393| sudo tee /etc/apt/sources.list.d/kitware.list 394sudo apt-get update 395sudo apt-get install -y cmake 396 397- name : Test 398id : ggml-ci 399run : | 400LLAMA_ARG_THREADS=$(nproc) \ 401GG_BUILD_HIGH_PERF=1 \ 402GG_BUILD_NO_BF16=1 \ 403GG_BUILD_EXTRA_TESTS_0=1 \ 404bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp 405 406cpu-arm64-graviton4-kleidiai : 407runs-on : ah-ubuntu_22_04-c8g_8x 408 409steps : 410- name : Clone 411id : checkout 412uses : actions/checkout@v6 413 414- name : Dependencies 415id : depends 416run : | 417set -euxo pipefail 418sudo apt-get update 419sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \ 420apt-get install -y \ 421build-essential \ 422python3-venv \ 423gpg \ 424wget \ 425time \ 426git-lfs 427 428git lfs install 429 430# install the latest cmake 431sudo install -d /usr/share/keyrings 432wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc \ 433| gpg --dearmor \ 434| sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null 435echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' \ 436| sudo tee /etc/apt/sources.list.d/kitware.list 437sudo apt-get update 438sudo apt-get install -y cmake 439 440- name : Test 441id : ggml-ci 442run : | 443 LLAMA_ARG_THREADS=$(nproc) \ 444 GG_BUILD_KLEIDIAI=1 \ 445 GG_BUILD_EXTRA_TESTS_0=1 \ 446 GG_BUILD_HIGH_PERF=1 \ 447 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp