Closed ergleb78 closed 6 days ago
As a sanity check, can you import pytorch and verify that it can access your GPUs?
@DarkLight1337
Absolutely. I'm not sure if this is the good way to test it, but this is what poped up instantly:
import torch
def check_pytorch_gpu():
try:
if torch.cuda.is_available():
print(f"PyTorch can access {torch.cuda.device_count()} GPU(s).")
for i in range(torch.cuda.device_count()):
print(f"GPU {i}: {torch.cuda.get_device_name(i)}")
else:
print("PyTorch cannot access any GPUs.")
except Exception as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
check_pytorch_gpu()
pyproject.toml
[tool.poetry]
name = "try-gpus"
version = "0.1.0"
description = ""
authors = ["Gleb Erokhin"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
torch = "^2.4.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Execution output:
PyTorch can access 8 GPU(s).
GPU 0: Tesla V100-SXM3-32GB
GPU 1: Tesla V100-SXM3-32GB
GPU 2: Tesla V100-SXM3-32GB
GPU 3: Tesla V100-SXM3-32GB
GPU 4: Tesla V100-SXM3-32GB
GPU 5: Tesla V100-SXM3-32GB
GPU 6: Tesla V100-SXM3-32GB
GPU 7: Tesla V100-SXM3-32GB
Perhaps you can try upgrading the vLLM version. It's possible that this issue has been fixed since v0.5.5.
Otherwise I'm not sure. @youkaichao any ideas?
please run https://github.com/vllm-project/vllm/blob/main/collect_env.py inside the docker image to collect the environment.
Perhaps you can try upgrading the vLLM version. It's possible that this issue has been fixed since v0.5.5.
Yeah, I tried that with v9.6.2 (posted the results above). Getting “Failed to infer device type” exception. I will run the python script in the container and post here, as requested.
please run https://github.com/vllm-project/vllm/blob/main/collect_env.py inside the docker image to collect the environment. @youkaichao Here you are. It looks like CUDA is not visible from docker, hovewer nvidia-docker-toolkit seems to be working fine and I can run nvidia-smi from cuda-12-6 container for test.
root@f6ca99dec4b4:/vllm-workspace/ttt# python3 collect_env.py
Collecting environment information...
PyTorch version: 2.4.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31
Python version: 3.10.14 (main, Apr 6 2024, 18:45:05) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.19.0-1010-nvidia-lowlatency-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 48 bits virtual
CPU(s): 80
On-line CPU(s) list: 0-79
Thread(s) per core: 2
Core(s) per socket: 20
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz
Stepping: 4
CPU MHz: 999.871
CPU max MHz: 3700.0000
CPU min MHz: 1000.0000
BogoMIPS: 4000.00
Virtualization: VT-x
L1d cache: 1.3 MiB
L1i cache: 1.3 MiB
L2 cache: 40 MiB
L3 cache: 55 MiB
NUMA node0 CPU(s): 0-19,40-59
NUMA node1 CPU(s): 20-39,60-79
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] flashinfer==0.1.4+cu121torch2.4
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.1.3.1
[pip3] nvidia-cuda-cupti-cu12==12.1.105
[pip3] nvidia-cuda-nvrtc-cu12==12.1.105
[pip3] nvidia-cuda-runtime-cu12==12.1.105
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.0.2.54
[pip3] nvidia-curand-cu12==10.3.2.106
[pip3] nvidia-cusolver-cu12==11.4.5.107
[pip3] nvidia-cusparse-cu12==12.1.0.106
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] nvidia-nvjitlink-cu12==12.6.20
[pip3] nvidia-nvtx-cu12==12.1.105
[pip3] pyzmq==26.2.0
[pip3] torch==2.4.0
[pip3] torchvision==0.19.0
[pip3] transformers==4.44.2
[pip3] triton==3.0.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.5.5
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
Could not collect
Well, I managed to solve the problem in a weird way. I commented the following section in docker compose file
#deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# capabilities: [GPU]
I have no idea why it fixes the issue. Earlier, it was a requirement to explicitly add Nvidia device and GPU capabilities. Maybe it's going to be userful for someone. The problem seems to have nothing to do with VLLM but the container toolkit.
thanks for reporting, you need to make cuda work before you can use vllm.
Your current environment
I'm trying to run inference in docker-compose, host: ubuntu 22.04
Model Input Dumps
No response
🐛 Describe the bug
It used to work just few hours ago, we simply restarted docker compose, same image, same tag, same mode. Not sure what might have happened
Why did it start checking compute capability <8 if it used to run on 7 just a day ago? I appreciate your help, I almost broke my head already.
on v0.6.2 getting a different error:
Before submitting a new issue...