Home
last modified time | relevance | path

Searched refs:TfLiteContext (Results 1 – 25 of 438) sorted by relevance

12345678910>>...18

/external/tensorflow/tensorflow/lite/c/
Dcommon.h63 struct TfLiteContext;
74 TfLiteStatus (*Refresh)(struct TfLiteContext* context);
621 typedef struct TfLiteContext { struct
640 TfLiteStatus (*GetExecutionPlan)(struct TfLiteContext* context, argument
651 TfLiteStatus (*ResizeTensor)(struct TfLiteContext*, TfLiteTensor* tensor, argument
654 void (*ReportError)(struct TfLiteContext*, const char* msg, ...); argument
659 TfLiteStatus (*AddTensors)(struct TfLiteContext*, int tensors_to_add, argument
665 struct TfLiteContext*, int node_index, TfLiteNode** node, argument
671 struct TfLiteContext*, struct TfLiteRegistration registration, argument
680 TfLiteExternalContext* (*GetExternalContext)(struct TfLiteContext*, argument
[all …]
/external/tensorflow/tensorflow/lite/delegates/coreml/builders/
Dop_validator.h25 const TfLiteNode* node, TfLiteContext* context);
27 const TfLiteNode* node, TfLiteContext* context);
30 TfLiteContext* context);
33 TfLiteContext* context);
35 const TfLiteNode* node, TfLiteContext* context);
37 const TfLiteNode* node, TfLiteContext* context);
39 const TfLiteNode* node, TfLiteContext* context);
41 const TfLiteNode* node, TfLiteContext* context,
45 TfLiteContext* context);
48 TfLiteContext* context);
/external/tensorflow/tensorflow/lite/kernels/
Dkernel_util.h40 const TfLiteTensor* GetInput(const TfLiteContext* context,
51 TfLiteStatus GetInputSafe(const TfLiteContext* context, const TfLiteNode* node,
61 TfLiteTensor* GetVariableInput(TfLiteContext* context, const TfLiteNode* node,
71 TfLiteTensor* GetOutput(TfLiteContext* context, const TfLiteNode* node,
82 TfLiteStatus GetOutputSafe(const TfLiteContext* context, const TfLiteNode* node,
94 const TfLiteTensor* GetOptionalInputTensor(const TfLiteContext* context,
105 TfLiteTensor* GetTemporary(TfLiteContext* context, const TfLiteNode* node,
118 TfLiteStatus GetTemporarySafe(const TfLiteContext* context,
129 const TfLiteTensor* GetIntermediates(TfLiteContext* context,
142 TfLiteStatus GetIntermediatesSafe(const TfLiteContext* context,
[all …]
Dkernel_util.cc36 inline TfLiteTensor* GetTensorAtIndex(const TfLiteContext* context, in GetTensorAtIndex()
46 inline TfLiteStatus ValidateTensorIndexingSafe(const TfLiteContext* context, in ValidateTensorIndexingSafe()
51 TF_LITE_KERNEL_LOG(const_cast<TfLiteContext*>(context), in ValidateTensorIndexingSafe()
57 TF_LITE_KERNEL_LOG(const_cast<TfLiteContext*>(context), in ValidateTensorIndexingSafe()
69 inline int ValidateTensorIndexing(const TfLiteContext* context, int index, in ValidateTensorIndexing()
80 inline TfLiteTensor* GetMutableInput(const TfLiteContext* context, in GetMutableInput()
90 inline TfLiteStatus GetMutableInputSafe(const TfLiteContext* context, in GetMutableInputSafe()
103 const TfLiteTensor* GetInput(const TfLiteContext* context, in GetInput()
108 TfLiteStatus GetInputSafe(const TfLiteContext* context, const TfLiteNode* node, in GetInputSafe()
113 TfLiteTensor* GetVariableInput(TfLiteContext* context, const TfLiteNode* node, in GetVariableInput()
[all …]
Delementwise.cc84 TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) { in GenericPrepare()
136 inline TfLiteStatus EvalImpl(TfLiteContext* context, TfLiteNode* node, in EvalImpl()
158 inline TfLiteStatus EvalImpl(TfLiteContext* context, TfLiteNode* node, in EvalImpl()
165 inline TfLiteStatus EvalNumeric(TfLiteContext* context, TfLiteNode* node, in EvalNumeric()
170 inline TfLiteStatus EvalLogical(TfLiteContext* context, TfLiteNode* node, in EvalLogical()
175 void* ElementWiseQuantizedInit(TfLiteContext* context, const char* buffer, in ElementWiseQuantizedInit()
180 void ElementWiseQuantizedFree(TfLiteContext* context, void* buffer) { in ElementWiseQuantizedFree()
185 TfLiteStatus AbsEvalQuantized(TfLiteContext* context, TfLiteNode* node, in AbsEvalQuantized()
206 TfLiteStatus AbsEval(TfLiteContext* context, TfLiteNode* node) { in AbsEval()
222 TfLiteStatus SinEval(TfLiteContext* context, TfLiteNode* node) { in SinEval()
[all …]
Dreshape.cc34 TfLiteIntArray* GetOutputShape(TfLiteContext*, TfLiteNode*);
36 TfLiteStatus ResizeOutput(TfLiteContext* context, TfLiteNode* node) { in ResizeOutput()
73 inline TfLiteIntArray* GetOutputShapeFromTensor(TfLiteContext* context, in GetOutputShapeFromTensor()
86 inline TfLiteIntArray* GetOutputShapeFromParam(TfLiteContext* context, in GetOutputShapeFromParam()
108 inline bool ShapeIsVector(TfLiteContext* context, TfLiteNode* node) { in ShapeIsVector()
114 TfLiteIntArray* GetOutputShape(TfLiteContext* context, TfLiteNode* node) { in GetOutputShape()
122 TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { in Prepare()
144 TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { in Eval()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dmodel_builder_test.cc145 TfLiteContext* context() { return interpreter_.primary_subgraph().context(); } in context()
218 [](TfLiteContext* context, const char* buffer, size_t length) { in InterpreterFp16()
221 [](TfLiteContext* context, void* buffer) { in InterpreterFp16()
298 TfLiteContext* context = interpreter_fp16_add_op->context(); in TEST()
302 context->GetExecutionPlan = [](struct TfLiteContext* context, in TEST()
307 context->GetNodeAndRegistration = [](struct TfLiteContext*, int node_index, in TEST()
315 [](struct TfLiteContext* context, const TfLiteIntArray* nodes_to_replace, in TEST() argument
357 TfLiteContext* context = interpreter_fp16_non_constant->context(); in TEST()
361 context->GetExecutionPlan = [](struct TfLiteContext* context, in TEST()
366 context->GetNodeAndRegistration = [](struct TfLiteContext*, int node_index, in TEST()
[all …]
Dquantization_util.h36 TfLiteContext* context, const std::vector<uint32_t>& input_indices,
40 TfLiteContext* context, const std::vector<int64_t>& input_indices,
49 TfLiteContext* context, const std::vector<uint32_t>& output_indices,
53 TfLiteContext* context, const std::vector<int64_t>& output_indices,
/external/tensorflow/tensorflow/lite/micro/
Dtest_helpers.h62 static void* Init(TfLiteContext* context, const char* buffer, size_t length);
63 static TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node);
64 static TfLiteStatus Invoke(TfLiteContext* context, TfLiteNode* node);
71 static void* Init(TfLiteContext* context, const char* buffer, size_t length);
72 static void Free(TfLiteContext* context, void* buffer);
73 static TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node);
74 static TfLiteStatus Invoke(TfLiteContext* context, TfLiteNode* node);
85 static void* Init(TfLiteContext* context, const char* buffer, size_t length);
86 static void Free(TfLiteContext* context, void* buffer);
87 static TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node);
[all …]
Dmicro_interpreter.h49 static void* AllocatePersistentBuffer(TfLiteContext* ctx, size_t bytes);
50 static TfLiteStatus RequestScratchBufferInArena(TfLiteContext* ctx,
53 static void* GetScratchBuffer(TfLiteContext* ctx, int buffer_idx);
54 static void ReportOpError(struct TfLiteContext* context, const char* format,
56 static TfLiteTensor* GetTensor(const struct TfLiteContext* context,
58 static TfLiteEvalTensor* GetEvalTensor(const struct TfLiteContext* context,
177 const TfLiteContext& context() const { return context_; } in context()
189 TfLiteContext context_ = {};
/external/tensorflow/tensorflow/lite/micro/kernels/
Dkernel_runner.h49 static TfLiteTensor* GetTensor(const struct TfLiteContext* context,
51 static TfLiteEvalTensor* GetEvalTensor(const struct TfLiteContext* context,
53 static void* AllocatePersistentBuffer(TfLiteContext* context, size_t bytes);
54 static TfLiteStatus RequestScratchBufferInArena(TfLiteContext* context,
57 static void* GetScratchBuffer(TfLiteContext* context, int buffer_index);
58 static void ReportOpError(struct TfLiteContext* context, const char* format,
71 TfLiteContext context_ = {};
Delementwise.cc40 TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) { in GenericPrepare()
57 inline TfLiteStatus EvalImpl(TfLiteContext* context, TfLiteNode* node, in EvalImpl()
71 inline TfLiteStatus EvalNumeric(TfLiteContext* context, TfLiteNode* node, in EvalNumeric()
76 inline TfLiteStatus EvalLogical(TfLiteContext* context, TfLiteNode* node, in EvalLogical()
81 TfLiteStatus AbsEval(TfLiteContext* context, TfLiteNode* node) { in AbsEval()
85 TfLiteStatus SinEval(TfLiteContext* context, TfLiteNode* node) { in SinEval()
89 TfLiteStatus CosEval(TfLiteContext* context, TfLiteNode* node) { in CosEval()
93 TfLiteStatus LogEval(TfLiteContext* context, TfLiteNode* node) { in LogEval()
97 TfLiteStatus SqrtEval(TfLiteContext* context, TfLiteNode* node) { in SqrtEval()
101 TfLiteStatus RsqrtEval(TfLiteContext* context, TfLiteNode* node) { in RsqrtEval()
[all …]
/external/tensorflow/tensorflow/lite/delegates/coreml/
Dcoreml_delegate_kernel.h34 TfLiteStatus Init(TfLiteContext* context, const TfLiteDelegateParams* params);
37 TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node);
40 TfLiteStatus Invoke(TfLiteContext* context, TfLiteNode* node);
46 TfLiteStatus BuildModel(TfLiteContext* context,
51 TfLiteContext* context);
55 TfLiteContext* context);
/external/tensorflow/tensorflow/lite/delegates/hexagon/
Dhexagon_delegate_kernel.h48 TfLiteStatus Init(TfLiteContext* context,
52 TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) override;
55 TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) override;
68 TfLiteStatus BuildGraph(TfLiteContext* context,
72 void ReportError(TfLiteContext* context, const std::string& msg);
76 TfLiteStatus ResizeOutputTensors(TfLiteContext* context, TfLiteNode* node);
/external/tensorflow/tensorflow/lite/delegates/
Dutils.h38 TfLiteStatus CreateNewTensorWithDifferentType(TfLiteContext* context,
45 std::function<bool(TfLiteContext*, TfLiteNode*, TfLiteRegistration*,
52 GraphPartitionHelper(TfLiteContext* context, in GraphPartitionHelper()
56 GraphPartitionHelper(TfLiteContext* context, in GraphPartitionHelper()
95 virtual bool IsNodeSupported(TfLiteContext* context, TfLiteNode* node, in IsNodeSupported()
104 TfLiteContext* const context_ = nullptr;
142 FP16GraphPartitionHelper(TfLiteContext* context, in FP16GraphPartitionHelper()
148 bool IsNodeSupported(TfLiteContext* context, TfLiteNode* node,
Dutils_test.cc36 TfLiteContext context; in TEST()
37 context.AddTensors = [](struct TfLiteContext*, int tensors_to_add, in TEST()
48 context.ResizeTensor = [](struct TfLiteContext*, TfLiteTensor* tensor, in TEST() argument
76 class MockTfLiteContext : public TfLiteContext {
78 MockTfLiteContext() : TfLiteContext({0}) { in MockTfLiteContext()
132 static TfLiteStatus MockGetExecutionPlan(TfLiteContext* context, in MockGetExecutionPlan()
140 TfLiteContext* context, int node_index, TfLiteNode** node, in MockGetNodeAndRegistration()
149 TfLiteContext* context, const TfLiteIntArray* nodes_to_replace, in MockPreviewDelegatePartitioning()
170 bool IsNodeSupported(TfLiteContext* context, TfLiteNode* node, in IsNodeSupported()
211 TfLiteStatus ErrorGetExecutionPlan(TfLiteContext* context, in ErrorGetExecutionPlan()
[all …]
Ddelegate_test_util.cc49 reg.prepare = [](TfLiteContext* context, TfLiteNode* node) { in AddOpRegistration()
69 reg.invoke = [](TfLiteContext* context, TfLiteNode* node) { in AddOpRegistration()
140 delegate_.Prepare = [](TfLiteContext* context, in SimpleDelegate()
218 delegate_.CopyToBufferHandle = [](TfLiteContext* context, in SimpleDelegate()
225 delegate_.CopyFromBufferHandle = [](TfLiteContext* context, in SimpleDelegate()
240 [](TfLiteContext* context, TfLiteDelegate* delegate, in SimpleDelegate()
254 reg.invoke = [](TfLiteContext* context, TfLiteNode* node) -> TfLiteStatus { in FakeFusedRegistration()
258 reg.invoke = [](TfLiteContext* context, TfLiteNode* node) -> TfLiteStatus { in FakeFusedRegistration()
289 reg.prepare = [](TfLiteContext* context, TfLiteNode* node) { in FakeFusedRegistration()
304 reg.prepare = [](TfLiteContext* context, TfLiteNode* node) { in FakeFusedRegistration()
[all …]
/external/tensorflow/tensorflow/lite/delegates/hexagon/builders/
Dconv_2d_builder.h45 TfLiteContext* context) override;
48 TfLiteContext* context) override;
55 TfLiteContext* context,
60 TfLiteContext* context);
88 TfLiteContext* context, float* weights_min, float* weights_max,
93 TfLiteContext* context, float* bias_min, float* bias_max,
Dmatmul_builder.h34 TfLiteContext* context) override;
37 TfLiteContext* context) override;
53 TfLiteContext* context) override;
56 TfLiteContext* context) override;
65 TfLiteContext* context, OpBuilder* matmul_op);
/external/libtextclassifier/native/utils/tflite/
Dblacklist_base.h63 virtual TfLiteStatus InitializeInput(TfLiteContext* context,
69 virtual TfLiteIntArray* GetInputShape(TfLiteContext* context,
80 void Free(TfLiteContext* context, void* buffer);
82 TfLiteStatus Resize(TfLiteContext* context, TfLiteNode* node);
84 TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node);
Dstring_projection_base.h114 virtual TfLiteStatus InitializeInput(TfLiteContext* context,
120 virtual TfLiteIntArray* GetInputShape(TfLiteContext* context,
144 void Free(TfLiteContext* context, void* buffer);
146 TfLiteStatus Resize(TfLiteContext* context, TfLiteNode* node);
148 TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node);
/external/tensorflow/tensorflow/lite/delegates/nnapi/
Dnnapi_delegate_kernel.h111 TfLiteContext* context;
266 static TfLiteStatus Map(TfLiteContext* context, int builtin_code, int version,
273 const TfLiteContext* context, int builtin_code, int version,
284 TfLiteStatus Init(TfLiteContext* context, const TfLiteDelegateParams* params,
291 TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node,
298 TfLiteStatus Invoke(TfLiteContext* context, TfLiteNode* node,
310 TfLiteContext* context, std::vector<int>* supported_nodes,
354 const TfLiteContext* context, int builtin_code, const TfLiteNode* node,
357 TfLiteStatus AddOpsAndTensors(TfLiteContext* context, int* nnapi_errno,
360 TfLiteStatus BuildGraph(TfLiteContext* context,
/external/tensorflow/tensorflow/lite/delegates/utils/
Dsimple_delegate.h49 virtual TfLiteStatus Init(TfLiteContext* context,
55 virtual TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) = 0;
59 virtual TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) = 0;
88 TfLiteContext* context) const = 0;
93 virtual TfLiteStatus Initialize(TfLiteContext* context) = 0;
/external/tensorflow/tensorflow/lite/delegates/flex/
Dkernel.h32 TfLiteStatus Init(TfLiteContext* context,
34 TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) override;
35 TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) override;
41 TfLiteContext* context) const;
/external/tensorflow/tensorflow/lite/delegates/utils/dummy_delegate/
Ddummy_delegate.cc30 TfLiteStatus Init(TfLiteContext* context, in Init()
35 TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) override { in Prepare()
39 TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) override { in Eval()
55 TfLiteContext* context) const override { in IsNodeSupportedByDelegate()
59 TfLiteStatus Initialize(TfLiteContext* context) override { return kTfLiteOk; } in Initialize()

12345678910>>...18