/external/tensorflow/tensorflow/lite/kernels/ |
D | subgraph_test_util_test.cc | 30 : interpreter_(new Interpreter), builder_(new SubgraphBuilder) {} in SubgraphBuilderTest() 33 interpreter_.reset(); in ~SubgraphBuilderTest() 40 interpreter_.reset(new Interpreter); in TestAccumelateLoopBody() 42 &interpreter_->primary_subgraph()); in TestAccumelateLoopBody() 44 interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1}); in TestAccumelateLoopBody() 45 interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {1}); in TestAccumelateLoopBody() 46 ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); in TestAccumelateLoopBody() 48 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[0]), {input1}); in TestAccumelateLoopBody() 49 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {input2}); in TestAccumelateLoopBody() 51 ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); in TestAccumelateLoopBody() [all …]
|
D | if_test.cc | 38 interpreter_->AddSubgraphs(2); in SetUp() 39 builder_->BuildAddSubgraph(interpreter_->subgraph(1)); in SetUp() 40 builder_->BuildMulSubgraph(interpreter_->subgraph(2)); in SetUp() 41 builder_->BuildIfSubgraph(&interpreter_->primary_subgraph()); in SetUp() 43 interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1}); in SetUp() 44 interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {2}); in SetUp() 45 interpreter_->ResizeInputTensor(interpreter_->inputs()[2], {1, 2}); in SetUp() 46 ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); in SetUp() 48 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {5, 7}); in SetUp() 49 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[2]), {1, 2}); in SetUp() [all …]
|
D | while_test.cc | 42 interpreter_.reset(new Interpreter); in TEST_F() 43 interpreter_->AddSubgraphs(2); in TEST_F() 44 builder_->BuildLessEqualCondSubgraph(interpreter_->subgraph(1), i); in TEST_F() 45 builder_->BuildAccumulateLoopBodySubgraph(interpreter_->subgraph(2)); in TEST_F() 46 builder_->BuildWhileSubgraph(&interpreter_->primary_subgraph()); in TEST_F() 48 interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1}); in TEST_F() 49 interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {1}); in TEST_F() 50 ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); in TEST_F() 51 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[0]), {1}); in TEST_F() 52 FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {1}); in TEST_F() [all …]
|
D | test_util.cc | 123 CHECK(InterpreterBuilder(model, *resolver_)(&interpreter_) == kTfLiteOk); in BuildInterpreter() 125 CHECK(interpreter_ != nullptr); in BuildInterpreter() 128 const int input_idx = interpreter_->inputs()[i]; in BuildInterpreter() 132 CHECK(interpreter_->ResizeInputTensor(input_idx, shape) == kTfLiteOk); in BuildInterpreter() 135 interpreter_->SetAllowFp16PrecisionForFp32(allow_fp32_relax_to_fp16); in BuildInterpreter() 137 CHECK(interpreter_->AllocateTensors() == kTfLiteOk) in BuildInterpreter() 139 interpreter_->ResetVariableTensors(); in BuildInterpreter() 143 apply_delegate_fn_(interpreter_.get()); in BuildInterpreter() 147 void SingleOpModel::Invoke() { CHECK(interpreter_->Invoke() == kTfLiteOk); } in Invoke() 150 TfLiteTensor* t = interpreter_->tensor(index); in GetTensorSize() [all …]
|
D | test_util.h | 181 TfLiteTensor* t = interpreter_->tensor(index); in QuantizeAndPopulate() 201 TfLiteTensor* t = interpreter_->tensor(index); in PerChannelSymmetricQuantizeAndPopulate() 228 TfLiteTensor* t = interpreter_->tensor(index); in PerChannelQuantizeBias() 258 auto tensor = interpreter_->tensor(index); in PopulateStringTensor() 270 T* v = interpreter_->typed_tensor<T>(index); in PopulateTensor() 272 auto* t = interpreter_->tensor(index); in PopulateTensor() 290 T* v = interpreter_->typed_tensor<T>(index); in PopulateTensor() 292 auto* t = interpreter_->tensor(index); in PopulateTensor() 308 T* v = interpreter_->typed_tensor<T>(index); in PopulateTensor() 315 T* v = interpreter_->typed_tensor<T>(index); in ExtractVector() [all …]
|
D | subgraph_test_util.h | 93 : interpreter_(new Interpreter), builder_(new SubgraphBuilder) {} in ControlFlowOpTest() 96 interpreter_.reset(); in ~ControlFlowOpTest() 101 std::unique_ptr<Interpreter> interpreter_;
|
D | hashtable_lookup_test.cc | 61 TfLiteTensor* tensor = interpreter_->tensor(value_); in SetHashtableValue() 69 TfLiteTensor* tensor = interpreter_->tensor(value_); in SetHashtableValue() 80 TfLiteTensor* output = interpreter_->tensor(output_); in GetStringOutput()
|
/external/tensorflow/tensorflow/lite/ |
D | interpreter_test.cc | 42 TfLiteContext* GetInterpreterContext() { return interpreter_.context_; } in GetInterpreterContext() 44 Interpreter interpreter_; member in tflite::InterpreterTest 897 interpreter_.SetNumThreads(4); in TEST_F() 901 interpreter_.SetNumThreads(4); in TEST_F() 902 interpreter_.SetNumThreads(5); in TEST_F() 907 interpreter_.SetNumThreads(4); in TEST_F() 973 ASSERT_EQ(interpreter_.AddNodeWithParameters( in MakeCopyNode() 977 ASSERT_EQ(interpreter_.ResizeInputTensor(input, {3}), kTfLiteOk); in MakeCopyNode() 982 ASSERT_EQ(interpreter_.AddTensors(4), kTfLiteOk); in SetUp() 983 interpreter_.SetInputs({0, 1}); in SetUp() [all …]
|
/external/tensorflow/tensorflow/lite/python/interpreter_wrapper/ |
D | interpreter_wrapper.cc | 35 if (i >= interpreter_->tensors_size() || i < 0) { \ 38 interpreter_->tensors_size()); \ 43 if (!interpreter_) { \ 116 interpreter_(std::move(interpreter)) {} in InterpreterWrapper() 122 TFLITE_PY_CHECK(interpreter_->AllocateTensors()); in AllocateTensors() 128 TFLITE_PY_CHECK(interpreter_->Invoke()); in Invoke() 134 PyObject* np_array = PyArrayFromIntVector(interpreter_->inputs().data(), in InputIndices() 135 interpreter_->inputs().size()); in InputIndices() 141 PyObject* np_array = PyArrayFromIntVector(interpreter_->outputs().data(), in OutputIndices() 142 interpreter_->outputs().size()); in OutputIndices() [all …]
|
/external/tensorflow/tensorflow/lite/delegates/flex/ |
D | test_util.cc | 26 bool FlexModelTest::Invoke() { return interpreter_->Invoke() == kTfLiteOk; } in Invoke() 34 dynamic_buffer.WriteToTensor(interpreter_->tensor(tensor_index), in SetStringValues() 41 TfLiteTensor* tensor = interpreter_->tensor(tensor_index); in GetStringValues() 52 ASSERT_EQ(interpreter_->ResizeInputTensor(tensor_index, values), kTfLiteOk); in SetShape() 53 ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); in SetShape() 58 auto* dims = interpreter_->tensor(tensor_index)->dims; in GetShape() 67 return interpreter_->tensor(tensor_index)->type; in GetType() 73 interpreter_->AddTensors(num_tensors); in AddTensors() 81 CHECK_EQ(interpreter_->SetTensorParametersReadWrite(i, type, in AddTensors() 87 CHECK_EQ(interpreter_->SetInputs(inputs), kTfLiteOk); in AddTensors() [all …]
|
D | delegate_test.cc | 31 interpreter_.reset(new Interpreter(&error_reporter_)); in DelegateTest() 37 interpreter_.reset(); in ~DelegateTest() 42 ASSERT_EQ(interpreter_->ModifyGraphWithDelegate(delegate_.get()), in ConfigureDelegate() 224 interpreter_.swap(interpreter); in TEST_F() 239 interpreter_.swap(interpreter); in TEST_F() 247 interpreter_.swap(interpreter); in TEST_F() 264 interpreter_->SetNumThreads(1); in TEST_F() 289 interpreter_->SetNumThreads(4); in TEST_F()
|
D | test_util.h | 50 memcpy(interpreter_->typed_tensor<T>(tensor_index), values.data(), in SetTypedValues() 57 const TfLiteTensor* t = interpreter_->tensor(tensor_index); in GetTypedValues() 58 const T* tdata = interpreter_->typed_tensor<T>(tensor_index); in GetTypedValues() 104 std::unique_ptr<Interpreter> interpreter_;
|
D | kernel_test.cc | 58 interpreter_.reset(new Interpreter(&error_reporter_)); in KernelTest() 93 CHECK(interpreter_->ModifyGraphWithDelegate(&delegate_) == kTfLiteOk); in ConfigureDelegate() 147 ASSERT_NE(interpreter_->AllocateTensors(), kTfLiteOk); in TEST_F() 196 ASSERT_NE(interpreter_->AllocateTensors(), kTfLiteOk); in TEST_F()
|
/external/tensorflow/tensorflow/lite/tools/accuracy/ |
D | run_tflite_model_op.cc | 80 tflite::InterpreterBuilder(*model_, resolver)(&interpreter_); in RunTFLiteModelOp() 81 OP_REQUIRES(ctx, interpreter_, in RunTFLiteModelOp() 89 OP_REQUIRES_OK(context, ValidateInputsMatch(input_tensors, *interpreter_)); in Compute() 93 auto tfl_outputs = interpreter_->outputs(); in Compute() 100 interpreter_->tensor(tfl_outputs[i])->type); in Compute() 108 auto allocation_status = interpreter_->AllocateTensors(); in Compute() 112 const int tfl_index = interpreter_->inputs()[i]; in Compute() 113 TfLiteTensor* tflite_tensor = interpreter_->tensor(tfl_index); in Compute() 122 auto invocation_status = interpreter_->Invoke(); in Compute() 126 auto tfl_tensor = interpreter_->tensor(tfl_outputs[i]); in Compute() [all …]
|
/external/tensorflow/tensorflow/lite/experimental/writer/ |
D | writer_lib.cc | 54 operator_to_opcode.resize(interpreter_->nodes_size(), -1); in ExportOperators() 55 for (int op_index : interpreter_->execution_plan()) { in ExportOperators() 57 interpreter_->node_and_registration(op_index); in ExportOperators() 68 for (int op_index : interpreter_->execution_plan()) { in ExportOperators() 70 interpreter_->node_and_registration(op_index); in ExportOperators() 93 custom_writer->second(fbb, interpreter_, op_index, &custom_options, in ExportOperators() 122 tensor_to_written_tensor_.resize(interpreter_->tensors_size(), -1); in ExportTensors() 127 std::vector<bool> tensor_is_temporary(interpreter_->tensors_size(), false); in ExportTensors() 128 for (int op_index = 0; op_index < interpreter_->nodes_size(); ++op_index) { in ExportTensors() 130 interpreter_->node_and_registration(op_index); in ExportTensors() [all …]
|
D | writer_lib.h | 53 : interpreter_(interpreter) { in InterpreterWriter() 110 Interpreter* interpreter_; variable
|
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/ |
D | tflite_driver.cc | 216 interpreter_.reset(); in ~TfLiteDriver() 221 if (interpreter_->AllocateTensors() != kTfLiteOk) { in AllocateTensors() 238 InterpreterBuilder(*model_, *resolver_)(&interpreter_); in LoadModel() 239 if (!interpreter_) { in LoadModel() 245 if (interpreter_->ModifyGraphWithDelegate(delegate_.get()) != kTfLiteOk) { in LoadModel() 257 auto* tensor = interpreter_->tensor(id); in ResetTensor() 263 if (interpreter_->ResizeInputTensor( in ReshapeTensor() 273 auto* tensor = interpreter_->tensor(id); in SetInput() 317 auto* tensor = interpreter_->tensor(id); in SetExpectation() 350 if (interpreter_->ModifyGraphWithDelegate(NnApiDelegate()) != kTfLiteOk) { in Invoke() [all …]
|
D | tflite_driver.h | 42 return interpreter_->inputs(); in GetInputs() 45 return interpreter_->outputs(); in GetOutputs() 77 std::unique_ptr<Interpreter> interpreter_; variable
|
/external/tensorflow/tensorflow/lite/testing/ |
D | tflite_driver.cc | 215 interpreter_.reset(); in ~TfLiteDriver() 220 if (interpreter_->AllocateTensors() != kTfLiteOk) { in AllocateTensors() 237 InterpreterBuilder(*model_, *resolver_)(&interpreter_); in LoadModel() 238 if (!interpreter_) { in LoadModel() 242 interpreter_->UseNNAPI(use_nnapi_); in LoadModel() 245 if (interpreter_->ModifyGraphWithDelegate(delegate_.get()) != kTfLiteOk) { in LoadModel() 256 auto* tensor = interpreter_->tensor(id); in ResetTensor() 262 if (interpreter_->ResizeInputTensor( in ReshapeTensor() 272 auto* tensor = interpreter_->tensor(id); in SetInput() 323 auto* tensor = interpreter_->tensor(id); in SetExpectation() [all …]
|
D | tflite_driver.h | 40 return interpreter_->inputs(); in GetInputs() 43 return interpreter_->outputs(); in GetOutputs() 75 std::unique_ptr<Interpreter> interpreter_; variable
|
/external/tensorflow/tensorflow/lite/python/optimize/ |
D | calibration_wrapper.cc | 38 if (!interpreter_) { \ 66 : interpreter_(std::move(interpreter)), in CalibrationWrapper() 76 TFLITE_PY_CHECK(interpreter_->AllocateTensors()); in Prepare() 77 TFLITE_PY_CHECK(interpreter_->ResetVariableTensors()); in Prepare() 91 if (inputs_size != interpreter_->inputs().size()) { in FeedTensor() 94 interpreter_->inputs().size(), inputs_size); in FeedTensor() 103 int input_tensor_idx = interpreter_->inputs()[i]; in FeedTensor() 109 TFLITE_PY_CHECK(interpreter_->Invoke()); in FeedTensor() 125 const TfLiteTensor* tensor = interpreter_->tensor(index); in SetTensor()
|
/external/tensorflow/tensorflow/lite/testing/kernel_test/ |
D | input_generator.cc | 94 InterpreterBuilder(*model_, builtin_ops)(&interpreter_); in LoadModel() 95 if (!interpreter_) { in LoadModel() 141 auto input_tensor_ids = interpreter_->inputs(); in GenerateInput() 143 auto* tensor = interpreter_->tensor(id); in GenerateInput()
|
D | input_generator.h | 43 std::unique_ptr<Interpreter> interpreter_; variable
|
/external/tensorflow/tensorflow/lite/tools/benchmark/ |
D | benchmark_tflite_model.h | 33 explicit ProfilingListener() : interpreter_(nullptr), has_profiles_(false) {} in ProfilingListener() 44 Interpreter* interpreter_;
|
/external/v8/src/wasm/ |
D | wasm-debug.cc | 98 WasmInterpreter interpreter_; member in v8::internal::wasm::__anonf9bf0af50111::InterpreterHandle 104 WasmInterpreter::Thread* thread = interpreter_.GetThread(0); in StartActivation() 112 WasmInterpreter::Thread* thread = interpreter_.GetThread(0); in FinishActivation() 145 interpreter_(isolate, module_, GetBytes(debug_info), in InterpreterHandle() 150 WasmInterpreter* interpreter() { return &interpreter_; } in interpreter() 198 WasmInterpreter::Thread* thread = interpreter_.GetThread(0); in Execute()
|