mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 03:44:35 +00:00
server: CI tests reduce build matrix (#5725)
This commit is contained in:
parent
269de86ba0
commit
8a533f0d90
78
.github/workflows/server.yml
vendored
78
.github/workflows/server.yml
vendored
@ -6,11 +6,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- test/server-add-ci-test # FIXME remove
|
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
|
||||||
paths: ['.github/workflows/**', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
paths: ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
|
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
server:
|
server:
|
||||||
@ -18,45 +17,21 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build: [noavx, avx2, avx, avx512, cublas, clblast, openblas, kompute, vulkan]
|
|
||||||
sanitizer: [ADDRESS, THREAD, UNDEFINED]
|
sanitizer: [ADDRESS, THREAD, UNDEFINED]
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
include:
|
include:
|
||||||
- build: 'noavx'
|
- build_type: Release
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF'
|
sanitizer: ""
|
||||||
image: ubuntu:latest
|
exclude:
|
||||||
- build: 'avx2'
|
- build_type: Release
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
|
sanitizer: ADDRESS
|
||||||
image: ubuntu:latest
|
- build_type: Release
|
||||||
- build: 'avx'
|
sanitizer: THREAD
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF'
|
- build_type: Release
|
||||||
image: ubuntu:latest
|
sanitizer: UNDEFINED
|
||||||
- build: 'avx512'
|
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON'
|
|
||||||
image: ubuntu:latest
|
|
||||||
experimental: true
|
|
||||||
- build: 'cublas'
|
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON'
|
|
||||||
image: nvidia/cuda:12.3.1-devel-ubuntu22.04
|
|
||||||
arch_not_available: true # require nvidia docker engine
|
|
||||||
- build: 'clblast'
|
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON'
|
|
||||||
image: ubuntu:latest
|
|
||||||
arch_not_available: true
|
|
||||||
- build: 'openblas'
|
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS'
|
|
||||||
image: ubuntu:latest
|
|
||||||
- build: 'kompute'
|
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON'
|
|
||||||
image: ubuntu:latest
|
|
||||||
arch_not_available: true
|
|
||||||
- build: 'vulkan'
|
|
||||||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON'
|
|
||||||
image: ubuntu:latest
|
|
||||||
arch_not_available: true
|
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.image }}
|
image: ubuntu:latest
|
||||||
ports:
|
ports:
|
||||||
- 8888
|
- 8888
|
||||||
options: --cpus 4
|
options: --cpus 4
|
||||||
@ -72,40 +47,22 @@ jobs:
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
build-essential \
|
build-essential \
|
||||||
pkg-config \
|
|
||||||
git \
|
git \
|
||||||
cmake \
|
cmake \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
wget \
|
wget \
|
||||||
psmisc
|
psmisc
|
||||||
|
|
||||||
- name: Download CLBlast
|
|
||||||
id: get_clblast
|
|
||||||
if: ${{ matrix.build == 'clblast' }}
|
|
||||||
run: |
|
|
||||||
apt install -y libclblast-dev
|
|
||||||
|
|
||||||
- name: Download OpenBLAS
|
|
||||||
id: get_openblas
|
|
||||||
if: ${{ matrix.build == 'openblas' }}
|
|
||||||
run: |
|
|
||||||
apt-get -y install libopenblas-dev
|
|
||||||
|
|
||||||
- name: Install Vulkan SDK
|
|
||||||
id: get_vulkan
|
|
||||||
if: ${{ matrix.build == 'kompute' || matrix.build == 'vulkan' }}
|
|
||||||
run: |
|
|
||||||
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc
|
|
||||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
|
|
||||||
apt-get update
|
|
||||||
apt-get -y install vulkan-sdk
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: cmake_build
|
id: cmake_build
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.defines }}
|
cmake .. \
|
||||||
|
-DLLAMA_NATIVE=OFF \
|
||||||
|
-DLLAMA_BUILD_SERVER=ON \
|
||||||
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||||
|
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON ;
|
||||||
cmake --build . --config ${{ matrix.build_type }} -j $(nproc) --target server
|
cmake --build . --config ${{ matrix.build_type }} -j $(nproc) --target server
|
||||||
|
|
||||||
- name: Tests dependencies
|
- name: Tests dependencies
|
||||||
@ -121,7 +78,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
id: server_integration_test
|
id: server_integration_test
|
||||||
continue-on-error: ${{ matrix.experimental || matrix.arch_not_available }}
|
|
||||||
run: |
|
run: |
|
||||||
cd examples/server/tests
|
cd examples/server/tests
|
||||||
PORT=8888 ./tests.sh
|
PORT=8888 ./tests.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user