char-fork/llama.cpp

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

Ludovic Henryci: Bump ggml-org/ccache-action to v1.2.24 (#28083)234a6ebaa

char/aliceai-t5-moe
2.7 KiB92 linesraw
1name: CI (opencl)
2
3on:
4  workflow_dispatch: # allows manual triggering
5  push:
6    branches:
7      - master
8    paths: [
9      '.github/workflows/build-opencl.yml',
10      '**/CMakeLists.txt',
11      '**/.cmake',
12      '**/*.h',
13      '**/*.hpp',
14      '**/*.c',
15      '**/*.cpp',
16      '**/*.cl'
17    ]
18
19  pull_request:
20    types: [opened, synchronize, reopened]
21    paths: [
22      '.github/workflows/build-opencl.yml',
23      'ggml/src/ggml-opencl/**'
24    ]
25
26concurrency:
27  group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
28  cancel-in-progress: true
29
30env:
31  GGML_NLOOP: 3
32  GGML_N_THREADS: 1
33  LLAMA_ARG_LOG_COLORS: 1
34  LLAMA_ARG_LOG_PREFIX: 1
35  LLAMA_ARG_LOG_TIMESTAMPS: 1
36
37jobs:
38  windows-2025-opencl-adreno:
39    runs-on: windows-2025
40
41    steps:
42      - name: Clone
43        id: checkout
44        uses: actions/checkout@v6
45
46      - name: ccache
47        uses: ggml-org/ccache-action@v1.2.24
48        with:
49          key: opencl-windows-2025-x64
50          variant: ccache
51          evict-old-files: 1d
52          save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
53
54      - name: Install Ninja
55        id: install_ninja
56        run: |
57          choco install ninja
58
59      - name: Install OpenCL Headers and Libs
60        id: install_opencl
61        run: |
62          git clone https://github.com/KhronosGroup/OpenCL-Headers
63          cd OpenCL-Headers
64          cmake -B build `
65            -DBUILD_TESTING=OFF `
66            -DOPENCL_HEADERS_BUILD_TESTING=OFF `
67            -DOPENCL_HEADERS_BUILD_CXX_TESTS=OFF `
68            -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"
69          cmake --build build --target install
70          git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader
71          cd OpenCL-ICD-Loader
72          cmake -B build-arm64-release `
73            -A arm64 `
74            -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" `
75            -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"
76          cmake --build build-arm64-release --target install --config release
77
78      - name: Build
79        id: cmake_build
80        run: |
81          cmake -S . -B build -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 -DLLAMA_BUILD_BORINGSSL=ON
82          cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
83
84      - name: ccache-clear
85        uses: ./.github/actions/ccache-clear
86        env:
87          GH_TOKEN: ${{ github.token }}
88        with:
89          key: opencl-windows-2025-x64
90          older: 5m
91          min: 1
92          dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}