aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime
diff options
context:
space:
mode:
authorGravatar Akshay Modi <nareshmodi@google.com>2018-06-18 11:48:36 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-18 11:55:03 -0700
commit148b4381fd0259cae441e459ec8ebe2c5d557722 (patch)
treec66c96ea6c60c63385b528dce195af802b8acf3b /tensorflow/core/distributed_runtime
parentfc03fbff3dd7a58fa4f16226df4ada1f21f8b53f (diff)
Automated g4 rollback of changelist 201011811
PiperOrigin-RevId: 201033171
Diffstat (limited to 'tensorflow/core/distributed_runtime')
-rw-r--r--tensorflow/core/distributed_runtime/rpc/grpc_master_service_impl.cc4
-rw-r--r--tensorflow/core/distributed_runtime/rpc/grpc_testlib.cc10
2 files changed, 3 insertions, 11 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_master_service_impl.cc b/tensorflow/core/distributed_runtime/rpc/grpc_master_service_impl.cc
index 770a0fcf14..1cea1b1462 100644
--- a/tensorflow/core/distributed_runtime/rpc/grpc_master_service_impl.cc
+++ b/tensorflow/core/distributed_runtime/rpc/grpc_master_service_impl.cc
@@ -147,9 +147,7 @@ MasterService::Stub::Stub(
}
MasterService::AsyncService::AsyncService() {
- int method_len = sizeof(grpcMasterService_method_names) /
- sizeof(grpcMasterService_method_names[0]);
- for (int i = 0; i < method_len; ++i) {
+ for (int i = 0; i < 10; ++i) {
AddMethod(new ::grpc::internal::RpcServiceMethod(
grpcMasterService_method_names[i],
::grpc::internal::RpcMethod::NORMAL_RPC, nullptr));
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_testlib.cc b/tensorflow/core/distributed_runtime/rpc/grpc_testlib.cc
index a8508d2d4f..89f83f9f24 100644
--- a/tensorflow/core/distributed_runtime/rpc/grpc_testlib.cc
+++ b/tensorflow/core/distributed_runtime/rpc/grpc_testlib.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include "tensorflow/core/distributed_runtime/rpc/grpc_session.h"
#include "tensorflow/core/lib/strings/str_util.h"
-#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/util/device_name_utils.h"
namespace tensorflow {
@@ -51,14 +50,9 @@ Status TestCluster::MakeTestCluster(const SessionOptions& options, int n,
}
for (int i = 0; i < n; ++i) {
- string server_file =
- strings::StrCat(testing::TensorFlowSrcRoot(),
- "/core/distributed_runtime/rpc/grpc_testlib_server");
- if (!options.env->FileExists(server_file).ok()) {
- return errors::Internal("Could not find grpc_testlib_server");
- }
const std::vector<string> argv(
- {server_file,
+ {strings::StrCat(testing::TensorFlowSrcRoot(),
+ "/core/distributed_runtime/rpc/grpc_testlib_server"),
/* see grpc_testlib_server.cc for flags */
tf_jobs, "--tf_job=localhost", strings::StrCat("--tf_task=", i),
strings::StrCat("--num_cpus=", num_cpus),