vllm - ✅(Solved) Fix [Bug]: v0.18.0 fails to run pipeline parallel across nodes [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#37933Fetched 2026-04-08 01:22:36
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
1
Participants
Timeline (top)
labeled ×1subscribed ×1

Error Message

(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932] File "/root/venv/lib/python3.12/site-packages/vllm/distributed/device_communicators/cpu_communicator.py", line 152, in recv_tensor_dict (Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932] return self.dist_module.recv_tensor_dict(src) (Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932] AttributeError: module 'torch.distributed' has no attribute 'recv_tensor_dict'

Fix Action

Fix / Workaround

============================== CPU Info

Architecture: aarch64 CPU op-mode(s): 64-bit Byte Order: Little Endian CPU(s): 144 On-line CPU(s) list: 0-143 Vendor ID: ARM BIOS Vendor ID: NVIDIA Model name: Neoverse-V2 BIOS Model name: Grace A02 AOM-SCM-NV CPU @ 3.4GHz BIOS CPU family: 258 Model: 0 Thread(s) per core: 1 Core(s) per socket: 72 Socket(s): 2 Stepping: r0p0 BogoMIPS: 2000.00 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti L1d cache: 9 MiB (144 instances) L1i cache: 9 MiB (144 instances) L2 cache: 144 MiB (144 instances) L3 cache: 228 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-71 NUMA node1 CPU(s): 72-143 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: Not affected 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; __user pointer sanitization Vulnerability Spectre v2: Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Not affected

PR fix notes

PR #40150: [CPU][BugFix] Fix inter-node pipeline parallel

Description (problem / solution / changelog)

Purpose

Fixes: #37933

In inter-node settings (similar to reproducer on #37933) we use torch.distributed backend instead of SHM communicator in the CPU Communicator.

However, torch.distributed does not support send/recieve tensor_dict which are needed for pipeline-parallel. This PR:

  • marks send/recieve tensor_dict functions in CPU communicator as unsupported with torch.distributed backend, and
  • uses the existing generic tensor-dict send/recv fallback in parallel_state.py when torch.distributed backend is used.

Test Plan

Tested locally + CI

Test Result


<details> <summary> Essential Elements of an Effective PR Description Checklist </summary>
  • [Y] The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • [Y] The test plan, such as providing test command.
  • [Y] The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
</details>

Changed files

  • vllm/distributed/device_communicators/cpu_communicator.py (modified, +13/-0)
  • vllm/distributed/parallel_state.py (modified, +4/-2)

Code Example

==============================
        System Info
==============================
OS                           : Ubuntu 24.04.3 LTS (aarch64)
GCC version                  : (Ubuntu 11.5.0-1ubuntu1~24.04.1) 11.5.0
Clang version                : Could not collect
CMake version                : version 3.31.6
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cpu
Is debug build               : False
CUDA used to build PyTorch   : None
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.3 (main, Mar  3 2026, 12:15:18) [GCC 13.3.0] (64-bit runtime)
Python platform              : Linux-6.8.0-90-generic-aarch64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
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 Info
==============================
Architecture:                         aarch64
CPU op-mode(s):                       64-bit
Byte Order:                           Little Endian
CPU(s):                               144
On-line CPU(s) list:                  0-143
Vendor ID:                            ARM
BIOS Vendor ID:                       NVIDIA
Model name:                           Neoverse-V2
BIOS Model name:                      Grace A02 AOM-SCM-NV CPU @ 3.4GHz
BIOS CPU family:                      258
Model:                                0
Thread(s) per core:                   1
Core(s) per socket:                   72
Socket(s):                            2
Stepping:                             r0p0
BogoMIPS:                             2000.00
Flags:                                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti
L1d cache:                            9 MiB (144 instances)
L1i cache:                            9 MiB (144 instances)
L2 cache:                             144 MiB (144 instances)
L3 cache:                             228 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0-71
NUMA node1 CPU(s):                    72-143
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:        Not affected
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; __user pointer sanitization
Vulnerability Spectre v2:             Not affected
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected
Vulnerability Vmscape:                Not affected

==============================
Versions of relevant libraries
==============================
[pip3] numpy==2.2.6
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0
[pip3] torchaudio==2.11.0
[pip3] torchvision==0.25.0
[pip3] transformers==4.57.6
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.16.0rc2.dev19+gd9206135d (git sha: d9206135d)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
  Could not collect

==============================
     Environment Variables
==============================
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root

---

vllm serve meta-llama/Llama-3.1-8B-Instruct --pipeline-parallel-size 2 --nnodes 2 --node-rank 0 --master-addr <ip-addr>
vllm serve meta-llama/Llama-3.1-8B-Instruct --pipeline-parallel-size 2 --nnodes 2 --node-rank 1 --master-addr <ip-addr> --headless

---

(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932]   File "/root/venv/lib/python3.12/site-packages/vllm/distributed/device_communicators/cpu_communicator.py", line 152, in recv_tensor_dict
(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932]     return self.dist_module.recv_tensor_dict(src)
(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932] AttributeError: module 'torch.distributed' has no attribute 'recv_tensor_dict'
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>

Not sure why it shows my version number is 0.16.0rc2.dev19+gd9206135d, while I'm on 0.18.0. The output of vllm --version shows the correct version of 0.18.0.

==============================
        System Info
==============================
OS                           : Ubuntu 24.04.3 LTS (aarch64)
GCC version                  : (Ubuntu 11.5.0-1ubuntu1~24.04.1) 11.5.0
Clang version                : Could not collect
CMake version                : version 3.31.6
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cpu
Is debug build               : False
CUDA used to build PyTorch   : None
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.3 (main, Mar  3 2026, 12:15:18) [GCC 13.3.0] (64-bit runtime)
Python platform              : Linux-6.8.0-90-generic-aarch64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
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 Info
==============================
Architecture:                         aarch64
CPU op-mode(s):                       64-bit
Byte Order:                           Little Endian
CPU(s):                               144
On-line CPU(s) list:                  0-143
Vendor ID:                            ARM
BIOS Vendor ID:                       NVIDIA
Model name:                           Neoverse-V2
BIOS Model name:                      Grace A02 AOM-SCM-NV CPU @ 3.4GHz
BIOS CPU family:                      258
Model:                                0
Thread(s) per core:                   1
Core(s) per socket:                   72
Socket(s):                            2
Stepping:                             r0p0
BogoMIPS:                             2000.00
Flags:                                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti
L1d cache:                            9 MiB (144 instances)
L1i cache:                            9 MiB (144 instances)
L2 cache:                             144 MiB (144 instances)
L3 cache:                             228 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0-71
NUMA node1 CPU(s):                    72-143
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:        Not affected
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; __user pointer sanitization
Vulnerability Spectre v2:             Not affected
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected
Vulnerability Vmscape:                Not affected

==============================
Versions of relevant libraries
==============================
[pip3] numpy==2.2.6
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0
[pip3] torchaudio==2.11.0
[pip3] torchvision==0.25.0
[pip3] transformers==4.57.6
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.16.0rc2.dev19+gd9206135d (git sha: d9206135d)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
  Could not collect

==============================
     Environment Variables
==============================
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root
</details>

🐛 Describe the bug

Launching PP on 2 CPU-only nodes

vllm serve meta-llama/Llama-3.1-8B-Instruct --pipeline-parallel-size 2 --nnodes 2 --node-rank 0 --master-addr <ip-addr>
vllm serve meta-llama/Llama-3.1-8B-Instruct --pipeline-parallel-size 2 --nnodes 2 --node-rank 1 --master-addr <ip-addr> --headless

After sending the first request, it gives following error message:

(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932]   File "/root/venv/lib/python3.12/site-packages/vllm/distributed/device_communicators/cpu_communicator.py", line 152, in recv_tensor_dict
(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932]     return self.dist_module.recv_tensor_dict(src)
(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(Worker_PP1 pid=42781) ERROR 03-23 21:23:08 [multiproc_executor.py:932] AttributeError: module 'torch.distributed' has no attribute 'recv_tensor_dict'

When ranks are not on the same node, it uses torch.distributed as the backend, rather than _CPUSHMDistributed. _CPUSHMDistributed has a function named recv_tensor_dict(), but torch.distributed doesn't. Not sure why this issue was not revealed in previous versions, but there should be a more robust way to check whether send_tensor_dict() and recv_tensor_dict() can be called.

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.

extent analysis

Fix Plan

To resolve the AttributeError caused by the missing recv_tensor_dict attribute in torch.distributed, we need to ensure that the correct backend is used when ranks are not on the same node.

Here are the steps to fix the issue:

  • Check if the torch.distributed backend is being used when ranks are not on the same node.
  • Modify the code to use the _CPUSHMDistributed backend when possible.
  • Add a check to ensure that send_tensor_dict() and recv_tensor_dict() can be called before attempting to use them.

Code Changes

We need to modify the cpu_communicator.py file to check the backend before calling recv_tensor_dict(). Here's an example of how to do it:

import torch.distributed as dist

class CPUCommunicator:
    def __init__(self, dist_module):
        self.dist_module = dist_module

    def recv_tensor_dict(self, src):
        if hasattr(self.dist_module, 'recv_tensor_dict'):
            return self.dist_module.recv_tensor_dict(src)
        else:
            # Handle the case when recv_tensor_dict is not available
            raise NotImplementedError("recv_tensor_dict is not available in the current backend")

Alternatively, you can use the _CPUSHMDistributed backend directly:

from vllm.distributed import _CPUSHMDistributed

class CPUCommunicator:
    def __init__(self):
        self.dist_module = _CPUSHMDistributed()

    def recv_tensor_dict(self, src):
        return self.dist_module.recv_tensor_dict(src)

Verification

To verify that the fix worked, launch the PP on 2 CPU-only nodes again and check for the error message. If the error is resolved, it means that the fix was successful.

Extra Tips

  • Make sure to test the fix in different scenarios to ensure that it works as expected.
  • Consider adding more robust error handling to handle cases where the backend does not support send_tensor_dict() and recv_tensor_dict().
  • If you're using a version of PyTorch that does not support _CPUSHMDistributed, consider upgrading to a newer version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING