Repository navigation
[DONOTMERGE] (mostly) Python PoC for GPU objects in Ray - #51902
stephanie-wang wants to merge 1 commit into
Conversation
Signed-off-by: Stephanie wang <[email protected]>
| @ray.remote | ||
| class Actor: | ||
|
|
||
| def register_custom_serializer(self): |
There was a problem hiding this comment.
We should have a one-line call from the driver that enables the custom serialization.
There was a problem hiding this comment.
Maybe can do this as part of the ray.init_communicator call.
|
TODOs before merge:
|
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
Why are these changes needed?
Compared to #51078, same functionality but implemented mainly in Python. For this to work, the user needs to add an annotation to actor methods that return a torch.Tensor, similar to the
with_tensor_transporthint in compiled graphs. This allows the driver to check when ObjectRefs that contain a torch.Tensor are passed to a downstream task. Before the downstream task is submitted, the driver submits send/recv tasks to the src/dst actors.In contrast, #51078 works transparently without any user annotations. However, this means that we can't use normal Ray tasks to submit the send/recv tasks, so these have to be implemented as RPCs in C++ instead.