char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Georgi Gerganovci : run test-backend-ops as a dedicated ci/run.sh test (#28740)b78a39a2f

char/aliceai-t5-moe
5.5 KiB178 linesraw
1name: CI (openvino)
2
3on:
4  workflow_dispatch: # allows manual triggering
5  push:
6    branches:
7      - master
8    paths: [
9      '.github/workflows/build-openvino.yml',
10      '**/CMakeLists.txt',
11      '**/.cmake',
12      '**/*.h',
13      '**/*.hpp',
14      '**/*.c',
15      '**/*.cpp',
16    ]
17
18  pull_request:
19    types: [opened, synchronize, reopened]
20    paths: [
21      '.github/workflows/build-openvino.yml',
22      'ggml/src/ggml-openvino/**'
23    ]
24
25concurrency:
26  group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
27  cancel-in-progress: true
28
29env:
30  GGML_NLOOP: 3
31  GGML_N_THREADS: 1
32  LLAMA_ARG_LOG_COLORS: 1
33  LLAMA_ARG_LOG_PREFIX: 1
34  LLAMA_ARG_LOG_TIMESTAMPS: 1
35  # TODO: fix failing tests on OpenVINO backend
36  CTEST_EXCLUDE: "test-llama-archs|^test-recurrent-state-|test-save-load-state"
37
38jobs:
39  ubuntu-24-openvino:
40    runs-on: [self-hosted, Linux, Intel, OpenVINO]
41
42    env:
43      # Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
44      OPENVINO_VERSION_MAJOR: "2026.3.1"
45      OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"
46
47    steps:
48      - name: Clone
49        id: checkout
50        uses: actions/checkout@v6
51
52      - name: Dependencies
53        id: depends
54        run: |
55          sudo apt-get update
56          sudo apt-get install -y build-essential libssl-dev libtbb12 cmake ninja-build python3-pip
57          sudo apt-get install -y ocl-icd-opencl-dev opencl-headers opencl-clhpp-headers intel-opencl-icd
58
59      - name: Setup OpenVINO Toolkit
60        uses: ./.github/actions/linux-setup-openvino
61        with:
62          path: ./openvino_toolkit
63          version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
64          version_full: ${{ env.OPENVINO_VERSION_FULL }}
65
66      - name: Install OpenVINO dependencies
67        run: |
68          cd ./openvino_toolkit
69          chmod +x ./install_dependencies/install_openvino_dependencies.sh
70          echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh
71
72      - name: Build
73        id: cmake_build
74        run: |
75          source ./openvino_toolkit/setupvars.sh
76          cmake -B build/ReleaseOV -G Ninja \
77            -DCMAKE_BUILD_TYPE=Release \
78            -DGGML_OPENVINO=ON
79          time cmake --build build/ReleaseOV --config Release --parallel
80
81      - name: Test (CPU)
82        id: cmake_test_cpu
83        run: |
84          cd ${{ github.workspace }}
85          ctest --test-dir build/ReleaseOV -L main -E "${{ env.CTEST_EXCLUDE }}" --verbose --timeout 3000
86
87      - name: Test (GPU)
88        id: cmake_test_gpu
89        run: |
90          cd ${{ github.workspace }}
91          export GGML_OPENVINO_DEVICE=GPU
92          ctest --test-dir build/ReleaseOV -L main -E "${{ env.CTEST_EXCLUDE }}" --verbose --timeout 3000
93
94  openvino-windows-2022:
95    runs-on: windows-2022
96
97    env:
98      # Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
99      OPENVINO_VERSION_MAJOR: "2026.3.1"
100      OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"
101
102    steps:
103      - name: Clone
104        id: checkout
105        uses: actions/checkout@v6
106
107      - name: ccache
108        uses: ggml-org/ccache-action@v1.2.24
109        with:
110          key: openvino-windows-2022
111          variant: ccache
112          evict-old-files: 1d
113          save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
114
115      - name: Setup Cache
116        uses: actions/cache@v5
117        id: cache-openvino
118        with:
119          path: ./openvino_toolkit
120          key: cache-gha-openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
121
122      - name: Setup OpenVINO Toolkit
123        if: steps.cache-openvino.outputs.cache-hit != 'true'
124        uses: ./.github/actions/windows-setup-openvino
125        with:
126          path: ./openvino_toolkit
127          version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
128          version_full: ${{ env.OPENVINO_VERSION_FULL }}
129
130      - name: Install OpenCL using vcpkg
131        shell: powershell
132        run: |
133          git clone https://github.com/microsoft/vcpkg C:\vcpkg
134          C:\vcpkg\bootstrap-vcpkg.bat
135          C:\vcpkg\vcpkg install opencl
136
137      - name: Build
138        id: cmake_build
139        shell: cmd
140        run: |
141          REM Find extracted OpenVINO folder dynamically
142          for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
143
144          if not exist "%OPENVINO_ROOT%\runtime\cmake\OpenVINOConfig.cmake" (
145              echo ERROR: OpenVINOConfig.cmake not found
146              exit /b 1
147          )
148
149          call "%OPENVINO_ROOT%\setupvars.bat"
150
151          cmake -B build\ReleaseOV -G "Visual Studio 17 2022" ^
152            -A x64 ^
153            -DCMAKE_BUILD_TYPE=Release ^
154            -DGGML_OPENVINO=ON ^
155            -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
156
157          cmake --build build\ReleaseOV --config Release -- /m
158
159      - name: Test (CPU)
160        id: cmake_test_cpu
161        shell: cmd
162        run: |
163          REM Find extracted OpenVINO folder dynamically
164          for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
165          call "%OPENVINO_ROOT%\setupvars.bat"
166
167          cd build
168          ctest --test-dir ReleaseOV -L main -E "${{ env.CTEST_EXCLUDE }}" -C Release --verbose --timeout 3000
169
170      - name: ccache-clear
171        uses: ./.github/actions/ccache-clear
172        env:
173          GH_TOKEN: ${{ github.token }}
174        with:
175          key: openvino-windows-2022
176          older: 5m
177          min: 1
178          dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}