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

Aperta
#129 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python, pytorch
Ambito
performance

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Python
Stelle
502
Fork
108
Merge medio
1g 1h
PR unite (30g)
12

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

Tutte le issue di TorchSim/torch-sim

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.