Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Usage]: GetTimeoutError when run distributed inference on ray with tensor parallel size > 1 #9694

Open
1 task done
sharlynxy opened this issue Oct 25, 2024 · 0 comments
Open
1 task done
Labels
usage How to use vllm

Comments

@sharlynxy
Copy link

Your current environment

$ python collect_env.py
Collecting environment information...
2024-10-25 11:12:58.116681: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-10-25 11:12:58.167780: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-10-25 11:12:58.183402: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-10-25 11:12:58.215052: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-10-25 11:12:59.873142: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
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 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.30.5
Libc version: glibc-2.35

Python version: 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-117-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA L40
GPU 1: NVIDIA L40

Nvidia driver version: 545.29.06
cuDNN version: Could not collect
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
Address sizes:                        46 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               16
On-line CPU(s) list:                  0-15
Vendor ID:                            GenuineIntel
Model name:                           Intel Xeon Processor (Skylake, IBRS)
CPU family:                           6
Model:                                85
Thread(s) per core:                   1
Core(s) per socket:                   1
Socket(s):                            16
Stepping:                             4
BogoMIPS:                             4988.27
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat umip pku ospke md_clear flush_l1d arch_capabilities
Virtualization:                       VT-x
Hypervisor vendor:                    KVM
Virtualization type:                  full
L1d cache:                            512 KiB (16 instances)
L1i cache:                            512 KiB (16 instances)
L2 cache:                             64 MiB (16 instances)
L3 cache:                             256 MiB (16 instances)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-15
Vulnerability Gather data sampling:   Unknown: Dependent on hypervisor status
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Mitigation; PTE Inversion; VMX flush not necessary, SMT disabled
Vulnerability Mds:                    Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:               Mitigation; PTI
Vulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Mitigation; IBRS
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; IBRS; IBPB conditional; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Mitigation; Clear CPU buffers; SMT Host state unknown

Versions of relevant libraries:
[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.77
[pip3] nvidia-nvtx-cu12==12.1.105
[pip3] optree==0.13.0
[pip3] pyzmq==26.2.0
[pip3] torch==2.4.0
[pip3] torchaudio==2.4.0
[pip3] torchvision==0.19.0
[pip3] transformers==4.45.2
[pip3] triton==3.0.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.3.post1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      PHB     0-15    0               N/A
GPU1    PHB      X      0-15    0               N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

How would you like to use vllm

I am trying the https://github.com/vllm-project/vllm/blob/main/examples/offline_inference_distributed.py example.
Then I met a GetTimeoutError as follow:

2024-10-25 11:06:59,770	ERROR exceptions.py:73 -- Exception occurred in Ray Data or Ray Core internal code. If you continue to see this error, please open an issue on the Ray project GitHub page with the full stack trace below: https://github.com/ray-project/ray/issues/new/choose
2024-10-25 11:06:59,773	ERROR exceptions.py:81 -- Full stack trace:
Traceback (most recent call last):
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/data/_internal/execution/operators/actor_pool_map_operator.py", line 135, in start
    ray.get(refs, timeout=timeout)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 21, in auto_init_wrapper
    return fn(*args, **kwargs)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/_private/worker.py", line 2661, in get
    values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/_private/worker.py", line 848, in get_objects
    data_metadata_pairs = self.core_worker.get_objects(
  File "python/ray/_raylet.pyx", line 3510, in ray._raylet.CoreWorker.get_objects
  File "python/ray/includes/common.pxi", line 81, in ray._raylet.check_status
ray.exceptions.GetTimeoutError: Get timed out: some object(s) not ready.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/data/exceptions.py", line 49, in handle_trace
    return fn(*args, **kwargs)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/data/_internal/plan.py", line 423, in execute_to_iterator
    bundle_iter = execute_to_legacy_bundle_iterator(executor, self)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/data/_internal/execution/legacy_compat.py", line 51, in execute_to_legacy_bundle_iterator
...
    op.start(options)
  File "/home/ubuntu/oms/venv/lib/python3.10/site-packages/ray/data/_internal/execution/operators/actor_pool_map_operator.py", line 137, in start
    raise ray.exceptions.GetTimeoutError(
ray.exceptions.GetTimeoutError: Timed out while starting actors. This may mean that the cluster does not have enough resources for the requested actor pool.

The LLM engine seemed to be loaded correctly.

Loading safetensors checkpoint shards:   0% Completed | 0/1 [00:00<?, ?it/s]
Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:21<00:00, 21.70s/it]
Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:22<00:00, 22.04s/it]

�[36m(RayWorkerWrapper pid=2241093)�[0m INFO 10-25 10:59:45 model_runner.py:1067] Loading model weights took 1.0248 GB
�[36m(_MapWorker pid=2239435)�[0m INFO 10-25 10:59:08 weight_utils.py:288] No model.safetensors.index.json found in remote.
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Using non-device net plugin version 0
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Using network Socket
�[36m(_MapWorker pid=2239435)�[0m INFO 10-25 10:59:48 model_runner.py:1067] Loading model weights took 1.0248 GB
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO comm 0x555ec1b4cb30 rank 0 nranks 2 cudaDev 0 nvmlDev 0 busId c000 commId 0x2081eb22b696499b - Init START
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO comm 0x555ec1b4cb30 rank 0 nRanks 2 nNodes 1 localRanks 2 localRank 0 MNNVL 0
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Channel 00/02 :    0   1
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Channel 01/02 :    0   1
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] 1/-1/-1->0->-1
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO P2P Chunksize set to 131072
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Channel 00 : 0[0] -> 1[1] via SHM/direct/direct
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Channel 01 : 0[0] -> 1[1] via SHM/direct/direct
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Connected all rings
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO Connected all trees
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO 2 coll channels, 0 collnet channels, 0 nvls channels, 2 p2p channels, 2 p2p channels per peer
�[36m(_MapWorker pid=2239435)�[0m ogc-user-vm-zw4m5k3tc6:2239435:2248506 [0] NCCL INFO comm 0x555ec1b4cb30 rank 0 nranks 2 cudaDev 0 nvmlDev 0 busId c000 commId 0x2081eb22b696499b - Init COMPLETE
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO Using non-device net plugin version 0
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO Using network Socket
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO comm 0x55fab7308c20 rank 1 nranks 2 cudaDev 1 nvmlDev 1 busId d000 commId 0x2081eb22b696499b - Init START
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO comm 0x55fab7308c20 rank 1 nRanks 2 nNodes 1 localRanks 2 localRank 1 MNNVL 0
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO Trees [0] -1/-1/-1->1->0 [1] -1/-1/-1->1->0
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO P2P Chunksize set to 131072
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2249104 [1] NCCL INFO Channel 01 : 1[1] -> 0[0] via SHM/direct/direct�[32m [repeated 4x across cluster]�[0m
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO Connected all rings
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO Connected all trees
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO 2 coll channels, 0 collnet channels, 0 nvls channels, 2 p2p channels, 2 p2p channels per peer
�[36m(RayWorkerWrapper pid=2241093)�[0m ogc-user-vm-zw4m5k3tc6:2241093:2248511 [1] NCCL INFO comm 0x55fab7308c20 rank 1 nranks 2 cudaDev 1 nvmlDev 1 busId d000 commId 0x2081eb22b696499b - Init COMPLETE
�[36m(_MapWorker pid=2239435)�[0m INFO 10-25 11:00:54 distributed_gpu_executor.py:57] # GPU blocks: 227644, # CPU blocks: 23831
�[36m(_MapWorker pid=2239435)�[0m INFO 10-25 11:00:54 distributed_gpu_executor.py:61] Maximum concurrency for 2048 tokens per request: 1778.47x
�[36m(_MapWorker pid=2239435)�[0m INFO 10-25 11:00:59 model_runner.py:1395] Capturing the model for CUDA graphs. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI.
�[36m(_MapWorker pid=2239435)�[0m INFO 10-25 11:00:59 model_runner.py:1399] CUDA graphs can take additional 1~3 GiB memory per GPU. If you are running out of memory, consider decreasing `gpu_memory_utilization` or enforcing eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.

The GPU memory usage was unexpectedly large when using TinyLlama/TinyLlama-1.1B-Chat-v1.0 which is a small model. (I use this model to reduce the time of loading models and have a quick test.)

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA L40                     Off | 00000000:0C:00.0 Off |                    0 |
| N/A   42C    P0              78W / 300W |  41206MiB / 46068MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
|   1  NVIDIA L40                     Off | 00000000:0D:00.0 Off |                    0 |
| N/A   46C    P0              88W / 300W |  41206MiB / 46068MiB |     65%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A   2308765      C   ray::_MapWorker.__init__                  41254MiB |
|    1   N/A  N/A   2310206      C   ray::RayWorkerWrapper.execute_method      41254MiB |
+---------------------------------------------------------------------------------------+

I want to know what is causing this error and how to fix it. This problem blocks me for days.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@sharlynxy sharlynxy added the usage How to use vllm label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage How to use vllm
Projects
None yet
Development

No branches or pull requests

1 participant