vllm: [Bug]: when tensor-parallel-size>1,Stuck

Your current environment

The output of `python collect_env.py`

Collecting environment information… PyTorch version: 2.4.0 Is debug build: False CUDA used to build PyTorch: 12.4 ROCM used to build PyTorch: N/A

OS: Ubuntu 24.04 LTS (x86_64) GCC version: (Ubuntu 13.2.0-23ubuntu4) 13.2.0 Clang version: Could not collect CMake version: Could not collect Libc version: glibc-2.39

Python version: 3.11.9 (main, Apr 19 2024, 16:48:06) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-6.8.0-41-generic-x86_64-with-glibc2.39 Is CUDA available: True CUDA runtime version: Could not collect CUDA_MODULE_LOADING set to: LAZY GPU models and configuration: GPU 0: NVIDIA A40 GPU 1: NVIDIA A40 GPU 2: NVIDIA A40 GPU 3: NVIDIA A40 GPU 4: NVIDIA A40 GPU 5: NVIDIA A40

Nvidia driver version: 550.54.15 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, 57 bits virtual Byte Order: Little Endian CPU(s): 64 On-line CPU(s) list: 0-63 Vendor ID: GenuineIntel Model name: Intel® Xeon® Gold 6326 CPU @ 2.90GHz CPU family: 6 Model: 106 Thread(s) per core: 2 Core(s) per socket: 16 Socket(s): 2 Stepping: 6 CPU(s) scaling MHz: 40% CPU max MHz: 3500.0000 CPU min MHz: 800.0000 BogoMIPS: 5800.00 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 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 intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 1.5 MiB (32 instances) L1i cache: 1 MiB (32 instances) L2 cache: 40 MiB (32 instances) L3 cache: 48 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-15,32-47 NUMA node1 CPU(s): 16-31,48-63 Vulnerability Gather data sampling: Mitigation; Microcode Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected 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; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] numpy==1.26.0 [pip3] nvidia-ml-py==12.560.30 [pip3] pyzmq==26.2.0 [pip3] torch==2.4.0 [pip3] torchaudio==2.4.0 [pip3] torchvision==0.19.0 [pip3] transformers==4.44.2 [pip3] triton==3.0.0 [conda] blas 1.0 mkl
[conda] cuda-cudart 12.4.127 0 nvidia [conda] cuda-cupti 12.4.127 0 nvidia [conda] cuda-libraries 12.4.0 0 nvidia [conda] cuda-nvrtc 12.4.127 0 nvidia [conda] cuda-nvtx 12.4.127 0 nvidia [conda] cuda-opencl 12.6.37 0 nvidia [conda] cuda-runtime 12.4.0 0 nvidia [conda] cuda-version 12.6 3 nvidia [conda] ffmpeg 4.3 hf484d3e_0 pytorch [conda] libcublas 12.4.2.65 0 nvidia [conda] libcufft 11.2.0.44 0 nvidia [conda] libcufile 1.11.0.15 0 nvidia [conda] libcurand 10.3.7.37 0 nvidia [conda] libcusolver 11.6.0.99 0 nvidia [conda] libcusparse 12.3.0.142 0 nvidia [conda] libjpeg-turbo 2.0.0 h9bf148f_0 pytorch [conda] libnpp 12.2.5.2 0 nvidia [conda] libnvfatbin 12.6.20 0 nvidia [conda] libnvjitlink 12.4.99 0 nvidia [conda] libnvjpeg 12.3.1.89 0 nvidia [conda] mkl 2023.1.0 h213fc3f_46344
[conda] mkl-service 2.4.0 py311h5eee18b_1
[conda] mkl_fft 1.3.8 py311h5eee18b_0
[conda] mkl_random 1.2.4 py311hdb19cb5_0
[conda] numpy 1.26.0 pypi_0 pypi [conda] nvidia-ml-py 12.560.30 pypi_0 pypi [conda] pytorch 2.4.0 py3.11_cuda12.4_cudnn9.1.0_0 pytorch [conda] pytorch-cuda 12.4 hc786d27_6 pytorch [conda] pytorch-mutex 1.0 cuda pytorch [conda] pyzmq 26.2.0 pypi_0 pypi [conda] torchaudio 2.4.0 py311_cu124 pytorch [conda] torchtriton 3.0.0 py311 pytorch [conda] torchvision 0.19.0 py311_cu124 pytorch [conda] transformers 4.44.2 pypi_0 pypi ROCM Version: Could not collect Neuron SDK Version: N/A vLLM Version: 0.5.5@09c7792610ada9f88bbf87d32b472dd44bf23cc2 vLLM Build Flags: CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled GPU Topology: GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 NIC0 NIC1 CPU Affinity NUMA Affinity GPU NUMA ID GPU0 X PIX PIX PIX SYS SYS SYS SYS 0-15,32-47 0 N/A GPU1 PIX X PIX PIX SYS SYS SYS SYS 0-15,32-47 0 N/A GPU2 PIX PIX X PIX SYS SYS SYS SYS 0-15,32-47 0 N/A GPU3 PIX PIX PIX X SYS SYS SYS SYS 0-15,32-47 0 N/A GPU4 SYS SYS SYS SYS X PIX SYS SYS 16-31,48-63 1 N/A GPU5 SYS SYS SYS SYS PIX X SYS SYS 16-31,48-63 1 N/A NIC0 SYS SYS SYS SYS SYS SYS X PIX NIC1 SYS SYS SYS SYS SYS SYS PIX X

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

NIC Legend:

NIC0: mlx5_0 NIC1: mlx5_1

🐛 Describe the bug

vllm serve llm/qwen/Qwen2-0.5B-Instruct --tensor-parallel-size 2 INFO 09-02 12:45:15 api_server.py:144] Multiprocessing frontend to use ipc:///tmp/2b15b866-6a79-49e6-95c9-d1269a5952b6 for RPC Path. INFO 09-02 12:45:15 api_server.py:161] Started engine process with PID 814714 INFO 09-02 12:45:19 config.py:813] Defaulting to use mp for distributed inference INFO 09-02 12:45:19 llm_engine.py:184] Initializing an LLM engine (v0.5.5) with config: model=‘llm/qwen/Qwen2-0.5B-Instruct’, speculative_config=None, tokenizer=‘llm/qwen/Qwen2-0.5B-Instruct’, skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, rope_scaling=None, rope_theta=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=32768, download_dir=None, load_format=LoadFormat.AUTO, tensor_parallel_size=2, pipeline_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend=‘outlines’), observability_config=ObservabilityConfig(otlp_traces_endpoint=None, collect_model_forward_time=False, collect_model_execute_time=False), seed=0, served_model_name=llm/qwen/Qwen2-0.5B-Instruct, use_v2_block_manager=False, enable_prefix_caching=False) WARNING 09-02 12:45:19 multiproc_gpu_executor.py:59] Reducing Torch parallelism from 32 threads to 1 to avoid unnecessary CPU contention. Set OMP_NUM_THREADS in the external environment to tune this value as needed. INFO 09-02 12:45:19 custom_cache_manager.py:17] Setting Triton cache manager to: vllm.triton_utils.custom_cache_manager:CustomCacheManager (VllmWorkerProcess pid=814861) INFO 09-02 12:45:19 multiproc_worker_utils.py:215] Worker ready; awaiting tasks (VllmWorkerProcess pid=814861) INFO 09-02 12:45:20 utils.py:965] Found nccl from environment variable VLLM_NCCL_SO_PATH=/home/wyl/llm/qwen/nccl_2.21.5-1+cuda12.4_x86_64/lib/libnccl.so (VllmWorkerProcess pid=814861) INFO 09-02 12:45:20 pynccl.py:63] vLLM is using nccl==2.21.5 INFO 09-02 12:45:20 utils.py:965] Found nccl from environment variable VLLM_NCCL_SO_PATH=/home/wyl/llm/qwen/nccl_2.21.5-1+cuda12.4_x86_64/lib/libnccl.so INFO 09-02 12:45:20 pynccl.py:63] vLLM is using nccl==2.21.5 Stuck in this place 一直卡住,不动

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.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

try NCCL_P2P_LEVEL=NVL. But I don’t know why it works actually. Maybe it is due to my GPU communication config.