char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
b78a39a2f
char/aliceai-t5-moe
1name : CI (vulkan) 2 3on : 4workflow_dispatch : # allows manual triggering 5push : 6branches : 7- master 8paths : [ 9'.github/workflows/build-vulkan.yml' , 10'**/CMakeLists.txt' , 11'**/.cmake' , 12'**/*.h' , 13'**/*.hpp' , 14'**/*.c' , 15'**/*.cpp' , 16'**/*.comp' , 17'**/*.glsl' 18] 19 20pull_request : 21types : [ opened , synchronize , reopened ] 22paths : [ 23'.github/workflows/build-vulkan.yml' , 24'ggml/src/ggml-vulkan/**' 25] 26 27concurrency : 28group : ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} 29cancel-in-progress : true 30 31env : 32GGML_NLOOP : 3 33GGML_N_THREADS : 1 34LLAMA_ARG_LOG_COLORS : 1 35LLAMA_ARG_LOG_PREFIX : 1 36LLAMA_ARG_LOG_TIMESTAMPS : 1 37 38jobs : 39ubuntu-arm64 : 40runs-on : ubuntu-24.04-arm 41 42steps : 43- name : Clone 44id : checkout 45uses : actions/checkout@v6 46 47- name : Dependencies 48id : depends 49run : | 50sudo apt-get update 51sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev spirv-headers libssl-dev ninja-build 52echo "CC=gcc-14" >> "$GITHUB_ENV" 53echo "CXX=g++-14" >> "$GITHUB_ENV" 54 55- name : ccache 56uses : ggml-org/ccache-action@v1.2.24 57with : 58key : vulkan-ubuntu-24.04-arm 59variant : ccache 60save : false 61 62- name : ccache-buckets-restore 63uses : ./.github/actions/ccache-buckets 64env : 65HF_TOKEN : ${{ secrets.HF_TOKEN_CI }} 66with : 67key : vulkan-ubuntu-24.04-arm 68folder : llama.cpp 69hf_bucket : ggml-org/cache 70 71- name : Configure 72id : cmake_configure 73run : | 74cmake -B build \ 75-G "Ninja" \ 76-DCMAKE_BUILD_TYPE=Release \ 77-DGGML_VULKAN=ON 78 79- name : Build 80id : cmake_build 81run : | 82time cmake --build build -j $(nproc) 83 84- name : ccache-buckets-save 85if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 86uses : ./.github/actions/ccache-buckets 87env : 88HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }} 89with : 90key : vulkan-ubuntu-24.04-arm 91folder : llama.cpp 92evict-old-files : 1d 93hf_bucket : ggml-org/cache 94save : true 95 96ubuntu-llvmpipe : 97runs-on : ubuntu-24.04 98 99steps : 100- name : Clone 101id : checkout 102uses : actions/checkout@v6 103 104- name : Dependencies 105id : depends 106run : | 107sudo add-apt-repository -y ppa:kisak/kisak-mesa 108sudo apt-get update -y 109sudo apt-get install -y build-essential mesa-vulkan-drivers libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libssl-dev 110 111- name : Get latest Vulkan SDK version 112id : vulkan_sdk_version 113run : | 114echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV" 115 116- name : Setup Vulkan SDK 117id : setup 118uses : ./.github/actions/unarchive-tar 119with : 120url : https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/linux/vulkan_sdk.tar.xz 121path : ./vulkan_sdk 122strip : 1 123 124- name : ccache 125uses : ggml-org/ccache-action@v1.2.24 126with : 127key : vulkan-ubuntu-24.04-llvmpipe 128save : false 129 130- name : ccache-buckets-restore 131uses : ./.github/actions/ccache-buckets 132env : 133HF_TOKEN : ${{ secrets.HF_TOKEN_CI }} 134with : 135key : vulkan-ubuntu-24.04-llvmpipe 136folder : llama.cpp 137hf_bucket : ggml-org/cache 138 139- name : Build 140id : cmake_build 141run : | 142source ./vulkan_sdk/setup-env.sh 143cmake -B build \ 144-DGGML_NATIVE=OFF \ 145-DGGML_VULKAN=ON 146cmake --build build --config Release -j $(nproc) 147 148- name : ccache-buckets-save 149if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 150uses : ./.github/actions/ccache-buckets 151env : 152HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }} 153with : 154key : vulkan-ubuntu-24.04-llvmpipe 155folder : llama.cpp 156evict-old-files : 1d 157hf_bucket : ggml-org/cache 158save : true 159 160- name : Test 161id : cmake_test 162run : | 163cd build 164export GGML_VK_VISIBLE_DEVICES=0 165export GGML_VK_DISABLE_F16=1 166export GGML_VK_DISABLE_COOPMAT=1 167ctest -L main --verbose --timeout 900 168 169windows : 170runs-on : windows-2025 171 172env : 173VULKAN_VERSION : 1.4.357.0 174 175steps : 176- name : Clone 177id : checkout 178uses : actions/checkout@v6 179 180- name : ccache 181uses : ggml-org/ccache-action@v1.2.24 182with : 183key : cpu-windows-2025-x64-vulkan 184variant : ccache 185evict-old-files : 1d 186save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 187 188- name : Install Vulkan SDK 189id : get_vulkan 190run : | 191curl.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" 192& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install 193Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}" 194Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin" 195 196- name : Install Ninja 197id : install_ninja 198run : | 199choco install ninja 200 201- name : Build 202id : cmake_build 203run : | 204cmake -S . -B build -G "Ninja Multi-Config" ` 205-D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake ` 206-DCMAKE_BUILD_TYPE=Release ` 207-DGGML_NATIVE=OFF ` 208-DLLAMA_BUILD_SERVER=ON ` 209-DGGML_RPC=ON ` 210-DGGML_BACKEND_DL=ON ` 211-DGGML_CPU_ALL_VARIANTS=ON ` 212-DGGML_VULKAN=ON ` 213-DLLAMA_BUILD_BORINGSSL=ON 214cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS} 215 216- name : Test 217id : cmake_test 218run : | 219cd build 220ctest -L main -C Release --verbose --timeout 900 221 222- name : ccache-clear 223uses : ./.github/actions/ccache-clear 224env : 225GH_TOKEN : ${{ github.token }} 226with : 227key : cpu-windows-2025-x64-vulkan 228older : 5m 229min : 1 230dry-run : ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}