Unverified Commit 6e4a93e3 authored by Isotr0py's avatar Isotr0py Committed by GitHub
Browse files

[Bugfix][CPU] Fix broken AVX2 CPU TP support (#17252)


Signed-off-by: default avatarIsotr0py <2037008807@qq.com>
parent 217db4ba
...@@ -22,7 +22,8 @@ class CpuCommunicator(DeviceCommunicatorBase): ...@@ -22,7 +22,8 @@ class CpuCommunicator(DeviceCommunicatorBase):
super().__init__(cpu_group, device, device_group, unique_name) super().__init__(cpu_group, device, device_group, unique_name)
self.dist_module = torch.distributed self.dist_module = torch.distributed
if current_platform.get_cpu_architecture() == CpuArchEnum.X86: if (current_platform.get_cpu_architecture() == CpuArchEnum.X86) \
and hasattr(torch.ops._C, "init_shm_manager"):
self.dist_module = _CPUSHMDistributed(self) self.dist_module = _CPUSHMDistributed(self)
def all_reduce(self, input_): def all_reduce(self, input_):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment