mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:30:26 +08:00
Simplify process(Script|Python)(Remote)?Call (#57857)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/57857 There used to be a whole lot of methods: `processPythonCall`, `processScriptCall`, `processScriptRemoteCall`, `processPythonRemoteCall`, `processScriptCallOp`, `processBaseScriptRemoteCall` and `processScriptRemoteCallOp`. Thanks to the previous simplification, we can now drop all but the first four, which map nicely 1:1 to the four message types we need to handle. Also their signatures become much simpler: they take an RPC command and return a future. ghstack-source-id: 129567070 Test Plan: CI Reviewed By: mrshenli Differential Revision: D28253848 fbshipit-source-id: e0e45345c414a96900f9d70ee555359d28908833
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c96a05d148
commit
cd9dbbd93a
@ -15,24 +15,17 @@ class TORCH_API RequestCallbackImpl : public RequestCallbackNoPython {
|
||||
std::unique_ptr<RpcCommandBase> rpc,
|
||||
const MessageType& messageType) const override;
|
||||
|
||||
void processPythonCall(
|
||||
RpcCommandBase& rpc,
|
||||
const std::function<void(Message)>& markComplete,
|
||||
const c10::intrusive_ptr<JitFuture>& responseFuture) const override;
|
||||
c10::intrusive_ptr<JitFuture> processPythonCall(
|
||||
RpcCommandBase& rpc) const override;
|
||||
|
||||
void processScriptCall(
|
||||
RpcCommandBase& rpc,
|
||||
const std::function<void(Message)>& markComplete,
|
||||
const c10::intrusive_ptr<JitFuture>& responseFuture) const override;
|
||||
c10::intrusive_ptr<JitFuture> processScriptCall(
|
||||
RpcCommandBase& rpc) const override;
|
||||
|
||||
c10::intrusive_ptr<JitFuture> processScriptRemoteCall(
|
||||
ScriptRemoteCall& scriptRemoteCall,
|
||||
std::vector<at::IValue>& stack) const override;
|
||||
RpcCommandBase& rpc) const override;
|
||||
|
||||
void processPythonRemoteCall(
|
||||
c10::intrusive_ptr<JitFuture> processPythonRemoteCall(
|
||||
RpcCommandBase& rpc,
|
||||
const std::function<void(Message)>& markComplete,
|
||||
const c10::intrusive_ptr<JitFuture>& responseFuture,
|
||||
std::shared_ptr<LazyStreamContext> ctx) const override;
|
||||
|
||||
void processPythonRRefFetchCall(
|
||||
|
Reference in New Issue
Block a user