diff options
author | Derek Murray <mrry@google.com> | 2018-04-06 17:39:17 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-06 18:18:06 -0700 |
commit | 470cc0f75108e68965f89026399f7b3a7a08196b (patch) | |
tree | e4997f253781b176976f9baf9949d0a0e3751c8a /tensorflow/core/protobuf | |
parent | 38d1ac1e4f5b2a6e88eee43d332292898e0afc41 (diff) |
Add remote session support for the MakeCallable API.
PiperOrigin-RevId: 191964391
Diffstat (limited to 'tensorflow/core/protobuf')
-rw-r--r-- | tensorflow/core/protobuf/master.proto | 68 | ||||
-rw-r--r-- | tensorflow/core/protobuf/master_service.proto | 9 |
2 files changed, 77 insertions, 0 deletions
diff --git a/tensorflow/core/protobuf/master.proto b/tensorflow/core/protobuf/master.proto index 0437cb1b83..96c91536f7 100644 --- a/tensorflow/core/protobuf/master.proto +++ b/tensorflow/core/protobuf/master.proto @@ -23,6 +23,7 @@ option java_package = "org.tensorflow.distruntime"; import "tensorflow/core/framework/device_attributes.proto"; import "tensorflow/core/framework/graph.proto"; +import "tensorflow/core/framework/tensor.proto"; import "tensorflow/core/lib/core/error_codes.proto"; import "tensorflow/core/protobuf/config.proto"; import "tensorflow/core/protobuf/named_tensor.proto"; @@ -264,3 +265,70 @@ message ListDevicesResponse { repeated DeviceAttributes local_device = 1; repeated DeviceAttributes remote_device = 2; } + +//////////////////////////////////////////////////////////////////////////////// +// +// MakeCallable method request/response protos. +// +//////////////////////////////////////////////////////////////////////////////// + +message MakeCallableRequest { + // REQUIRED: session_handle must be returned by a CreateSession call + // to the same master service. + string session_handle = 1; + + // Options that define the behavior of the created callable. + CallableOptions options = 2; +} + +message MakeCallableResponse { + // A handle to the created callable. + int64 handle = 1; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// RunCallable method request/response protos. +// +//////////////////////////////////////////////////////////////////////////////// + +message RunCallableRequest { + // REQUIRED: session_handle must be returned by a CreateSession call + // to the same master service. + string session_handle = 1; + // REQUIRED: handle must be returned by a MakeCallable call to the same + // master service. + int64 handle = 2; + + // Values of the tensors passed as arguments to the callable, in the order + // defined in the CallableOptions.feed field passed to MakeCallable. + repeated TensorProto feed = 3; +} + +message RunCallableResponse { + // Values of the tensors returned by the callable, in the order defined in the + // CallableOptions.fetch field passed to MakeCallable. + repeated TensorProto fetch = 1; + + // Returned metadata if requested in the options. + RunMetadata metadata = 2; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// ReleaseCallable method request/response protos. +// +//////////////////////////////////////////////////////////////////////////////// + +message ReleaseCallableRequest { + // REQUIRED: session_handle must be returned by a CreateSession call + // to the same master service. + string session_handle = 1; + + // REQUIRED: handle must be returned by a MakeCallable call to the same + // master service. + int64 handle = 2; +} + +message ReleaseCallableResponse { +} diff --git a/tensorflow/core/protobuf/master_service.proto b/tensorflow/core/protobuf/master_service.proto index 771c80562a..1170611f37 100644 --- a/tensorflow/core/protobuf/master_service.proto +++ b/tensorflow/core/protobuf/master_service.proto @@ -107,4 +107,13 @@ service MasterService { // will no longer affect fresh ones via the resources in containers listed in // the ResetRequest. See ResetRequest for more details. rpc Reset(ResetRequest) returns (ResetResponse); + + // Registers a callable for execution with RunCallable. + rpc MakeCallable(MakeCallableRequest) returns (MakeCallableResponse); + + // Executes a callable registered with MakeCallable. + rpc RunCallable(RunCallableRequest) returns (RunCallableResponse); + + // Frees resources associated with a callable registered with MakeCallable. + rpc ReleaseCallable(ReleaseCallableRequest) returns (ReleaseCallableResponse); } |