Add vLLM v0.18.1 source tree with KV transfer abort fix
third_party/vllm/ now tracked in git for direct patch management.
Based on vLLM v0.18.1 release with one patch applied:
vllm/v1/core/sched/scheduler.py:
Replace fatal assert with graceful skip when KV transfer callback
arrives for an already-aborted request during PD disaggregated serving.
Future vLLM modifications should be made directly in third_party/vllm/
and committed normally. The patches/ directory is kept as documentation
of what changed from upstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
23
third_party/vllm/tests/cuda/scripts/check_device_count_respects_env.py
vendored
Normal file
23
third_party/vllm/tests/cuda/scripts/check_device_count_respects_env.py
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""Check that device_count respects CUDA_VISIBLE_DEVICES after platform import."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
for key in ["CUDA_VISIBLE_DEVICES", "HIP_VISIBLE_DEVICES", "ROCR_VISIBLE_DEVICES"]:
|
||||
os.environ.pop(key, None)
|
||||
|
||||
import torch # noqa: E402
|
||||
|
||||
from vllm.platforms import current_platform # noqa: F401, E402
|
||||
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
||||
count = torch.accelerator.device_count()
|
||||
|
||||
if count == 0:
|
||||
sys.exit(0) # Skip: no GPUs available
|
||||
|
||||
assert count == 1, f"device_count()={count}, expected 1"
|
||||
print("OK")
|
||||
20
third_party/vllm/tests/cuda/scripts/check_platform_no_cuda_init.py
vendored
Normal file
20
third_party/vllm/tests/cuda/scripts/check_platform_no_cuda_init.py
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""Check that vllm.platforms import does not initialize CUDA."""
|
||||
|
||||
import os
|
||||
|
||||
for key in ["CUDA_VISIBLE_DEVICES", "HIP_VISIBLE_DEVICES", "ROCR_VISIBLE_DEVICES"]:
|
||||
os.environ.pop(key, None)
|
||||
|
||||
import torch # noqa: E402
|
||||
|
||||
assert not torch.cuda.is_initialized(), "CUDA initialized before import"
|
||||
|
||||
from vllm.platforms import current_platform # noqa: E402
|
||||
|
||||
assert not torch.cuda.is_initialized(), (
|
||||
f"CUDA was initialized during vllm.platforms import on {current_platform}"
|
||||
)
|
||||
print("OK")
|
||||
Reference in New Issue
Block a user