aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/kernel_benchmark_testlib.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/common_runtime/kernel_benchmark_testlib.cc')
-rw-r--r--tensorflow/core/common_runtime/kernel_benchmark_testlib.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/tensorflow/core/common_runtime/kernel_benchmark_testlib.cc b/tensorflow/core/common_runtime/kernel_benchmark_testlib.cc
index 7b5cc1c5cb..4a5b88d5fd 100644
--- a/tensorflow/core/common_runtime/kernel_benchmark_testlib.cc
+++ b/tensorflow/core/common_runtime/kernel_benchmark_testlib.cc
@@ -39,7 +39,8 @@ namespace tensorflow {
namespace test {
Benchmark::Benchmark(const string& device, Graph* g,
- const SessionOptions* options, Graph* init) {
+ const SessionOptions* options, Graph* init,
+ Rendezvous* rendez) {
SessionOptions default_options;
if (!options) {
options = &default_options;
@@ -61,7 +62,11 @@ Benchmark::Benchmark(const string& device, Graph* g,
pool_->Schedule(closure);
};
- rendez_ = NewLocalRendezvous();
+ if (rendez == nullptr) {
+ rendez_ = NewLocalRendezvous();
+ } else {
+ rendez_ = rendez;
+ }
const int graph_def_version = g->versions().producer();