Denys88/rl_games

Multi-GPU usage

fil-mp opened this issue · 12 comments

How can I use multiple GPUs for simulation and training? I am enabling horovod but it seems that it can only use one device.

How did you try to run training on multiple GPUs? Can you share the script you ran?

For example with Isaac Gym you can run it as: ```
horovodrun -np 8 python rlg_train.py --task <task_name> --horovod --headless
-np 8

Thanks for the response.

I have been using the same command but I get this error:
Screenshot from 2021-10-25 16-16-23

OK, I think that's the expected behavior, when MAX_EPOCHS have been reached and the root terminates.

Thanks for the update.We will take a look how remove this message on terminate.

I am getting the same error. How can I bypass this?
Thanks!

You can ignore this for now, since it doesn't affect the training. It is just a message on terminate, which they will probably remove.

In my case, the code stops after this message and the training doesn't continue.

Could you show a whole error callstack?

I've found what causes this issue: only rank 0 process checked number of epochs. Ill make a fix in a few days.

I've found 3 small issues:

  1. exit on max epochs
  2. exit on max rewards
  3. uninitialized variable ( at least in discrete envs)
    I don't have access to the multigpu machine right now and simulated it with multi cpu. But it should work :)
    https://pypi.org/project/rl-games/1.1.4/
1tac11 commented

Is this tested for multi instances or only multi GPUs on one instance? Since I had issues for multi instances.

It was tested on a single node, up to 8 GPUs with Isaac Gym. Each instance of Isaac Gym was running on its own GPU.