Skip to content

Commit

Permalink
[DeepRec] Set graph signature to speed up getting executor in session. (
Browse files Browse the repository at this point in the history
  • Loading branch information
shanshanpt authored Feb 20, 2023
1 parent b8717f3 commit 7020004
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ load("//tensorflow_serving:repo.bzl", "tensorflow_http_archive")

tensorflow_http_archive(
name = "org_tensorflow",
sha256 = "836a1a5425a4f853abfe1dd03e2222bb9004540163fc2c56d57979b390cd5a31",
git_commit = "c3a656197cae9647fad47ec7d84ccd722a502815",
sha256 = "34662c11d52bf5314b62203daa17cdf03dfaaa51492096b5c230e808282e6814",
git_commit = "5f165904121f9d4c5e9c6ac4363ad2edd70f6cfc",
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand Down
7 changes: 7 additions & 0 deletions tensorflow_serving/servables/tensorflow/predict_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ Status RunPredict(
bool trace_timeline = Tracer::GetTracer()->NeedTracing();
std::vector<Tensor> outputs;
RunMetadata run_metadata;
// set running graph signature
*run_metadata.mutable_graph_signature() =
signature_name + request.model_spec().name();
if (servable_version) {
*run_metadata.mutable_graph_signature() +=
std::to_string(*servable_version);
}
if (likely(!trace_timeline)) {
TF_RETURN_IF_ERROR(session->Run(run_options, input_tensors,
output_tensor_names, {}, &outputs,
Expand Down

0 comments on commit 7020004

Please sign in to comment.