[XLA:GPU] Load kernel thunks' kernels before running them.
authorJustin Lebar <jlebar@google.com>
Fri, 11 May 2018 22:04:41 +0000 (15:04 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 11 May 2018 22:13:52 +0000 (15:13 -0700)
commitb24dec71a9d88a4d2c48b5fc4dbb87cc0db4aaa9
tree210f420257e0901a0d7d46638681477c12bdeba1
parentcd9ac6414531a8f7308a7698f0954084443d5120
[XLA:GPU] Load kernel thunks' kernels before running them.

The motivation here is that with --xla_hlo_profile, we count the time
spent in Thunk::ExecuteOnStream, but we don't want to count the time
spent loading the CUDA code into the GPU as time spent in the first
kernel thunk we try to run.

PiperOrigin-RevId: 196314733
12 files changed:
tensorflow/compiler/xla/service/gpu/conditional_thunk.cc
tensorflow/compiler/xla/service/gpu/conditional_thunk.h
tensorflow/compiler/xla/service/gpu/for_thunk.cc
tensorflow/compiler/xla/service/gpu/for_thunk.h
tensorflow/compiler/xla/service/gpu/gpu_executable.cc
tensorflow/compiler/xla/service/gpu/kernel_thunk.cc
tensorflow/compiler/xla/service/gpu/kernel_thunk.h
tensorflow/compiler/xla/service/gpu/sequential_thunk.cc
tensorflow/compiler/xla/service/gpu/sequential_thunk.h
tensorflow/compiler/xla/service/gpu/thunk.h
tensorflow/compiler/xla/service/gpu/while_thunk.cc
tensorflow/compiler/xla/service/gpu/while_thunk.h