MCPcopy Create free account
hub / github.com/pytorch/examples / _remote_method

Function _remote_method

distributed/rpc/rnn/rnn.py:14–24  ·  view source on GitHub ↗

r""" a helper function to run method on the owner of rref and fetch back the result using RPC

(method, rref, *args, **kwargs)

Source from the content-addressed store, hash-verified

12
13
14def _remote_method(method, rref, *args, **kwargs):
15 r"""
16 a helper function to run method on the owner of rref and fetch back the
17 result using RPC
18 """
19 return rpc.rpc_sync(
20 rref.owner(),
21 _call_method,
22 args=[method, rref] + list(args),
23 kwargs=kwargs
24 )
25
26
27def _parameter_rrefs(module):

Callers 2

forwardMethod · 0.70
parameter_rrefsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected