-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Let actors use GPUs. #302
Let actors use GPUs. #302
Conversation
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
python/ray/experimental/state.py
Outdated
|
||
def get_local_schedulers(): | ||
def get_local_schedulers(worker): | ||
local_schedulers = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is duplicated
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
This is a quick hack to allow actors to use GPUs so we can figure out what the right API here is.
In this PR:
ray.actor(num_gpus=2)
.ray.get_gpu_ids()
to get a list of the GPU IDs that the actor is allowed to use. The idea is that this could be used in the constructor of an actor (which defines a neural net) via something like