Avoid defining RpcCUDAFuture subclass in TensorPipe agent (#56513)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56513
The RpcCUDAFuture class existed solely to support extracting DataPtrs from a Message class. However, this can be done more simply by using a vanilla CUDAFuture and just extracting those DataPtrs before marking it complete and passing them to markCompleted.
This allows to make the DataPtr extraction logic of CUDAFuture private again.
ghstack-source-id: 127035771
Test Plan: Unit tests
Reviewed By: mrshenli
Differential Revision: D27861064
fbshipit-source-id: b0b4df2cab7be6b4b16d5cfc888483c18fbce60e