aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/debug
diff options
context:
space:
mode:
authorGravatar Shanqing Cai <cais@google.com>2016-09-14 15:35:43 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-09-14 16:46:05 -0700
commitad9e90257e189809157abc25d85e42ebfe4c99c7 (patch)
tree89acf4c47540a722e686d1648340a76c2a67a489 /tensorflow/core/debug
parentd6e4ed19a98c80bb88c0185538275d80e36c5900 (diff)
tfdbg: 1st step toward GRPC debug targets: Protobuf service definition
This CL defines the basic protocol buffer message and service that will be used in the communication between the debug ops and a debug server. The debug server is designed to run, e.g., inside the TensorBoard backend. It listens to intermediate tensor values (and potentially other information) encapsulated as Event protos published by the debug ops. The response message from the debug server is currently just an empty acknowledgment, but can hold fields if so desired in the future. Change: 133191013
Diffstat (limited to 'tensorflow/core/debug')
-rw-r--r--tensorflow/core/debug/BUILD11
-rw-r--r--tensorflow/core/debug/debug_service.proto35
2 files changed, 46 insertions, 0 deletions
diff --git a/tensorflow/core/debug/BUILD b/tensorflow/core/debug/BUILD
index 8467da8ff8..d84098fcb4 100644
--- a/tensorflow/core/debug/BUILD
+++ b/tensorflow/core/debug/BUILD
@@ -23,12 +23,22 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test_gpu")
load(
"//tensorflow/core:platform/default/build_config.bzl",
"tf_kernel_tests_linkstatic",
+ "tf_proto_library_cc",
)
load(
"//tensorflow/core:platform/default/build_config_root.bzl",
"tf_cuda_tests_tags",
)
+tf_proto_library_cc(
+ name = "debug_service_proto",
+ srcs = ["debug_service.proto"],
+ has_services = 1,
+ cc_api_version = 2,
+ cc_grpc_version = 1,
+ cc_libs = ["//tensorflow/core:protos_all_cc"],
+)
+
tf_cuda_library(
name = "debug_gateway_internal",
srcs = ["debug_gateway.cc"],
@@ -72,6 +82,7 @@ tf_cuda_library(
copts = tf_copts(),
linkstatic = 1,
deps = [
+ ":debug_service_proto_cc",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
diff --git a/tensorflow/core/debug/debug_service.proto b/tensorflow/core/debug/debug_service.proto
new file mode 100644
index 0000000000..af84280163
--- /dev/null
+++ b/tensorflow/core/debug/debug_service.proto
@@ -0,0 +1,35 @@
+/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+syntax = "proto3";
+
+package tensorflow;
+
+import "tensorflow/core/util/event.proto";
+
+// Reply message from EventListener to the client, i.e., to the source of the
+// Event protocal buffers, e.g., debug ops inserted by a debugged runtime to a
+// TensorFlow graph being executed.
+message EventReply {
+}
+
+// EventListener: Receives Event protos, e.g., from debugged TensorFlow
+// runtime(s).
+service EventListener {
+ // Client(s) can use this RPC method to send the EventListener Event protos.
+ // The Event protos can hold information such as intermediate tensors from
+ // a debugged graph being executed.
+ rpc SendEvents(stream Event) returns (stream EventReply);
+}