CI: cross-platform GPU-offload spoof on Windows/macOS/Linux runners
Adds a GPU-less smoke that drives install_llama_prebuilt.py --smoke-test against a fake llama-server emitting CPU-only vs GPU device_info logs, asserting a CPU-only binary tagged as a GPU install is rejected (exit 2) and a GPU one is accepted (exit 0), plus the selection and classifier unit tests, on all three OSes. This is the coverage gap that let the silent CPU-only path ship.
This commit is contained in:
parent
c85c62e456
commit
a742dd49ce
2 changed files with 166 additions and 0 deletions
65
.github/workflows/studio-gpu-offload-smoke.yml
vendored
Normal file
65
.github/workflows/studio-gpu-offload-smoke.yml
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# Cross-platform GPU-offload validation smoke (no GPU required).
|
||||
#
|
||||
# Reproduces the silent CPU-only GGUF bug (#5807 / #5106 / #5830) with a fake
|
||||
# llama-server that "starts and serves HTTP 200" while its log reports CPU-only
|
||||
# or GPU offload, and asserts install_llama_prebuilt.py --smoke-test rejects the
|
||||
# CPU-only-tagged-GPU case (exit 2) and accepts the GPU case (exit 0). Runs on
|
||||
# GPU-less Windows / macOS / Linux runners, which is why this regressed
|
||||
# untested. Also runs the pure-Python selection + classifier unit tests.
|
||||
|
||||
name: Studio GPU Offload Smoke
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'studio/install_llama_prebuilt.py'
|
||||
- 'studio/setup.sh'
|
||||
- 'studio/setup.ps1'
|
||||
- 'studio/backend/core/inference/llama_cpp.py'
|
||||
- 'tests/studio/install/**'
|
||||
- 'tests/sh/test_llama_gpu_smoke.sh'
|
||||
- '.github/workflows/studio-gpu-offload-smoke.yml'
|
||||
push:
|
||||
branches: [main, pip]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
gpu-offload-spoof:
|
||||
name: GPU-offload spoof (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install pytest
|
||||
run: python -m pip install --upgrade pip pytest
|
||||
|
||||
- name: GPU-offload spoof (end to end, real subprocess + HTTP)
|
||||
run: python tests/studio/install/run_smoke_spoof.py
|
||||
|
||||
- name: Selection + classifier unit tests
|
||||
run: >
|
||||
python -m pytest
|
||||
tests/studio/install/test_validate_server_gpu_offload.py
|
||||
tests/studio/install/test_selection_logic.py
|
||||
tests/studio/install/test_gpu_offload_spoof.py
|
||||
-q
|
||||
|
||||
- name: setup.sh smoke-exit classifier (POSIX)
|
||||
if: runner.os != 'Windows'
|
||||
run: bash tests/sh/test_llama_gpu_smoke.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue