Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PPO MPI (SB2 PPO1) #11

Open
araffin opened this issue Nov 26, 2020 · 2 comments
Open

Implement PPO MPI (SB2 PPO1) #11

araffin opened this issue Nov 26, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Help from contributors is needed

Comments

@araffin
Copy link
Member

araffin commented Nov 26, 2020

MPI can be quite useful to use multiprocessing full potential
but it is dependency that can be tricky to install.

@vwxyzjn
Copy link
Contributor

vwxyzjn commented Apr 19, 2022

Hey @araffin I prototyped multi-GPU support with torch.distributed vwxyzjn/cleanrl#162. Preliminary experiments seem successful when controlling torch thread number to 1 per process and use SyncVecEnv:

ppo_atari_multigpu_batch_reduce.py was able to obtain 20-30% speed up at no cost of sample efficiency by leveraging data parallelism given by torch.distributed.

image

@araffin
Copy link
Member Author

araffin commented Apr 20, 2022

@vwxyzjn ooh nice =)
I didn't know you could do that with PyTorch (it looks like they included MPI but for GPU).
I will try to have a look later this week.
Does this work also with cpu only?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Help from contributors is needed
Projects
None yet
Development

No branches or pull requests

2 participants