aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/function.h
diff options
context:
space:
mode:
authorGravatar Rohan Jain <rohanj@google.com>2017-12-01 14:18:39 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-01 14:24:51 -0800
commit5b420f6bb29cd0c3796dd2d7cb2aa4bf0adf620f (patch)
treedf3e44acdcd90ef7b524675d261cc08a698bae78 /tensorflow/core/framework/function.h
parented9163acfd510c26c49201ec9e360e20a2625ca8 (diff)
Adds a ReleaseHandle method to the FunctionLibraryRuntime interface that allows for releasing the state associated with the handle.
Also simplifies the state owned by the FunctionLibraryRuntimeImpl. Instead of having a vector of ref counted Item objects and a separate vector of function bodies, we merge it into one object that holds the entire instantiated state for the function. PiperOrigin-RevId: 177639560
Diffstat (limited to 'tensorflow/core/framework/function.h')
-rw-r--r--tensorflow/core/framework/function.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/framework/function.h b/tensorflow/core/framework/function.h
index 305b140a44..d3d6358362 100644
--- a/tensorflow/core/framework/function.h
+++ b/tensorflow/core/framework/function.h
@@ -408,6 +408,9 @@ class FunctionLibraryRuntime {
virtual Status Instantiate(const string& function_name, AttrSlice attrs,
Handle* handle) = 0;
+ // Releases state associated with the handle.
+ virtual Status ReleaseHandle(Handle handle) = 0;
+
// Returns the function body for the instantiated function given its
// handle 'h'. Returns nullptr if "h" is not found.
//