10 #include <tensorflow/lite/builtin_ops.h> 11 #include <tensorflow/lite/c/builtin_op_data.h> 12 #include <tensorflow/lite/c/common.h> 13 #include <tensorflow/lite/minimal_logging.h> 37 TfLiteStatus
DoPrepare(TfLiteContext* context, TfLiteDelegate* delegate);
46 TfLiteIntArray* IdentifyOperatorsToDelegate(TfLiteContext* context);
48 TfLiteDelegate* GetDelegate();
54 TfLiteDelegate m_Delegate = {
55 reinterpret_cast<void*
>(
this),
60 kTfLiteDelegateFlagsNone,
74 const TfLiteDelegateParams* parameters,
77 TfLiteStatus Prepare(TfLiteContext* tfLiteContext);
79 TfLiteStatus Invoke(TfLiteContext* tfLiteContext, TfLiteNode* tfLiteNode);
81 static TfLiteStatus VisitNode(
DelegateData& delegateData,
82 TfLiteContext* tfLiteContext,
83 TfLiteRegistration* tfLiteRegistration,
84 TfLiteNode* tfLiteNode,
90 std::vector<armnn::BindingPointInfo>& inputBindings,
91 std::vector<armnn::BindingPointInfo>& outputBindings)
92 : m_NetworkId(networkId), m_Runtime(runtime), m_InputBindings(inputBindings), m_OutputBindings(outputBindings)
95 static TfLiteStatus AddInputLayer(
DelegateData& delegateData,
96 TfLiteContext* tfLiteContext,
97 const TfLiteIntArray* inputs,
98 std::vector<armnn::BindingPointInfo>& inputBindings);
100 static TfLiteStatus AddOutputLayer(
DelegateData& delegateData,
101 TfLiteContext* tfLiteContext,
102 const TfLiteIntArray* outputs,
103 std::vector<armnn::BindingPointInfo>& outputBindings);
112 std::vector<armnn::BindingPointInfo> m_InputBindings;
113 std::vector<armnn::BindingPointInfo> m_OutputBindings;
TfLiteStatus DoPrepare(TfLiteContext *context, TfLiteDelegate *delegate)
DelegateData(const std::vector< armnn::BackendId > &backends)
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
std::vector< armnn::IOutputSlot * > m_OutputSlotForNode
const std::string GetVersion()
armnn::INetworkPtr m_Network
const std::vector< armnn::BackendId > m_Backends
TfLiteDelegate * TfLiteArmnnDelegateCreate(armnnDelegate::DelegateOptions options)
void TfLiteArmnnDelegateDelete(TfLiteDelegate *tfLiteDelegate)
DelegateOptions TfLiteArmnnDelegateOptionsDefault()
ArmnnSubgraph class where parsing the nodes to ArmNN format and creating the ArmNN Graph...
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr