`initialize_state` starts to impact memory usage at very high atom numbers > 100,000,000

Abierto
#129 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python, pytorch
Área
performance

Línea de trabajo

Start by reading torch_sim.state.initialize_state and the HotSwappingAutobatcher and ChunkingAutoBatcher entry points mentioned in the issue. Clarify how state tensors are created and whether the chunking autobatcher can consume a stream of states. Done should mean the proposed approach avoids requiring the full state to reside on the GPU; the issue does not specify tests or acceptance criteria.

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

Descripción

enhancement refactor

From @yutackpark, regarding the integrate function.

The torch_sim.state.initialize_state function sends all the state tensors to the GPU. If the state is too large, this is another potential place for an OOM error.

My current recommendation would be to use the low-level API to circumvent this issue. That would give a lot more control over memory management and is what I would encourage if the initialize_state memory usage became an issue.

The memory footprint of the state is ~ 50-100 bytes / atom, so one would need to reach hundreds of millions of atoms to significantly impact GPU memory usage. It's not ideal to have such a hard limit. The HotSwappingAutobatcher allows for a stream of states and thus gets around this memory issue, we could take a similar approach for the ChunkingAutoBatcher.

Lenguaje dominante
Python
Estrellas
502
Forks
108
Merge medio
1 d 1 h
PR fusionados (30 d)
12

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 TorchSim/torch-sim

Todos los issues de TorchSim/torch-sim

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.