How to distribute actors to multiple GPUs

I want to distribute actors to multiple GPUs.
For example, I have 4 GPU and want to spawn 4 actors.
Then, it should be 1 actor per 1 GPU.
It sounds like simple when I can use the argument “num_gpus=1”.
However, I have other actors to be assigned.
So, let’s assume that I have 4 actors to be distributed and another 4 actors that also use GPU.
When I use num_gpus=0.5, then ray creates 2 actors in 1 GPU.
Maybe, if I use num_gpus=0.6 for actors to be distributed, and num_gpus=0.4 for other 4 actors, I can make it.
However, if the number of actors is not fixed, I cannot use the fixed number.

This topic is related to the previous topic ( How to assign a specific actor to a specific GPU ), but I cannot use the accelerator type (all GPUs are same).


cc @Alex Can you answer this question?

Hey, I’m not 100% sure I understand the question, but it sounds like you have a set of actors and you want them to be on different GPU’s?

Do you mind describing why you want to do this? If each actor is only supposed to use part of a GPU, why can’t they be on the same GPU?

Hi, in this case, the first group of actors and the second group of actors have different execution time.
Therefore, it is better to distribute actors and let all GPUs have same actor configuration.