Skip to content

[Bug]: 'IndexError: tuple index out of range' when using 8 gpu's #19871

@ignaceHelsen

Description

@ignaceHelsen

Your current environment

The output of python collect_env.py
INFO 06-19 14:55:51 [__init__.py:244] Automatically detected platform cuda.
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 24.04.2 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Clang version                : Could not collect
CMake version                : version 3.28.3
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.7.0+cu126
Is debug build               : False
CUDA used to build PyTorch   : 12.6
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.3 (main, May 26 2025, 18:50:19) [GCC 13.3.0] (64-bit runtime)
Python platform              : Linux-6.8.0-57-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : Could not collect
CUDA_MODULE_LOADING set to   : LAZY
GPU models and configuration : 
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3
GPU 2: NVIDIA H100 80GB HBM3
GPU 3: NVIDIA H100 80GB HBM3
GPU 4: NVIDIA H100 80GB HBM3
GPU 5: NVIDIA H100 80GB HBM3
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3

Nvidia driver version        : 570.124.06
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        52 bits physical, 57 bits virtual
Byte Order:                           Little Endian
CPU(s):                               128
On-line CPU(s) list:                  0-127
Vendor ID:                            GenuineIntel
BIOS Vendor ID:                       QEMU
Model name:                           Intel(R) Xeon(R) Platinum 8452Y
BIOS Model name:                      pc-q35-jammy  CPU @ 2.0GHz
BIOS CPU family:                      1
CPU family:                           6
Model:                                143
Thread(s) per core:                   1
Core(s) per socket:                   64
Socket(s):                            2
Stepping:                             8
BogoMIPS:                             4000.00
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq dtes64 vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk avx512_fp16 arch_capabilities
Virtualization:                       VT-x
Hypervisor vendor:                    KVM
Virtualization type:                  full
L1d cache:                            4 MiB (128 instances)
L1i cache:                            4 MiB (128 instances)
L2 cache:                             512 MiB (128 instances)
L3 cache:                             32 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0-63
NUMA node1 CPU(s):                    64-127
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Unknown: No mitigations
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:        Mitigation; TSX disabled

==============================
Versions of relevant libraries
==============================
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.6.4.1
[pip3] nvidia-cuda-cupti-cu12==12.6.80
[pip3] nvidia-cuda-nvrtc-cu12==12.6.77
[pip3] nvidia-cuda-runtime-cu12==12.6.77
[pip3] nvidia-cudnn-cu12==9.5.1.17
[pip3] nvidia-cufft-cu12==11.3.0.4
[pip3] nvidia-cufile-cu12==1.11.1.6
[pip3] nvidia-curand-cu12==10.3.7.77
[pip3] nvidia-cusolver-cu12==11.7.1.2
[pip3] nvidia-cusparse-cu12==12.5.4.2
[pip3] nvidia-cusparselt-cu12==0.6.3
[pip3] nvidia-nccl-cu12==2.26.2
[pip3] nvidia-nvjitlink-cu12==12.6.85
[pip3] nvidia-nvtx-cu12==12.6.77
[pip3] pyzmq==27.0.0
[pip3] torch==2.7.0
[pip3] torchaudio==2.7.0
[pip3] torchvision==0.22.0
[pip3] transformers==4.51.3
[pip3] triton==3.3.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
Neuron SDK Version           : N/A
vLLM Version                 : 0.9.1
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    0-127   0-1             N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    0-127   0-1             N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    0-127   0-1             N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    0-127   0-1             N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    0-127   0-1             N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    0-127   0-1             N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    0-127   0-1             N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      0-127   0-1             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

==============================
     Environment Variables
==============================
NCCL_CUMEM_ENABLE=0
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
CUDA_MODULE_LOADING=LAZY

🐛 Describe the bug

Greetings,

I have 8 H100 80G.
When running the command:

vllm serve gaunernst/gemma-3-27b-it-int4-awq --gpu-memory-utilization 0.95 --max-model-len 6144 --limit-mm-per-prompt image=0,video=0 --pipeline-parallel-size 2 --dtype bfloat16 --port 8000 --served_model_name gemma-3-27b-it

, everything runs fine but when setting the --pipeline-parallel-size to 8, I'm seeing following error when running a simple curl (as described in the vllm quickstart)

(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527] WorkerProc hit an exception.
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527] Traceback (most recent call last):
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/executor/multiproc_executor.py", line 522, in worker_busy_loop
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     output = func(*args, **kwargs)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]              ^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     return func(*args, **kwargs)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]            ^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_worker.py", line 293, in execute_model
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     output = self.model_runner.execute_model(scheduler_output,
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     return func(*args, **kwargs)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]            ^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py", line 1177, in execute_model
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     self._update_states(scheduler_output)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py", line 521, in _update_states
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     self.input_batch.add_request(req_state, req_index)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_input_batch.py", line 270, in add_request
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     self.block_table.add_row(request.block_ids, req_index)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/block_table.py", line 122, in add_row
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     block_table.add_row(block_ids[i], row_idx)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]                         ~~~~~~~~~^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527] IndexError: tuple index out of range
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527] Traceback (most recent call last):
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/executor/multiproc_executor.py", line 522, in worker_busy_loop
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     output = func(*args, **kwargs)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]              ^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     return func(*args, **kwargs)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]            ^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_worker.py", line 293, in execute_model
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     output = self.model_runner.execute_model(scheduler_output,
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     return func(*args, **kwargs)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]            ^^^^^^^^^^^^^^^^^^^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py", line 1177, in execute_model
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     self._update_states(scheduler_output)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_model_runner.py", line 521, in _update_states
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     self.input_batch.add_request(req_state, req_index)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/gpu_input_batch.py", line 270, in add_request
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     self.block_table.add_row(request.block_ids, req_index)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]   File "/root/venv/lib/python3.12/site-packages/vllm/v1/worker/block_table.py", line 122, in add_row
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]     block_table.add_row(block_ids[i], row_idx)
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]                         ~~~~~~~~~^^^
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527] IndexError: tuple index out of range
(VllmWorker rank=1 pid=37378) ERROR 06-19 14:49:55 [multiproc_executor.py:527]

Can this be because the layers are not uniformly divided over the gpu's? This division message is something that is shown during vllm serve

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions