You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a beginner, I had a lot of trouble modifying the parallel simulation process. When I set distributed=True, I can indeed receive a SimulationState with a shape of (gpus, batch, ...). However, because SimulationState is defined as a very complex pytree, this makes it difficult to use pmap and vmap to split state by dims, Making any custom functions difficult to parallelize.
This discussion was converted from issue #46 on June 17, 2025 21:54.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As a beginner, I had a lot of trouble modifying the parallel simulation process. When I set distributed=True, I can indeed receive a SimulationState with a shape of (gpus, batch, ...). However, because SimulationState is defined as a very complex pytree, this makes it difficult to use pmap and vmap to split state by dims, Making any custom functions difficult to parallelize.
For example some of my attempts:
then the pmap will fail because states' type is not supported for pmap.
And I also tried:
It works for pmap and vmap, But I have to manually split states by devices in inner function, which is also a hard job for such a complex pytree.
Does the official have any examples or any tips for distributed simulation? Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions