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

Method FindFunctionBody

tensorflow/compiler/tf2xla/xla_compiler.cc:527–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527Status XlaCompiler::FindFunctionBody(const NameAttrList& function,
528 const FunctionBody** fbody) {
529 // The function may be in either the local_flib_runtime_ or flib_runtime_.
530 // Look up the function in local first and if it is not found then look up the
531 // function in flib_runtime_.
532 auto status = GetFunctionBody(function, local_flib_runtime_, fbody);
533 if (!status.ok()) {
534 if (!errors::IsNotFound(status)) {
535 return status;
536 }
537 TF_RETURN_WITH_CONTEXT_IF_ERROR(
538 GetFunctionBody(function, flib_runtime_, fbody),
539 "Local lookup failed with: ", status.error_message());
540 VLOG(4) << "Function " << function.name() << " in flib_runtime_";
541 } else {
542 VLOG(4) << "Function " << function.name() << " in local_flib_runtime_";
543 }
544 return Status::OK();
545}
546
547std::unique_ptr<Graph> XlaCompiler::GetGraph(const FunctionBody* fbody) {
548 std::unique_ptr<Graph> graph(new Graph(options_.flib_def));

Callers 3

CompileFunctionalNodeMethod · 0.80
GetLoopInvariantsFunction · 0.80

Calls 3

GetFunctionBodyFunction · 0.70
nameMethod · 0.65
okMethod · 0.45

Tested by

no test coverage detected