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

Method OpPrepare

tensorflow/lite/core/subgraph.cc:674–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674TfLiteStatus Subgraph::OpPrepare(const TfLiteRegistration& op_reg,
675 TfLiteNode* node) {
676 if (op_reg.prepare == nullptr) {
677 // Check if it's an unresolved custom op.
678 if (op_reg.builtin_code == BuiltinOperator_CUSTOM &&
679 op_reg.custom_name != nullptr && op_reg.invoke == &UnresolvedOpInvoke) {
680 if (IsFlexOp(op_reg.custom_name)) {
681 ReportError(
682 "Regular TensorFlow ops are not supported by this interpreter. "
683 "Make sure you invoke the Flex delegate before inference.");
684 } else {
685 ReportError("Encountered unresolved custom op: %s.",
686 op_reg.custom_name);
687 }
688 return kTfLiteError;
689 }
690 // Resolved ops can have a null Prepare function.
691 return kTfLiteOk;
692 }
693 return op_reg.prepare(&context_, node);
694}
695
696TfLiteStatus Subgraph::PrepareOpsStartingAt(
697 int first_execution_plan_index, int* last_execution_plan_index_prepared) {

Callers

nothing calls this directly

Calls 3

IsFlexOpFunction · 0.85
ReportErrorFunction · 0.50
prepareMethod · 0.45

Tested by

no test coverage detected