MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AddToFunctionLibrary

Function AddToFunctionLibrary

tensorflow/core/kernels/data/dataset_utils.cc:602–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602Status AddToFunctionLibrary(FunctionLibraryDefinition* base,
603 const FunctionLibraryDefinition& to_add) {
604 for (const auto& fn : to_add.ListFunctionNames()) {
605 if (auto found = base->Find(fn)) {
606 if (!OpDefEqual(found->signature(), to_add.Find(fn)->signature())) {
607 return errors::InvalidArgument("Cannot add function '", fn,
608 "' because a different function with "
609 "the same signature already exists.");
610 }
611 TF_RETURN_IF_ERROR(base->RemoveFunction(fn));
612 }
613 }
614 return base->AddLibrary(to_add);
615}
616
617Status AddToFunctionLibrary(FunctionLibraryDefinition* base,
618 const FunctionDefLibrary& to_add) {

Callers 3

TESTFunction · 0.85
ComputeMethod · 0.85
RewriteDatasetFunction · 0.85

Calls 9

OpDefEqualFunction · 0.85
InvalidArgumentFunction · 0.85
ListFunctionNamesMethod · 0.80
signatureMethod · 0.80
AddLibraryMethod · 0.80
nameMethod · 0.65
FindMethod · 0.45
RemoveFunctionMethod · 0.45
functionMethod · 0.45

Tested by 1

TESTFunction · 0.68