[XPU] Implement out-of-place all-reduce functionality (#41808)

Signed-off-by: Chaojun,Zhang <chaojun.zhang@intel.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Chaojun Zhang
2026-05-07 05:58:05 -07:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 805e9f7b77
commit 2a84da3b17
@@ -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