CICD-453 · GPU memory utilization testing
Encyclopedia · GPU and inference infrastructure · All snippets
Previous · CICD-452 · Next · CICD-454
1. Where it fits
- Placement CI GPU probe.
- Prerequisites dedicated GPU lab, approved images and model revision, fixed benchmark profile.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
timeout 30s nvidia-smi --query-gpu=timestamp,index,memory.used,memory.total --format=csv -l 1 > gpu-memory.csv || test "$?" -eq 124
test "$(wc -l < gpu-memory.csv)" -gt 13. How it works
The NVIDIA tool reads hardware and driver counters visible in this execution environment. The shell predicate makes the expected state explicit and returns a nonzero status when it is not satisfied.
4. Verify the result
Sample alongside the benchmark and compare per-device peaks. GPU process allocations can outlive individual requests.
Validation syntax-validated (Bash parse). Status definitions.