aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/function.cc
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2018-10-10 08:17:09 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-10 08:20:50 -0700
commitafcc1a4452de7898391683f7cbb16ff548f839a1 (patch)
treee65547621501d7a9d9ccba50939391f77ecc9323 /tensorflow/core/common_runtime/function.cc
parent1ae0a45a5de65ab4ae6def232da016e7ee32773c (diff)
Allow the executor type for a function to be specified as an attr on a function.
This change complements the existing `InstantiateOptions::executor_type` option, which takes precedence over the attr if both are provided. It enables the choice of executor to be separated from both the calling op implementation and the function definition, which simplifies the use of custom executors in operations that take a function as an attr (e.g.) `tf.data` and the functional control-flow ops. PiperOrigin-RevId: 216532778
Diffstat (limited to 'tensorflow/core/common_runtime/function.cc')
-rw-r--r--tensorflow/core/common_runtime/function.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/common_runtime/function.cc b/tensorflow/core/common_runtime/function.cc
index 472865ca43..e0e5f4a215 100644
--- a/tensorflow/core/common_runtime/function.cc
+++ b/tensorflow/core/common_runtime/function.cc
@@ -551,7 +551,7 @@ Status FunctionLibraryRuntimeImpl::Instantiate(
item->func_graph = fbody;
item->overlay_lib = options.overlay_lib;
item->instantiation_counter = 1;
- item->executor_type = options.executor_type;
+ item->executor_type = ExecutorType(options, attrs);
items_.emplace(next_handle_, std::unique_ptr<Item>(item));
next_handle_++;
}