aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream_executor_pimpl.h
diff options
context:
space:
mode:
authorGravatar Artem Belevich <tra@google.com>2017-11-07 14:00:29 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-07 14:06:32 -0800
commitc070ab2a58ab5dc66da54db2daac4fa8e9f191e9 (patch)
treeb8c8c4eeb0e076f46ba8b6c0a855883d920aa07b /tensorflow/stream_executor/stream_executor_pimpl.h
parent7183348f3270b7f9c1b333970e4f9abf6b3c4d8a (diff)
Clean up kernels cached by CUDAExecutor.
Notify CUDA executor on deallocation of previously loaded GPUExecutable and unload corresponding module when all executables that were using it are gone. PiperOrigin-RevId: 174908193
Diffstat (limited to 'tensorflow/stream_executor/stream_executor_pimpl.h')
-rw-r--r--tensorflow/stream_executor/stream_executor_pimpl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/stream_executor/stream_executor_pimpl.h b/tensorflow/stream_executor/stream_executor_pimpl.h
index 9c225e5fae..66c50d47e9 100644
--- a/tensorflow/stream_executor/stream_executor_pimpl.h
+++ b/tensorflow/stream_executor/stream_executor_pimpl.h
@@ -104,6 +104,9 @@ class StreamExecutor {
// platform, false is returned.
bool GetKernel(const MultiKernelLoaderSpec &spec, KernelBase *kernel);
+ // Releases any state associated with the previously loaded kernel.
+ void UnloadKernel(const KernelBase *kernel);
+
// Synchronously allocates an array on the device of type T with element_count
// elements.
template <typename T>