pytorch / pytorch/gloo

BUG: SHM support does not compile on Arm64

Open
#486 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.5k
Forks
368
Avg merge
19h 32m
Merged PRs (30d)
3

Description

Hello,

https://github.com/pytorch/gloo/pull/458 broke arm64 compilation by including x86-specific headers - namely <immintrin.h>. This header is used to implement parallel_memcpy. When I hacked around this locally to make parallel_memcpy invoke memcpy directly, AllreduceNewTest.TestTimeout consistently segfaulted in ~AllreduceSharedMemoryData.

This issue will likely also block the corresponding PyTorch PR https://github.com/pytorch/pytorch/pull/172297

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in gloo/allreduce_shm.cc at parallel_memcpy and inspect the use of <immintrin.h>. Build the SHM support for Arm64, then run AllreduceNewTest.TestTimeout and investigate the reported segfault in ~AllreduceSharedMemoryData. Done means Arm64 SHM compilation succeeds without x86-specific headers and the timeout test no longer segfaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.