[Bug] TorchBackend.all_gather_base references nonexistent self.has_allgather_base and all_gather_coalesced only waits reqs[-1] / crashes on Gloo & non-member ranks

Aperta
#9,193 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, pytorch

Direzione di ricerca

Start with deepspeed/comm/torch.py, focusing on TorchBackend.all_gather_base() and TorchBackend.all_gather_coalesced(). Run the provided three-rank Gloo reproduction to confirm the missing-attribute and non-member-rank failures. Done means all_gather_base() uses a valid capability check, and all_gather_coalesced() safely handles unsupported groups or backends and waits for every relevant request.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

In deepspeed/comm/torch.py:468,481-503:

  1. TorchBackend.all_gather_base() (line 468): Checks if self.has_allgather_base:, an attribute never initialized in TorchBackend.__init__, unconditionally raising AttributeError.
  2. TorchBackend.all_gather_coalesced() (lines 490-502):
    • Calls get_coalescing_manager unconditionally even when group does not include the current rank (NON_GROUP_MEMBER -> AttributeError: 'int' object has no attribute '_get_backend') or on Gloo (_coalescing_manager unsupported).
    • Waits/returns only reqs[-1] instead of waiting on all handles in reqs (or the coalescing manager work handle).
Affected Location
  • Repository: deepspeedai/DeepSpeed (master, deepspeed/comm/torch.py:468,481-503)
Minimal Standalone Reproduction

3-rank Gloo group with subgroup pg01 = dist.new_group([0, 1]):

  • all_gather_base raises AttributeError: ... has no attribute 'has_allgather_base' on all ranks.
  • all_gather_coalesced(..., group=pg01) raises AttributeError on non-member rank 2 ('int' object has no attribute '_get_backend').
Suggested Fix
  1. Replace self.has_allgather_base with self.has_all_gather_into_tensor() (or check hasattr(torch.distributed.distributed_c10d, "_all_gather_base")).
  2. Guard all_gather_coalesced for NON_GROUP_MEMBER and backend support, and wait on all handles in reqs when async_op=False.
Lingua principale
Python
Stelle
43.3k
Fork
5.1k
Merge medio
5g 10h
PR unite (30g)
85

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di deepspeedai/DeepSpeed

Tutte le issue di deepspeedai/DeepSpeed

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.