From 2a84da3b17a9d0b6b10f7c0347fe9529307596ec Mon Sep 17 00:00:00 2001 From: Chaojun Zhang Date: Thu, 7 May 2026 20:58:05 +0800 Subject: [PATCH] [XPU] Implement out-of-place all-reduce functionality (#41808) Signed-off-by: Chaojun,Zhang Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- vllm/distributed/device_communicators/xpu_communicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/distributed/device_communicators/xpu_communicator.py b/vllm/distributed/device_communicators/xpu_communicator.py index 29c731fbc6..209005c5b1 100644 --- a/vllm/distributed/device_communicators/xpu_communicator.py +++ b/vllm/distributed/device_communicators/xpu_communicator.py @@ -42,7 +42,7 @@ class XpuCommunicator(DeviceCommunicatorBase): logger.info("Using AgRs manager on XPU device.") def all_reduce(self, input_: torch.Tensor) -> torch.Tensor: - output = input_.clone() if torch.compiler.is_compiling() else input_ + output = input_.clone() dist.all_reduce(output, group=self.device_group) return output