aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/local_service.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-03-02 16:41:09 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-02 17:06:14 -0800
commit112a534b50c0a23dec95382941ac0556f2866b29 (patch)
tree576a4f7b5ef3cb14966d63208c0a9be54c022da0 /tensorflow/compiler/xla/service/local_service.cc
parentd2d5f1985de99777f97902b9fb6466a7c3eb3d1c (diff)
[XLA:GPU] Cache GPU substreams across executions
Change: 149063035
Diffstat (limited to 'tensorflow/compiler/xla/service/local_service.cc')
-rw-r--r--tensorflow/compiler/xla/service/local_service.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/service/local_service.cc b/tensorflow/compiler/xla/service/local_service.cc
index 02abd0d8a9..d736545345 100644
--- a/tensorflow/compiler/xla/service/local_service.cc
+++ b/tensorflow/compiler/xla/service/local_service.cc
@@ -444,28 +444,32 @@ StatusOr<std::unique_ptr<ShapedBuffer>> LocalService::ExecuteLocallyInternal(
run_options.set_stream(stream.get());
}
+ ServiceExecutableRunOptions service_run_options(
+ run_options, mutable_backend()->StreamBorrower());
+
ExecutionProfile* profile = options.execution_profile();
TF_ASSIGN_OR_RETURN(
std::shared_ptr<Executable> executable,
BuildAndCacheExecutable(versioned_handle, std::move(module_config),
argument_buffers, execute_backend_.get(),
- run_options.stream()->parent(), profile));
+ service_run_options.stream()->parent(), profile));
if (preallocated_result_buffer == nullptr) {
return Service::ExecuteOnStreamWrapper<
StatusOr<std::unique_ptr<ShapedBuffer>>>(
- executable.get(), &run_options, profile,
+ executable.get(), &service_run_options, profile,
[&arguments](Executable* executable,
- const ExecutableRunOptions* run_options,
+ const ServiceExecutableRunOptions* run_options,
HloExecutionProfile* hlo_execution_profile) {
return executable->ExecuteOnStream(run_options, arguments,
hlo_execution_profile);
});
} else {
TF_RETURN_IF_ERROR(Service::ExecuteOnStreamWrapper<tensorflow::Status>(
- executable.get(), &run_options, profile,
+ executable.get(), &service_run_options, profile,
[&arguments, preallocated_result_buffer](
- Executable* executable, const ExecutableRunOptions* run_options,
+ Executable* executable,
+ const ServiceExecutableRunOptions* run_options,
HloExecutionProfile* hlo_execution_profile) {
return executable->ExecuteOnStream(run_options, arguments,
preallocated_result_buffer,