email@example.com提交于 1 day前 ：[rpc] make handling of FORWARD_AUTOGRAD_REQ in request_callback_impl (#32476)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32476
This makes the handling of FORWARD_AUTOGRAD_REQ in request_callback
nonblocking. Processing this message requires unwrapping the message with
autograd information, processing the original message, and sending back the
message with autograd information wrapped. This makes the processing the
original message nonblocking by grabbing a future to it and marking the parent
future as completed when this one completes.
Test Plan: `test_rpc_spawn.py` and `test_dist_autograd_spawn.py` both pass.
Differential Revision: D19509501