aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream_executor_internal.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_internal.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_internal.h')
-rw-r--r--tensorflow/stream_executor/stream_executor_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/stream_executor/stream_executor_internal.h b/tensorflow/stream_executor/stream_executor_internal.h
index 12593e31d4..14445a7657 100644
--- a/tensorflow/stream_executor/stream_executor_internal.h
+++ b/tensorflow/stream_executor/stream_executor_internal.h
@@ -169,6 +169,8 @@ class StreamExecutorInterface {
const KernelArgsArrayBase &args) {
return false;
}
+ // Releases any state associated with the kernel.
+ virtual void UnloadKernel(const KernelBase *kernel) {}
virtual void *Allocate(uint64 size) = 0;
virtual void *AllocateSubBuffer(DeviceMemoryBase *parent, uint64 offset,
uint64 size) = 0;