| 1307 | } |
| 1308 | |
| 1309 | Status FunctionLibraryDefinition::ReplaceGradient(const GradientDef& grad) { |
| 1310 | mutex_lock l(mu_); |
| 1311 | bool added; |
| 1312 | TF_RETURN_IF_ERROR(RemoveGradient(grad.function_name())); |
| 1313 | TF_RETURN_IF_ERROR(AddGradientDefHelper(grad, &added)); |
| 1314 | return Status::OK(); |
| 1315 | } |
| 1316 | |
| 1317 | Status FunctionLibraryDefinition::RemoveFunction(const string& func) { |
| 1318 | mutex_lock l(mu_); |
no test coverage detected