char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
8b4b3558f
char/aliceai-t5-moe
1name : CI (sycl) 2 3on : 4workflow_dispatch : # allows manual triggering 5push : 6branches : 7- master 8paths : [ 9'.github/workflows/build-sycl.yml' , 10'**/CMakeLists.txt' , 11'**/.cmake' , 12'**/*.h' , 13'**/*.hpp' , 14'**/*.c' , 15'**/*.cpp' 16] 17 18pull_request : 19types : [ opened , synchronize , reopened ] 20paths : [ 21'.github/workflows/build-sycl.yml' , 22'ggml/src/ggml-sycl/**' 23] 24 25concurrency : 26group : ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} 27cancel-in-progress : true 28 29env : 30GGML_NLOOP : 3 31GGML_N_THREADS : 1 32LLAMA_ARG_LOG_COLORS : 1 33LLAMA_ARG_LOG_PREFIX : 1 34LLAMA_ARG_LOG_TIMESTAMPS : 1 35 36jobs : 37ubuntu-24-sycl : 38strategy : 39matrix : 40build : [ fp32 , fp16 ] 41include : 42- build : fp32 43fp16 : OFF 44- build : fp16 45fp16 : ON 46 47runs-on : ubuntu-24.04 48 49env : 50ONEAPI_ROOT : /opt/intel/oneapi/ 51ONEAPI_INSTALLER_VERSION : "2025.3.3" 52LEVEL_ZERO_VERSION : "1.28.2" 53LEVEL_ZERO_UBUNTU_VERSION : "u24.04" 54 55continue-on-error : true 56 57steps : 58- name : Clone 59id : checkout 60uses : actions/checkout@v6 61 62- name : Download & Install oneAPI 63shell : bash 64run : | 65cd /tmp 66wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56f7923a-adb8-43f3-8b02-2b60fcac8cab/intel-deep-learning-essentials-2025.3.3.16_offline.sh -O intel-deep-learning-essentials_offline.sh 67sudo bash intel-deep-learning-essentials_offline.sh -s -a --silent --eula accept 68 69- name : Install Level Zero SDK 70shell : bash 71run : | 72cd /tmp 73wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero.deb 74wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb 75sudo apt-get install -y ./level-zero.deb ./level-zero-devel.deb 76 77- name : ccache 78uses : ggml-org/ccache-action@v1.2.24 79with : 80key : sycl-ubuntu-24-${{ matrix.build }} 81save : false 82 83- name : ccache-buckets-restore 84uses : ./.github/actions/ccache-buckets 85env : 86HF_TOKEN : ${{ secrets.HF_TOKEN_CI }} 87with : 88key : sycl-ubuntu-24-${{ matrix.build }} 89folder : llama.cpp 90hf_bucket : ggml-org/cache 91 92- name : Build 93id : cmake_build 94run : | 95source /opt/intel/oneapi/setvars.sh 96cmake -B build \ 97-G "Ninja" \ 98-DCMAKE_BUILD_TYPE=Release \ 99-DGGML_SYCL=ON \ 100-DCMAKE_C_COMPILER=icx \ 101-DCMAKE_CXX_COMPILER=icpx \ 102-DLLAMA_OPENSSL=OFF \ 103-DGGML_NATIVE=OFF \ 104-DGGML_SYCL_F16=${{ matrix.fp16 }} 105time cmake --build build --config Release -j $(nproc) 106 107- name : ccache-buckets-save 108if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 109uses : ./.github/actions/ccache-buckets 110env : 111HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }} 112with : 113key : sycl-ubuntu-24-${{ matrix.build }} 114folder : llama.cpp 115evict-old-files : 1d 116hf_bucket : ggml-org/cache 117save : true 118 119windows-latest-sycl : 120runs-on : windows-2022 121 122defaults : 123run : 124shell : bash 125 126env : 127WINDOWS_BASEKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b60765d1-2b85-4e85-86b6-cb0e9563a699/intel-deep-learning-essentials-2025.3.3.18_offline.exe 128WINDOWS_DPCPP_MKL : intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel 129LEVEL_ZERO_SDK_URL : https://github.com/oneapi-src/level-zero/releases/download/v1.28.2/level-zero-win-sdk-1.28.2.zip 130ONEAPI_ROOT : "C:/Program Files (x86)/Intel/oneAPI" 131ONEAPI_INSTALLER_VERSION : "2025.3.3" 132steps : 133- name : Clone 134id : checkout 135uses : actions/checkout@v6 136 137- name : Download & Install oneAPI 138shell : bash 139run : | 140scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL 141 142- name : Install Level Zero SDK 143shell : pwsh 144run : | 145Invoke-WebRequest -Uri "${{ env.LEVEL_ZERO_SDK_URL }}" -OutFile "level-zero-win-sdk.zip" 146Expand-Archive -Path "level-zero-win-sdk.zip" -DestinationPath "C:/level-zero-sdk" -Force 147"LEVEL_ZERO_V1_SDK_PATH=C:/level-zero-sdk" | Out-File -FilePath $env:GITHUB_ENV -Append 148 149- name : ccache 150uses : ggml-org/ccache-action@v1.2.24 151with : 152key : sycl-windows-latest 153variant : ccache 154evict-old-files : 1d 155save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 156 157# TODO: add ssl support ; we will also need to modify win-build-sycl.bat to accept user-specified args 158 159- name : Build 160id : cmake_build 161run : examples/sycl/win-build-sycl.bat 162 163- name : ccache-clear 164uses : ./.github/actions/ccache-clear 165env : 166GH_TOKEN : ${{ github.token }} 167with : 168key : sycl-windows-latest 169older : 5m 170min : 1 171dry-run : ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}