echodict/llama.cpp
version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786
0773
1name: Release2 3on:4 workflow_dispatch: # allows manual triggering5 inputs:6 create_release:7 description: 'Create new release'8 required: true9 type: boolean10 push:11 branches:12 - master13 paths: [14 '.github/workflows/release.yml',15 '**/CMakeLists.txt',16 '**/.cmake',17 '**/*.h',18 '**/*.hpp',19 '**/*.c',20 '**/*.cpp',21 '**/*.cu',22 '**/*.cuh',23 '**/*.swift',24 '**/*.m',25 '**/*.metal',26 '**/*.comp',27 '**/*.glsl'28 ]29 30concurrency:31 group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}32 cancel-in-progress: true33 34env:35 BRANCH_NAME: ${{ github.head_ref || github.ref_name }}36 CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON"37 38jobs:39 macOS-cpu:40 strategy:41 matrix:42 include:43 - build: 'arm64'44 arch: 'arm64'45 os: macos-1446 defines: "-DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON"47 - build: 'arm64-kleidiai'48 arch: 'arm64'49 os: macos-1450 defines: "-DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_CPU_KLEIDIAI=ON"51 - build: 'x64'52 arch: 'x64'53 os: macos-15-intel54 # Metal is disabled on x64 due to intermittent failures with Github runners not having a GPU:55 # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:231356 defines: "-DGGML_METAL=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3"57 58 runs-on: ${{ matrix.os }}59 60 steps:61 - name: Clone62 id: checkout63 uses: actions/checkout@v664 with:65 fetch-depth: 066 67 - name: ccache68 uses: ggml-org/ccache-action@v1.2.2169 with:70 key: macOS-latest-${{ matrix.arch }}71 evict-old-files: 1d72 73 - name: Build74 id: cmake_build75 run: |76 sysctl -a77 cmake -B build \78 ${{ matrix.defines }} \79 -DCMAKE_INSTALL_RPATH='@loader_path' \80 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \81 -DLLAMA_FATAL_WARNINGS=ON \82 -DLLAMA_BUILD_BORINGSSL=ON \83 ${{ env.CMAKE_ARGS }}84 cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)85 86 - name: Determine tag name87 id: tag88 uses: ./.github/actions/get-tag-name89 90 - name: Pack artifacts91 id: pack_artifacts92 run: |93 cp LICENSE ./build/bin/94 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }}.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .95 96 - name: Upload artifacts97 uses: actions/upload-artifact@v698 with:99 path: llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }}.tar.gz100 name: llama-bin-macos-${{ matrix.build }}.tar.gz101 102 ubuntu-cpu:103 strategy:104 matrix:105 include:106 - build: 'x64'107 os: ubuntu-22.04108 - build: 'arm64'109 os: ubuntu-24.04-arm110 - build: 's390x'111 os: ubuntu-24.04-s390x112 113 runs-on: ${{ matrix.os }}114 115 steps:116 - name: Clone117 id: checkout118 uses: actions/checkout@v6119 with:120 fetch-depth: 0121 122 - name: ccache123 if: ${{ matrix.build != 's390x' }}124 uses: ggml-org/ccache-action@v1.2.21125 with:126 key: ubuntu-cpu-${{ matrix.build }}127 evict-old-files: 1d128 129 - name: Dependencies130 id: depends131 run: |132 sudo apt-get update133 sudo apt-get install build-essential libssl-dev134 135 - name: Toolchain workaround (GCC 14)136 if: ${{ contains(matrix.os, 'ubuntu-24.04') }}137 run: |138 sudo apt-get install -y gcc-14 g++-14139 echo "CC=gcc-14" >> "$GITHUB_ENV"140 echo "CXX=g++-14" >> "$GITHUB_ENV"141 142 - name: Build143 id: cmake_build144 run: |145 cmake -B build \146 -DCMAKE_INSTALL_RPATH='$ORIGIN' \147 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \148 -DGGML_BACKEND_DL=ON \149 -DGGML_NATIVE=OFF \150 -DGGML_CPU_ALL_VARIANTS=ON \151 -DLLAMA_FATAL_WARNINGS=ON \152 ${{ env.CMAKE_ARGS }}153 cmake --build build --config Release -j $(nproc)154 155 - name: Determine tag name156 id: tag157 uses: ./.github/actions/get-tag-name158 159 - name: Pack artifacts160 id: pack_artifacts161 run: |162 cp LICENSE ./build/bin/163 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .164 165 - name: Upload artifacts166 uses: actions/upload-artifact@v6167 with:168 path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.tar.gz169 name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz170 171 ubuntu-vulkan:172 strategy:173 matrix:174 include:175 - build: 'x64'176 os: ubuntu-22.04177 - build: 'arm64'178 os: ubuntu-24.04-arm179 180 runs-on: ${{ matrix.os }}181 182 steps:183 - name: Clone184 id: checkout185 uses: actions/checkout@v6186 with:187 fetch-depth: 0188 189 - name: ccache190 uses: ggml-org/ccache-action@v1.2.21191 with:192 key: ubuntu-vulkan-${{ matrix.build }}193 evict-old-files: 1d194 195 - name: Dependencies196 id: depends197 run: |198 if [[ "${{ matrix.os }}" =~ "ubuntu-22.04" ]]; then199 wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -200 sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list201 sudo apt-get update -y202 sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk libssl-dev203 else204 sudo apt-get update -y205 sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev spirv-headers libssl-dev ninja-build206 echo "CC=gcc-14" >> "$GITHUB_ENV"207 echo "CXX=g++-14" >> "$GITHUB_ENV"208 fi209 210 - name: Build211 id: cmake_build212 run: |213 cmake -B build \214 -DCMAKE_INSTALL_RPATH='$ORIGIN' \215 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \216 -DGGML_BACKEND_DL=ON \217 -DGGML_NATIVE=OFF \218 -DGGML_CPU_ALL_VARIANTS=ON \219 -DGGML_VULKAN=ON \220 ${{ env.CMAKE_ARGS }}221 cmake --build build --config Release -j $(nproc)222 223 - name: Determine tag name224 id: tag225 uses: ./.github/actions/get-tag-name226 227 - name: Pack artifacts228 id: pack_artifacts229 run: |230 cp LICENSE ./build/bin/231 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .232 233 - name: Upload artifacts234 uses: actions/upload-artifact@v6235 with:236 path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz237 name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz238 239 android-arm64:240 runs-on: ubuntu-latest241 242 env:243 NDK_VERSION: "29.0.14206865"244 245 steps:246 - name: Clone247 id: checkout248 uses: actions/checkout@v6249 with:250 fetch-depth: 0251 252 - name: ccache253 uses: ggml-org/ccache-action@v1.2.21254 with:255 key: android-arm64256 evict-old-files: 1d257 258 - name: Set up JDK259 uses: actions/setup-java@v5260 with:261 java-version: 17262 distribution: temurin263 264 - name: Setup Android SDK265 uses: android-actions/setup-android@40fd30fb8d7440372e1316f5d1809ec01dcd3699 # v4.0.1266 with:267 log-accepted-android-sdk-licenses: false268 269 - name: Install NDK270 run: |271 sdkmanager "ndk;${{ env.NDK_VERSION }}"272 echo "ANDROID_NDK=${ANDROID_SDK_ROOT}/ndk/${{ env.NDK_VERSION }}" >> $GITHUB_ENV273 274 - name: Build275 id: cmake_build276 run: |277 cmake -B build \278 -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \279 -DANDROID_ABI=arm64-v8a \280 -DANDROID_PLATFORM=android-28 \281 -DCMAKE_INSTALL_RPATH='$ORIGIN' \282 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \283 -DGGML_BACKEND_DL=ON \284 -DGGML_NATIVE=OFF \285 -DGGML_CPU_ALL_VARIANTS=ON \286 -DLLAMA_FATAL_WARNINGS=ON \287 -DGGML_OPENMP=OFF \288 -DLLAMA_BUILD_BORINGSSL=ON \289 ${{ env.CMAKE_ARGS }}290 cmake --build build --config Release -j $(nproc)291 292 - name: Determine tag name293 id: tag294 uses: ./.github/actions/get-tag-name295 296 - name: Pack artifacts297 id: pack_artifacts298 run: |299 cp LICENSE ./build/bin/300 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-android-arm64.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .301 302 - name: Upload artifacts303 uses: actions/upload-artifact@v6304 with:305 path: llama-${{ steps.tag.outputs.name }}-bin-android-arm64.tar.gz306 name: llama-bin-android-arm64.tar.gz307 308 ubuntu-24-openvino:309 runs-on: ubuntu-24.04310 311 outputs:312 openvino_version: ${{ steps.openvino_version.outputs.value }}313 314 env:315 # Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile316 OPENVINO_VERSION_MAJOR: "2026.0"317 OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886"318 319 steps:320 - name: Set OpenVINO version output321 id: openvino_version322 run: echo "value=${{ env.OPENVINO_VERSION_MAJOR }}" >> $GITHUB_OUTPUT323 324 - name: Clone325 id: checkout326 uses: actions/checkout@v6327 with:328 fetch-depth: 0329 330 - name: ccache331 uses: ggml-org/ccache-action@v1.2.21332 with:333 key: ubuntu-24-openvino-release-no-preset-v1334 evict-old-files: 1d335 336 - name: Dependencies337 run: |338 sudo apt-get update339 sudo apt-get install -y build-essential libssl-dev libtbb12 cmake ninja-build python3-pip340 sudo apt install ocl-icd-opencl-dev opencl-headers opencl-clhpp-headers intel-opencl-icd341 342 - name: Use OpenVINO Toolkit Cache343 uses: actions/cache@v5344 id: cache-openvino345 with:346 path: ./openvino_toolkit347 key: openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}348 349 - name: Setup OpenVINO Toolkit350 if: steps.cache-openvino.outputs.cache-hit != 'true'351 uses: ./.github/actions/linux-setup-openvino352 with:353 path: ./openvino_toolkit354 version_major: ${{ env.OPENVINO_VERSION_MAJOR }}355 version_full: ${{ env.OPENVINO_VERSION_FULL }}356 357 - name: Install OpenVINO dependencies358 run: |359 cd ./openvino_toolkit360 chmod +x ./install_dependencies/install_openvino_dependencies.sh361 echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh362 363 - name: Build364 id: cmake_build365 run: |366 source ./openvino_toolkit/setupvars.sh367 cmake -B build/ReleaseOV -G Ninja \368 -DCMAKE_BUILD_TYPE=Release \369 -DGGML_OPENVINO=ON370 cmake --build build/ReleaseOV --config Release -j $(nproc)371 372 - name: Determine tag name373 id: tag374 uses: ./.github/actions/get-tag-name375 376 - name: Pack artifacts377 id: pack_artifacts378 run: |379 cp LICENSE ./build/ReleaseOV/bin/380 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/ReleaseOV/bin .381 382 - name: Upload artifacts383 uses: actions/upload-artifact@v6384 with:385 path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz386 name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz387 388 windows-cpu:389 runs-on: windows-2025390 391 strategy:392 matrix:393 include:394 - arch: 'x64'395 - arch: 'arm64'396 397 steps:398 - name: Clone399 uses: actions/checkout@v6400 with:401 fetch-depth: 0402 403 - name: ccache404 uses: ggml-org/ccache-action@v1.2.21405 with:406 key: windows-latest-cpu-${{ matrix.arch }}407 variant: ccache408 evict-old-files: 1d409 410 - name: Install Ninja411 run: |412 choco install ninja413 414 - name: Build415 shell: cmd416 run: |417 call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }}418 cmake -S . -B build -G "Ninja Multi-Config" ^419 -D CMAKE_TOOLCHAIN_FILE=cmake/${{ matrix.arch }}-windows-llvm.cmake ^420 -DLLAMA_BUILD_BORINGSSL=ON ^421 -DGGML_NATIVE=OFF ^422 -DGGML_BACKEND_DL=ON ^423 -DGGML_CPU_ALL_VARIANTS=${{ matrix.arch == 'x64' && 'ON' || 'OFF' }} ^424 -DGGML_OPENMP=ON ^425 ${{ env.CMAKE_ARGS }}426 cmake --build build --config Release427 428 - name: Pack artifacts429 id: pack_artifacts430 run: |431 Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.44.35112\debug_nonredist\${{ matrix.arch }}\Microsoft.VC143.OpenMP.LLVM\libomp140.${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}.dll" .\build\bin\Release\432 7z a -snl llama-bin-win-cpu-${{ matrix.arch }}.zip .\build\bin\Release\*433 434 - name: Upload artifacts435 uses: actions/upload-artifact@v6436 with:437 path: llama-bin-win-cpu-${{ matrix.arch }}.zip438 name: llama-bin-win-cpu-${{ matrix.arch }}.zip439 440 windows:441 runs-on: windows-2025442 443 env:444 OPENBLAS_VERSION: 0.3.23445 VULKAN_VERSION: 1.4.313.2446 447 strategy:448 matrix:449 include:450 - backend: 'vulkan'451 arch: 'x64'452 defines: '-DGGML_VULKAN=ON'453 target: 'ggml-vulkan'454 - backend: 'opencl-adreno'455 arch: 'arm64'456 defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON'457 target: 'ggml-opencl'458 459 steps:460 - name: Clone461 id: checkout462 uses: actions/checkout@v6463 464 - name: ccache465 uses: ggml-org/ccache-action@v1.2.21466 with:467 key: windows-latest-${{ matrix.backend }}-${{ matrix.arch }}468 variant: ccache469 evict-old-files: 1d470 471 - name: Install Vulkan SDK472 id: get_vulkan473 if: ${{ matrix.backend == 'vulkan' }}474 run: |475 curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"476 & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install477 Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"478 Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"479 480 - name: Install Ninja481 id: install_ninja482 run: |483 choco install ninja484 485 - name: Install OpenCL Headers and Libs486 id: install_opencl487 if: ${{ matrix.backend == 'opencl-adreno' && matrix.arch == 'arm64' }}488 run: |489 git clone https://github.com/KhronosGroup/OpenCL-Headers490 cd OpenCL-Headers491 cmake -B build `492 -DBUILD_TESTING=OFF `493 -DOPENCL_HEADERS_BUILD_TESTING=OFF `494 -DOPENCL_HEADERS_BUILD_CXX_TESTS=OFF `495 -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"496 cmake --build build --target install497 git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader498 cd OpenCL-ICD-Loader499 cmake -B build-arm64-release `500 -A arm64 `501 -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" `502 -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"503 cmake --build build-arm64-release --target install --config release504 505 - name: Build506 id: cmake_build507 run: |508 cmake -S . -B build ${{ matrix.defines }} -DGGML_NATIVE=OFF -DGGML_CPU=OFF -DGGML_BACKEND_DL=ON -DLLAMA_BUILD_BORINGSSL=ON509 cmake --build build --config Release --target ${{ matrix.target }}510 511 - name: Pack artifacts512 id: pack_artifacts513 run: |514 7z a -snl llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip .\build\bin\Release\${{ matrix.target }}.dll515 516 - name: Upload artifacts517 uses: actions/upload-artifact@v6518 with:519 path: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip520 name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip521 522 windows-cuda:523 runs-on: windows-2022524 525 strategy:526 matrix:527 cuda: ['12.4', '13.1']528 529 steps:530 - name: Clone531 id: checkout532 uses: actions/checkout@v6533 534 - name: Install ccache535 uses: ggml-org/ccache-action@v1.2.21536 with:537 key: windows-cuda-${{ matrix.cuda }}538 variant: ccache539 evict-old-files: 1d540 541 - name: Install Cuda Toolkit542 uses: ./.github/actions/windows-setup-cuda543 with:544 cuda_version: ${{ matrix.cuda }}545 546 - name: Install Ninja547 id: install_ninja548 run: |549 choco install ninja550 551 - name: Build552 id: cmake_build553 shell: cmd554 # TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project555 run: |556 call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64557 cmake -S . -B build -G "Ninja Multi-Config" ^558 -DGGML_BACKEND_DL=ON ^559 -DGGML_NATIVE=OFF ^560 -DGGML_CPU=OFF ^561 -DGGML_CUDA=ON ^562 -DLLAMA_BUILD_BORINGSSL=ON ^563 -DGGML_CUDA_CUB_3DOT2=ON564 set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1565 cmake --build build --config Release -j %NINJA_JOBS% --target ggml-cuda566 567 - name: Pack artifacts568 id: pack_artifacts569 run: |570 7z a -snl llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip .\build\bin\Release\ggml-cuda.dll571 572 - name: Upload artifacts573 uses: actions/upload-artifact@v6574 with:575 path: llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip576 name: llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip577 578 - name: Copy and pack Cuda runtime579 run: |580 echo "Cuda install location: ${{ env.CUDA_PATH }}"581 $dst='.\build\bin\cudart\'582 robocopy "${{env.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll583 robocopy "${{env.CUDA_PATH}}\lib" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll584 robocopy "${{env.CUDA_PATH}}\bin\x64" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll585 7z a cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip $dst\*586 587 - name: Upload Cuda runtime588 uses: actions/upload-artifact@v6589 with:590 path: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip591 name: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip592 593 windows-sycl:594 runs-on: windows-2022595 596 defaults:597 run:598 shell: bash599 600 env:601 WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/24751ead-ddc5-4479-b9e6-f9fe2ff8b9f2/intel-deep-learning-essentials-2025.2.1.25_offline.exe602 WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel603 ONEAPI_ROOT: "C:/Program Files (x86)/Intel/oneAPI"604 605 steps:606 - name: Clone607 id: checkout608 uses: actions/checkout@v6609 610 - name: ccache611 uses: ggml-org/ccache-action@v1.2.21612 with:613 key: windows-latest-sycl614 variant: ccache615 evict-old-files: 1d616 617 - name: Install618 run: |619 scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL620 621 - name: Build622 id: cmake_build623 shell: cmd624 run: |625 call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force626 cmake -G "Ninja" -B build ^627 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=icx ^628 -DCMAKE_BUILD_TYPE=Release ^629 -DGGML_BACKEND_DL=ON -DBUILD_SHARED_LIBS=ON ^630 -DGGML_CPU=OFF -DGGML_SYCL=ON ^631 -DLLAMA_BUILD_BORINGSSL=ON632 cmake --build build --target ggml-sycl -j633 634 - name: Build the release package635 id: pack_artifacts636 run: |637 echo "cp oneAPI running time dll files in ${{ env.ONEAPI_ROOT }} to ./build/bin"638 639 cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_sycl_blas.5.dll" ./build/bin640 cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_core.2.dll" ./build/bin641 cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_tbb_thread.2.dll" ./build/bin642 643 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero.dll" ./build/bin644 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero_v2.dll" ./build/bin645 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_opencl.dll" ./build/bin646 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_loader.dll" ./build/bin647 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_win_proxy_loader.dll" ./build/bin648 649 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl8.dll" ./build/bin650 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/svml_dispmd.dll" ./build/bin651 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libmmd.dll" ./build/bin652 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libiomp5md.dll" ./build/bin653 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl-ls.exe" ./build/bin654 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libsycl-fallback-bfloat16.spv" ./build/bin655 cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libsycl-native-bfloat16.spv" ./build/bin656 657 cp "${{ env.ONEAPI_ROOT }}/dnnl/latest/bin/dnnl.dll" ./build/bin658 cp "${{ env.ONEAPI_ROOT }}/tbb/latest/bin/tbb12.dll" ./build/bin659 660 cp "${{ env.ONEAPI_ROOT }}/tcm/latest/bin/tcm.dll" ./build/bin661 cp "${{ env.ONEAPI_ROOT }}/tcm/latest/bin/libhwloc-15.dll" ./build/bin662 cp "${{ env.ONEAPI_ROOT }}/umf/latest/bin/umf.dll" ./build/bin663 664 echo "cp oneAPI running time dll files to ./build/bin done"665 7z a -snl llama-bin-win-sycl-x64.zip ./build/bin/*666 667 - name: Upload the release package668 uses: actions/upload-artifact@v6669 with:670 path: llama-bin-win-sycl-x64.zip671 name: llama-bin-win-sycl-x64.zip672 673 ubuntu-22-rocm:674 runs-on: ubuntu-22.04675 676 strategy:677 matrix:678 include:679 - ROCM_VERSION: "7.2.1"680 gpu_targets: "gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1151;gfx1150;gfx1200;gfx1201"681 build: 'x64'682 683 steps:684 - name: Clone685 id: checkout686 uses: actions/checkout@v6687 with:688 fetch-depth: 0689 690 - name: Free up disk space691 uses: ggml-org/free-disk-space@v1.3.1692 with:693 tool-cache: true694 695 - name: ccache696 uses: ggml-org/ccache-action@v1.2.21697 with:698 key: ubuntu-rocm-${{ matrix.ROCM_VERSION }}-${{ matrix.build }}699 evict-old-files: 1d700 701 - name: Dependencies702 id: depends703 run: |704 sudo apt install -y build-essential git cmake wget705 706 - name: Setup Legacy ROCm707 if: matrix.ROCM_VERSION == '7.2.1'708 id: legacy_env709 run: |710 sudo mkdir --parents --mode=0755 /etc/apt/keyrings711 wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \712 gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null713 714 sudo tee /etc/apt/sources.list.d/rocm.list << EOF715 deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${{ matrix.ROCM_VERSION }} jammy main716 EOF717 718 sudo tee /etc/apt/preferences.d/rocm-pin-600 << EOF719 Package: *720 Pin: release o=repo.radeon.com721 Pin-Priority: 600722 EOF723 724 sudo apt update725 sudo apt-get install -y libssl-dev rocm-hip-sdk726 727 - name: Setup TheRock728 if: matrix.ROCM_VERSION != '7.2.1'729 id: therock_env730 run: |731 wget https://repo.amd.com/rocm/tarball/therock-dist-linux-gfx1151-${{ matrix.ROCM_VERSION }}.tar.gz732 mkdir install733 tar -xf *.tar.gz -C install734 export ROCM_PATH=$(pwd)/install735 echo ROCM_PATH=$ROCM_PATH >> $GITHUB_ENV736 echo PATH=$PATH:$ROCM_PATH/bin >> $GITHUB_ENV737 echo LD_LIBRARY_PATH=$ROCM_PATH/lib:$ROCM_PATH/llvm/lib:$ROCM_PATH/lib/rocprofiler-systems >> $GITHUB_ENV738 739 - name: Build with native CMake HIP support740 id: cmake_build741 run: |742 cmake -B build -S . \743 -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \744 -DCMAKE_BUILD_TYPE=Release \745 -DGGML_BACKEND_DL=ON \746 -DGGML_NATIVE=OFF \747 -DCMAKE_INSTALL_RPATH='$ORIGIN' \748 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \749 -DGGML_CPU_ALL_VARIANTS=ON \750 -DGPU_TARGETS="${{ matrix.gpu_targets }}" \751 -DGGML_HIP=ON \752 -DHIP_PLATFORM=amd \753 -DGGML_HIP_ROCWMMA_FATTN=ON \754 ${{ env.CMAKE_ARGS }}755 cmake --build build --config Release -j $(nproc)756 757 - name: Determine tag name758 id: tag759 uses: ./.github/actions/get-tag-name760 761 - name: Get ROCm short version762 run: echo "ROCM_VERSION_SHORT=$(echo '${{ matrix.ROCM_VERSION }}' | cut -d '.' -f 1,2)" >> $GITHUB_ENV763 764 - name: Pack artifacts765 id: pack_artifacts766 run: |767 cp LICENSE ./build/bin/768 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .769 770 - name: Upload artifacts771 uses: actions/upload-artifact@v6772 with:773 path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz774 name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz775 776 windows-hip:777 runs-on: windows-2022778 779 env:780 HIPSDK_INSTALLER_VERSION: "26.Q1"781 782 strategy:783 matrix:784 include:785 - name: "radeon"786 gpu_targets: "gfx1150;gfx1151;gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"787 788 steps:789 - name: Clone790 id: checkout791 uses: actions/checkout@v6792 793 - name: Grab rocWMMA package794 id: grab_rocwmma795 run: |796 curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/7.2.1/pool/main/r/rocwmma-dev/rocwmma-dev_2.2.0.70201-81~24.04_amd64.deb"797 7z x rocwmma.deb798 7z x data.tar799 800 - name: Cache ROCm Installation801 id: cache-rocm802 uses: actions/cache@v5803 with:804 path: C:\Program Files\AMD\ROCm805 key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}806 807 - name: ccache808 uses: ggml-org/ccache-action@v1.2.21809 with:810 key: windows-latest-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}-x64811 evict-old-files: 1d812 813 - name: Install ROCm814 if: steps.cache-rocm.outputs.cache-hit != 'true'815 id: depends816 run: |817 $ErrorActionPreference = "Stop"818 write-host "Downloading AMD HIP SDK Installer"819 Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win11-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"820 write-host "Installing AMD HIP SDK"821 $proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -PassThru822 $completed = $proc.WaitForExit(600000)823 if (-not $completed) {824 Write-Error "ROCm installation timed out after 10 minutes. Killing the process"825 $proc.Kill()826 exit 1827 }828 if ($proc.ExitCode -ne 0) {829 Write-Error "ROCm installation failed with exit code $($proc.ExitCode)"830 exit 1831 }832 write-host "Completed AMD HIP SDK installation"833 834 - name: Verify ROCm835 id: verify836 run: |837 # Find and test ROCm installation838 $clangPath = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | Select-Object -First 1839 if (-not $clangPath) {840 Write-Error "ROCm installation not found"841 exit 1842 }843 & $clangPath.FullName --version844 845 - name: Build846 id: cmake_build847 run: |848 $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)849 $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"850 cmake -G "Unix Makefiles" -B build -S . `851 -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `852 -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `853 -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-7.2.1/include/ -Wno-ignored-attributes -Wno-nested-anon-types" `854 -DCMAKE_BUILD_TYPE=Release `855 -DGGML_BACKEND_DL=ON `856 -DGGML_NATIVE=OFF `857 -DGGML_CPU=OFF `858 -DGPU_TARGETS="${{ matrix.gpu_targets }}" `859 -DGGML_HIP_ROCWMMA_FATTN=ON `860 -DGGML_HIP=ON `861 -DLLAMA_BUILD_BORINGSSL=ON862 cmake --build build --target ggml-hip -j ${env:NUMBER_OF_PROCESSORS}863 md "build\bin\rocblas\library\"864 md "build\bin\hipblaslt\library"865 cp "${env:HIP_PATH}\bin\libhipblas.dll" "build\bin\"866 cp "${env:HIP_PATH}\bin\libhipblaslt.dll" "build\bin\"867 cp "${env:HIP_PATH}\bin\rocblas.dll" "build\bin\"868 cp "${env:HIP_PATH}\bin\rocblas\library\*" "build\bin\rocblas\library\"869 cp "${env:HIP_PATH}\bin\hipblaslt\library\*" "build\bin\hipblaslt\library\"870 871 - name: Pack artifacts872 id: pack_artifacts873 run: |874 7z a -snl llama-bin-win-hip-${{ matrix.name }}-x64.zip .\build\bin\*875 876 - name: Upload artifacts877 uses: actions/upload-artifact@v6878 with:879 path: llama-bin-win-hip-${{ matrix.name }}-x64.zip880 name: llama-bin-win-hip-${{ matrix.name }}-x64.zip881 882 ios-xcode-build:883 runs-on: macos-15884 885 steps:886 - name: Checkout code887 uses: actions/checkout@v6888 with:889 fetch-depth: 0890 891 - name: Setup Xcode892 run: |893 sudo xcode-select -s /Applications/Xcode_16.4.app894 895 - name: Build896 id: cmake_build897 run: |898 sysctl -a899 cmake -B build -G Xcode \900 -DGGML_METAL_USE_BF16=ON \901 -DGGML_METAL_EMBED_LIBRARY=ON \902 -DLLAMA_OPENSSL=OFF \903 -DLLAMA_BUILD_EXAMPLES=OFF \904 -DLLAMA_BUILD_TOOLS=OFF \905 -DLLAMA_BUILD_TESTS=OFF \906 -DLLAMA_BUILD_SERVER=OFF \907 -DCMAKE_SYSTEM_NAME=iOS \908 -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \909 -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml910 cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO911 912 - name: xcodebuild for swift package913 id: xcodebuild914 run: |915 ./build-xcframework.sh916 917 - name: Build Xcode project918 run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build919 920 - name: Determine tag name921 id: tag922 uses: ./.github/actions/get-tag-name923 924 - name: Pack artifacts925 id: pack_artifacts926 run: |927 # Zip file is required for Swift Package Manager, which does not support tar.gz for binary targets.928 # For more details, see https://developer.apple.com/documentation/xcode/distributing-binary-frameworks-as-swift-packages929 zip -r -y llama-${{ steps.tag.outputs.name }}-xcframework.zip build-apple/llama.xcframework930 931 - name: Upload artifacts932 uses: actions/upload-artifact@v6933 with:934 path: llama-${{ steps.tag.outputs.name }}-xcframework.zip935 name: llama-${{ steps.tag.outputs.name }}-xcframework.zip936 937 938 openEuler-cann:939 strategy:940 matrix:941 include:942 # 910b with aclgraph (both architectures)943 - arch: x86944 chip_type: '910b'945 build: 'Release'946 use_acl_graph: 'on'947 - arch: aarch64948 chip_type: '910b'949 build: 'Release'950 use_acl_graph: 'on'951 # 310p without aclgraph (both architectures)952 - arch: x86953 chip_type: '310p'954 build: 'Release'955 use_acl_graph: 'off'956 - arch: aarch64957 chip_type: '310p'958 build: 'Release'959 use_acl_graph: 'off'960 runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}961 steps:962 - name: Checkout963 uses: actions/checkout@v6964 with:965 fetch-depth: 0966 967 - name: Free up disk space968 uses: ggml-org/free-disk-space@v1.3.1969 with:970 tool-cache: true971 972 - name: Set container image973 id: cann-image974 run: |975 image="ascendai/cann:${{ matrix.chip_type == '910b' && '8.5.0-910b-openeuler24.03-py3.11' || '8.5.0-310p-openeuler24.03-py3.11' }}"976 echo "image=${image}" >> "${GITHUB_OUTPUT}"977 978 - name: Pull container image979 run: docker pull "${{ steps.cann-image.outputs.image }}"980 981 - name: Build982 env:983 BUILD_TYPE: ${{ matrix.build }}984 SOC_TYPE: ascend${{ matrix.chip_type }}985 USE_ACL_GRAPH: ${{ matrix.use_acl_graph }}986 run: |987 HOST_UID=$(id -u)988 HOST_GID=$(id -g)989 990 docker run --rm \991 -v "${PWD}:/workspace" \992 -w /workspace \993 -e SOC_TYPE=${SOC_TYPE} \994 -e BUILD_TYPE=${BUILD_TYPE} \995 -e USE_ACL_GRAPH=${USE_ACL_GRAPH} \996 "${{ steps.cann-image.outputs.image }}" \997 bash -lc '998 set -e999 yum install -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs git gcc gcc-c++ make cmake openssl-devel1000 yum clean all && rm -rf /var/cache/yum1001 git config --global --add safe.directory "/workspace"1002 export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}1003 cmake -S . -B build \1004 -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \1005 -DGGML_CANN=on \1006 -DSOC_TYPE=${SOC_TYPE} \1007 -DUSE_ACL_GRAPH=${USE_ACL_GRAPH}1008 cmake --build build -j $(nproc)1009 1010 chown -R '"${HOST_UID}"':'"${HOST_GID}"' /workspace/build1011 '1012 1013 - name: Determine tag name1014 id: tag1015 uses: ./.github/actions/get-tag-name1016 1017 - name: Pack artifacts1018 run: |1019 cp LICENSE ./build/bin/1020 tar -czvf llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .1021 1022 - name: Upload artifacts1023 uses: actions/upload-artifact@v61024 with:1025 path: llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz1026 name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz1027 1028 release:1029 if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}1030 1031 # Fine-grant permission1032 # https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token1033 permissions:1034 contents: write # for creating release1035 1036 runs-on: ubuntu-slim1037 1038 needs:1039 - windows1040 - windows-cpu1041 - windows-cuda1042 - windows-sycl1043 - windows-hip1044 - ubuntu-22-rocm1045 - ubuntu-cpu1046 - ubuntu-vulkan1047 - ubuntu-24-openvino1048 - android-arm641049 - macOS-cpu1050 - ios-xcode-build1051 - openEuler-cann1052 1053 steps:1054 - name: Clone1055 id: checkout1056 uses: actions/checkout@v61057 with:1058 fetch-depth: 01059 1060 - name: Determine tag name1061 id: tag1062 uses: ./.github/actions/get-tag-name1063 1064 - name: Download artifacts1065 id: download-artifact1066 uses: actions/download-artifact@v71067 with:1068 path: ./artifact1069 merge-multiple: true1070 1071 - name: Move artifacts1072 id: move_artifacts1073 run: |1074 mkdir -p release1075 1076 echo "Adding CPU backend files to existing zips..."1077 for arch in x64 arm64; do1078 cpu_zip="artifact/llama-bin-win-cpu-${arch}.zip"1079 temp_dir=$(mktemp -d)1080 echo "Extracting CPU backend for $arch..."1081 unzip "$cpu_zip" -d "$temp_dir"1082 1083 echo "Adding CPU files to $arch zips..."1084 for target_zip in artifact/llama-bin-win-*-${arch}.zip; do1085 if [[ "$target_zip" == "$cpu_zip" ]]; then1086 continue1087 fi1088 echo "Adding CPU backend to $(basename "$target_zip")"1089 realpath_target_zip=$(realpath "$target_zip")1090 (cd "$temp_dir" && zip -r "$realpath_target_zip" .)1091 done1092 1093 rm -rf "$temp_dir"1094 done1095 1096 echo "Renaming and moving zips to release..."1097 for zip_file in artifact/llama-bin-win-*.zip; do1098 base_name=$(basename "$zip_file" .zip)1099 zip_name="llama-${{ steps.tag.outputs.name }}-${base_name#llama-}.zip"1100 echo "Moving $zip_file to release/$zip_name"1101 mv "$zip_file" "release/$zip_name"1102 done1103 1104 echo "Moving other artifacts..."1105 mv -v artifact/*.zip release1106 mv -v artifact/*.tar.gz release1107 1108 - name: Create release1109 id: create_release1110 uses: ggml-org/action-create-release@v11111 env:1112 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}1113 with:1114 tag_name: ${{ steps.tag.outputs.name }}1115 body: |1116 <details open>1117 1118 ${{ github.event.head_commit.message }}1119 1120 </details>1121 1122 **macOS/iOS:**1123 - [macOS Apple Silicon (arm64)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz)1124 - [macOS Apple Silicon (arm64, KleidiAI enabled)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64-kleidiai.tar.gz)1125 - [macOS Intel (x64)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz)1126 - [iOS XCFramework](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-xcframework.zip)1127 1128 **Linux:**1129 - [Ubuntu x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.tar.gz)1130 - [Ubuntu arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-arm64.tar.gz)1131 - [Ubuntu s390x (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-s390x.tar.gz)1132 - [Ubuntu x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.tar.gz)1133 - [Ubuntu arm64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-arm64.tar.gz)1134 - [Ubuntu x64 (ROCm 7.2)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-rocm-7.2-x64.tar.gz)1135 - [Ubuntu x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ needs.ubuntu-24-openvino.outputs.openvino_version }}-x64.tar.gz)1136 1137 **Android:**1138 - [Android arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-android-arm64.tar.gz)1139 1140 **Windows:**1141 - [Windows x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cpu-x64.zip)1142 - [Windows arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cpu-arm64.zip)1143 - [Windows x64 (CUDA 12)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cuda-12.4-x64.zip) - [CUDA 12.4 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/cudart-llama-bin-win-cuda-12.4-x64.zip)1144 - [Windows x64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cuda-13.1-x64.zip) - [CUDA 13.1 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/cudart-llama-bin-win-cuda-13.1-x64.zip)1145 - [Windows x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-vulkan-x64.zip)1146 - [Windows x64 (SYCL)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip)1147 - [Windows x64 (HIP)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-hip-radeon-x64.zip)1148 1149 **openEuler:**1150 - [openEuler x86 (310p)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-310p-openEuler-x86.tar.gz)1151 - [openEuler x86 (910b, ACL Graph)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-910b-openEuler-x86-aclgraph.tar.gz)1152 - [openEuler aarch64 (310p)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-310p-openEuler-aarch64.tar.gz)1153 - [openEuler aarch64 (910b, ACL Graph)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-910b-openEuler-aarch64-aclgraph.tar.gz)1154 1155 - name: Upload release1156 id: upload_release1157 uses: actions/github-script@v81158 with:1159 github-token: ${{secrets.GITHUB_TOKEN}}1160 script: |1161 const path = require('path');1162 const fs = require('fs');1163 const release_id = '${{ steps.create_release.outputs.id }}';1164 for (let file of await fs.readdirSync('./release')) {1165 if (path.extname(file) === '.zip' || file.endsWith('.tar.gz')) {1166 console.log('uploadReleaseAsset', file);1167 await github.rest.repos.uploadReleaseAsset({1168 owner: context.repo.owner,1169 repo: context.repo.repo,1170 release_id: release_id,1171 name: file,1172 data: await fs.readFileSync(`./release/${file}`)1173 });1174 }1175 }1176 