aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/direct_session.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-07-30 18:05:24 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-30 18:12:27 -0700
commit08db4a7b13c18a149ded2e5c023e4267364e47d6 (patch)
tree2ad0fa8fe2f6a6c1656dbd0331fe4d5489940652 /tensorflow/core/common_runtime/direct_session.cc
parent5271a6f81412c2835916d5a677ecc7e13ffaaf79 (diff)
Use configured executor type in direct_session. Adds executor_type to config protobuf API to specify executor to use.
PiperOrigin-RevId: 206681376
Diffstat (limited to 'tensorflow/core/common_runtime/direct_session.cc')
-rw-r--r--tensorflow/core/common_runtime/direct_session.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/core/common_runtime/direct_session.cc b/tensorflow/core/common_runtime/direct_session.cc
index d1fd930d25..0695278c0d 100644
--- a/tensorflow/core/common_runtime/direct_session.cc
+++ b/tensorflow/core/common_runtime/direct_session.cc
@@ -26,6 +26,7 @@ limitations under the License.
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/common_runtime/device_resolver_local.h"
#include "tensorflow/core/common_runtime/executor.h"
+#include "tensorflow/core/common_runtime/executor_factory.h"
#include "tensorflow/core/common_runtime/function.h"
#include "tensorflow/core/common_runtime/graph_optimizer.h"
#include "tensorflow/core/common_runtime/memory_types.h"
@@ -1223,10 +1224,9 @@ Status DirectSession::CreateExecutors(
item->graph = partition_graph.get();
item->executor = nullptr;
item->device = device;
- Executor* executor;
- TF_RETURN_IF_ERROR(
- NewLocalExecutor(params, std::move(partition_graph), &executor));
- item->executor.reset(executor);
+ auto executor_type = options_.config.experimental().executor_type();
+ TF_RETURN_IF_ERROR(NewExecutor(
+ executor_type, params, std::move(partition_graph), &item->executor));
}
// Cache the mapping from input/output names to graph elements to