You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI: backends for vllm testing are redundant and cause CUDA context lock #625
By the looks of it, we tend to spin up 3 vllm servers for 3 separate modules:
test/backends/test_openai_vllm.py: inherently a sub-process so CUDA context cleanup happens by default.
test/backends/test_vllm.py and test/backends/test_vllm_tools.py: 2 different backends that seem to require 80% of a GPU reserved running 2 different models (Qwen3 and Mistral).
When the latter two run sequentially in the same process, CUDA drivers hold GPU memory at the process level. Even after cleanup, memory fragments and the second backend initialization fails with OOM errors.
Proposed solution: Spin up a single shared session-scoped LocalVLLMBackend in conftest.py (might have to figure out why we need a subprocess in test_openai_vllm.py or if there is a way for us to just point to a running vllm instance in that test) and reuse that across all vllm dependent modules. This:
Eliminates fragmentation (only one backend initialization per session)
Speeds up tests (no repeated model loading)
Stays compatible with --isolate-heavy for process isolation (if we want to use if for some reason)
Trade-off: All vLLM tests would use the same model (should be fine IMHO to use granite micro)
Extra points: This could also give us the opportunity to run tests grouped by backends (hf, vllm, ollama, etc) enabling us have aggressive startup and tear down for each group. We could add a --group-by-backend flag that runs all tests for one backend together with coordinated lifecycle management.
changed the title [-]backends for vllm testing are redundant and cause CUDA context lock[/-][+]CI: backends for vllm testing are redundant and cause CUDA context lock[/+]on Mar 11, 2026
Activity
[-]backends for vllm testing are redundant and cause CUDA context lock[/-][+]CI: backends for vllm testing are redundant and cause CUDA context lock[/+]planetf1 commentedon Apr 8, 2026
Given the removal of the vllm backend in #781 I think this can be closed @avinash2692 ?
psschwei commentedon May 12, 2026
no more vllm backend