Add LOCKS_EXCLUDED to a few FunctionLibraryDefinition methods
PiperOrigin-RevId: 251565676
This commit is contained in:
parent
8ac1075eac
commit
a7dac9a9a0
@ -363,19 +363,20 @@ class FunctionLibraryDefinition : public OpRegistryInterface {
|
|||||||
// a non-OK status if "func" was not found in the library, OK otherwise.
|
// a non-OK status if "func" was not found in the library, OK otherwise.
|
||||||
// Please be careful when replacing function: make sure all previous pointers
|
// Please be careful when replacing function: make sure all previous pointers
|
||||||
// returned by `Find()` are no longer in use.
|
// returned by `Find()` are no longer in use.
|
||||||
Status ReplaceFunction(const string& func, const FunctionDef& fdef);
|
Status ReplaceFunction(const string& func, const FunctionDef& fdef)
|
||||||
|
LOCKS_EXCLUDED(mu_);
|
||||||
|
|
||||||
// Replaces the gradient corresponding to `grad.function_name()`. Returns
|
// Replaces the gradient corresponding to `grad.function_name()`. Returns
|
||||||
// a non-OK status if "grad.function_name()" was not found in the library, OK
|
// a non-OK status if "grad.function_name()" was not found in the library, OK
|
||||||
// otherwise.
|
// otherwise.
|
||||||
Status ReplaceGradient(const GradientDef& grad);
|
Status ReplaceGradient(const GradientDef& grad) LOCKS_EXCLUDED(mu_);
|
||||||
|
|
||||||
// Removes the function corresponding to 'func'. Returns a non-OK status if
|
// Removes the function corresponding to 'func'. Returns a non-OK status if
|
||||||
// 'func' was not found in the library, OK otherwise.
|
// 'func' was not found in the library, OK otherwise.
|
||||||
// Please be careful when removing function: make sure there are no other
|
// Please be careful when removing function: make sure there are no other
|
||||||
// nodes using the function, and all previous pointers returned by `Find()`
|
// nodes using the function, and all previous pointers returned by `Find()`
|
||||||
// are no longer in use.
|
// are no longer in use.
|
||||||
Status RemoveFunction(const string& func);
|
Status RemoveFunction(const string& func) LOCKS_EXCLUDED(mu_);
|
||||||
|
|
||||||
// Adds the functions and gradients in 'other' to this function library.
|
// Adds the functions and gradients in 'other' to this function library.
|
||||||
// Duplicate functions and gradients are ignored.
|
// Duplicate functions and gradients are ignored.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user