[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

Abierto
#9,193 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, pytorch

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
43.4k
Forks
5.1k
Merge medio
5 d 10 h
PR fusionados (30 d)
85

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de deepspeedai/DeepSpeed

Todos los issues de deepspeedai/DeepSpeed

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.