diff options
-rw-r--r-- | tensorflow/core/distributed_runtime/remote_device_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/core/distributed_runtime/remote_device_test.cc b/tensorflow/core/distributed_runtime/remote_device_test.cc index 778060daaf..a04e79328b 100644 --- a/tensorflow/core/distributed_runtime/remote_device_test.cc +++ b/tensorflow/core/distributed_runtime/remote_device_test.cc @@ -49,8 +49,9 @@ class RemoteDeviceTest : public ::testing::Test { TF_CHECK_OK(spec.AddHostPortsJob("localhost", {hostport})); ChannelCreationFunction channel_func = ConvertToChannelCreationFunction(NewHostPortGrpcChannel); - worker_cache_.reset( - NewGrpcWorkerCache(NewGrpcChannelCache(spec, channel_func))); + std::shared_ptr<GrpcChannelCache> channel_cache( + NewGrpcChannelCache(spec, channel_func)); + worker_cache_.reset(NewGrpcWorkerCache(channel_cache)); remote_name_ = "/job:localhost/replica:0/task:0"; wi_ = worker_cache_->CreateWorker(remote_name_); } |