MCPcopy Create free account
hub / github.com/ARM-software/armnn / VisitNode

Method VisitNode

delegate/classic/src/armnn_delegate.cpp:543–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543TfLiteStatus ArmnnSubgraph::VisitNode(DelegateData& delegateData,
544 TfLiteContext* tfLiteContext,
545 TfLiteRegistration* tfLiteRegistration,
546 TfLiteNode* tfLiteNode,
547 int nodeIndex)
548{
549 switch (tfLiteRegistration->builtin_code)
550 {
551 case kTfLiteBuiltinCustom:
552 {
553#if defined(ARMNN_POST_TFLITE_2_5)
554 // Custom operators are defined by the name rather than the builtin code.
555 // Parse the custom_name param in the registration to point to the correct visitor function.
556 std::string customOperatorName = tfLiteRegistration->custom_name;
557 if ( customOperatorName == "AveragePool3D" )
558 {
559 return VisitPooling3dOperator(delegateData,
560 tfLiteContext,
561 tfLiteNode,
562 nodeIndex,
563 customOperatorName);
564 }
565 else if (customOperatorName == "MaxPool3D")
566 {
567 return VisitPooling3dOperator(delegateData,
568 tfLiteContext,
569 tfLiteNode,
570 nodeIndex,
571 customOperatorName);
572 }
573#endif
574 // Invalid or unsupported custom operator
575 return kTfLiteError;
576 }
577 case kTfLiteBuiltinAbs:
578 return VisitElementwiseUnaryOperator(delegateData,
579 tfLiteContext,
580 tfLiteNode,
581 nodeIndex,
582 armnn::UnaryOperation::Abs);
583 case kTfLiteBuiltinAdd:
584 return VisitElementwiseBinaryOperator(delegateData,
585 tfLiteContext,
586 tfLiteNode,
587 nodeIndex,
588 kTfLiteBuiltinAdd);
589 case kTfLiteBuiltinArgMax:
590 return VisitArgMinMaxOperator(delegateData,
591 tfLiteContext,
592 tfLiteNode,
593 nodeIndex,
594 kTfLiteBuiltinArgMax);
595 case kTfLiteBuiltinArgMin:
596 return VisitArgMinMaxOperator(delegateData,
597 tfLiteContext,
598 tfLiteNode,
599 nodeIndex,
600 kTfLiteBuiltinArgMin);

Callers

nothing calls this directly

Calls 15

VisitPooling3dOperatorFunction · 0.70
VisitArgMinMaxOperatorFunction · 0.70
VisitPooling2dOperatorFunction · 0.70
VisitBatchMatMulOperatorFunction · 0.70
VisitBroadcastToOperatorFunction · 0.70
VisitCastOperatorFunction · 0.70
VisitControlOperatorFunction · 0.70
VisitConvolutionOperatorFunction · 0.70

Tested by

no test coverage detected