Skip to content

Commit 7020004

Browse files
authored
[DeepRec] Set graph signature to speed up getting executor in session. (#18)
1 parent b8717f3 commit 7020004

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ load("//tensorflow_serving:repo.bzl", "tensorflow_http_archive")
1111

1212
tensorflow_http_archive(
1313
name = "org_tensorflow",
14-
sha256 = "836a1a5425a4f853abfe1dd03e2222bb9004540163fc2c56d57979b390cd5a31",
15-
git_commit = "c3a656197cae9647fad47ec7d84ccd722a502815",
14+
sha256 = "34662c11d52bf5314b62203daa17cdf03dfaaa51492096b5c230e808282e6814",
15+
git_commit = "5f165904121f9d4c5e9c6ac4363ad2edd70f6cfc",
1616
)
1717

1818
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

tensorflow_serving/servables/tensorflow/predict_util.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ Status RunPredict(
212212
bool trace_timeline = Tracer::GetTracer()->NeedTracing();
213213
std::vector<Tensor> outputs;
214214
RunMetadata run_metadata;
215+
// set running graph signature
216+
*run_metadata.mutable_graph_signature() =
217+
signature_name + request.model_spec().name();
218+
if (servable_version) {
219+
*run_metadata.mutable_graph_signature() +=
220+
std::to_string(*servable_version);
221+
}
215222
if (likely(!trace_timeline)) {
216223
TF_RETURN_IF_ERROR(session->Run(run_options, input_tensors,
217224
output_tensor_names, {}, &outputs,

0 commit comments

Comments
 (0)