RemoteCall: Cache function handles.
authorBrennan Saeta <saeta@google.com>
Tue, 6 Mar 2018 23:44:15 +0000 (15:44 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 6 Mar 2018 23:48:34 +0000 (15:48 -0800)
commit18d97ec74e1f08e7ab2c7700c5355394c8284231
treedae1d79536865f48f758c4a45d7a667ecefa72d1
parent130539dd89914bdb63250a91fe94a7ddf1fdadbc
RemoteCall: Cache function handles.

Currently, whenever a functional_ops.remote_call(...) is executed against a remote worker, the function will be instantiated each and every time against the remote worker causing a memory leak on both the caller and the callee. Instead, we cache the function handles and reuse them.

PiperOrigin-RevId: 188093266
tensorflow/core/kernels/function_ops.cc
tensorflow/core/ops/functional_ops.cc