Home
last modified time | relevance | path

Searched refs:execution (Results 1 – 25 of 54) sorted by relevance

123

/packages/modules/NeuralNetworks/runtime/test/
DTestValidation.cpp357 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsInput() local
358 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsInput()
360 ASSERT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsInput()
362 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsInput()
364 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), expectedResult); in executeWithMemoryAsInput()
365 ANeuralNetworksExecution_free(execution); in executeWithMemoryAsInput()
371 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsOutput() local
372 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsOutput()
374 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsOutput()
376 ASSERT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsOutput()
[all …]
DTestTrivialModel.cpp121 Execution execution(&compilation); in TEST_F() local
122 ASSERT_EQ(execution.setInput(0, matrix1, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F()
123 ASSERT_EQ(execution.setInput(1, matrix2, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F()
124 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F()
125 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F()
158 Execution execution(&compilation); in testAddTwoWithHardwareBufferInput() local
159 ASSERT_EQ(execution.setInputFromMemory(0, &matrix1Memory, 0, sizeof(Matrix3x4)), in testAddTwoWithHardwareBufferInput()
161 ASSERT_EQ(execution.setInput(1, matrix2, sizeof(Matrix3x4)), Result::NO_ERROR); in testAddTwoWithHardwareBufferInput()
162 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in testAddTwoWithHardwareBufferInput()
178 ANeuralNetworksExecution* executionHandle = execution.getHandle(); in testAddTwoWithHardwareBufferInput()
[all …]
DTestExecution.cpp682 void getDimensionsWhileRunning(WrapperExecution& execution) { in getDimensionsWhileRunning() argument
686 EXPECT_EQ(execution.getOutputOperandDimensions(0, &dimensions), WrapperResult::BAD_STATE); in getDimensionsWhileRunning()
708 void setInputOutput(WrapperExecution* execution) { in setInputOutput() argument
711 ASSERT_EQ(execution->setInput(0, &mInputBuffer, sizeof(mInputBuffer)), in setInputOutput()
713 ASSERT_EQ(execution->setOutput(0, &mOutputBuffer, sizeof(mOutputBuffer)), in setInputOutput()
762 WrapperExecution execution(&mCompilation); in TestWait() local
763 ASSERT_EQ(execution.setReusable(reusable), WrapperResult::NO_ERROR); in TestWait()
764 ASSERT_NO_FATAL_FAILURE(setInputOutput(&execution)); in TestWait()
765 const auto compute = [this, &execution] { in TestWait()
768 ASSERT_EQ(execution.startCompute(&event), WrapperResult::NO_ERROR); in TestWait()
[all …]
DTestFailingDriver.cpp162 WrapperExecution execution(&compilation); in TEST_F() local
166 ASSERT_EQ(execution.setInput(0, &fInput), Result::NO_ERROR); in TEST_F()
167 ASSERT_EQ(execution.setInput(1, &bInput), Result::NO_ERROR); in TEST_F()
168 ASSERT_EQ(execution.setOutput(0, &fSqrt), Result::NO_ERROR); in TEST_F()
169 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F()
202 WrapperExecution execution(&compilation); in TEST_F() local
205 ASSERT_EQ(execution.setInput(0, &fInput), Result::NO_ERROR); in TEST_F()
206 ASSERT_EQ(execution.setOutput(0, &fSqrt), Result::NO_ERROR); in TEST_F()
207 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F()
DTestGenerated.cpp179 const TestModel& testModel, Execution* execution, in createRequestWithDeviceMemories() argument
182 ASSERT_NE(execution, nullptr); in createRequestWithDeviceMemories()
192 ASSERT_EQ(Result::NO_ERROR, execution->setInput(i, nullptr, 0)); in createRequestWithDeviceMemories()
206 ASSERT_EQ(Result::NO_ERROR, execution->setInputFromMemory(i, &wrapperMemory, 0, 0)); in createRequestWithDeviceMemories()
215 ASSERT_EQ(Result::NO_ERROR, execution->setOutputFromMemory(i, &wrapperMemory, 0, 0)); in createRequestWithDeviceMemories()
246 Execution execution(&compilation); in executeInternal() local
248 execution.setReusable(testReusableExecution); in executeInternal()
255 createRequestWithDeviceMemories(compilation, testModel, &execution, &inputMemories, in executeInternal()
258 createRequest(testModel, &execution, &outputs); in executeInternal()
261 const auto computeAndCheckResults = [this, &testModel, &execution, &outputs, &outputMemories] { in executeInternal()
[all …]
DSupportLibraryTestGenerated.cpp71 Execution* execution, Execution::ComputeMode computeMode,
244 void computeWithPtrs(const TestModel& testModel, Execution* execution, in computeWithPtrs() argument
249 createRequest(testModel, execution, outputs); in computeWithPtrs()
251 *result = execution->compute(computeMode); in computeWithPtrs()
284 const TestModel& testModel, Execution* execution, in computeWithDeviceMemories() argument
287 ASSERT_NE(execution, nullptr); in computeWithDeviceMemories()
301 ASSERT_EQ(Result::NO_ERROR, execution->setInput(i, nullptr, 0)); in computeWithDeviceMemories()
315 ASSERT_EQ(Result::NO_ERROR, execution->setInputFromMemory(i, &wrapperMemory, 0, 0)); in computeWithDeviceMemories()
324 ASSERT_EQ(Result::NO_ERROR, execution->setOutputFromMemory(i, &wrapperMemory, 0, 0)); in computeWithDeviceMemories()
328 *result = execution->compute(computeMode); in computeWithDeviceMemories()
[all …]
DTestUnspecifiedDimensions.cpp272 Result setInOut(Execution* execution, uint32_t index, uint32_t opIndex, in setInOut() argument
283 return execution->setInputFromMemory(opIndex, memory->getMemory(), 0, size, t); in setInOut()
285 return execution->setOutputFromMemory(opIndex, memory->getMemory(), 0, size, t); in setInOut()
289 return execution->setInput(opIndex, buffer, size, t); in setInOut()
291 return execution->setOutput(opIndex, buffer, size, t); in setInOut()
364 Execution execution(&compilation); in TestOne() local
368 ASSERT_EQ(execution.enableInputAndOutputPadding(true), Result::NO_ERROR); in TestOne()
370 ASSERT_EQ(execution.enableInputAndOutputPadding(false), Result::NO_ERROR); in TestOne()
378 result = setInOut<T>(&execution, kIndex0_Execution, 0, {kValueA, valueB}, bufferOp0, in TestOne()
385 result = setInOut<T>(&execution, kIndex3_Execution, 1, {2}, nullptr, nullptr, in TestOne()
[all …]
DTestControlFlow.cpp95 Execution execution(&compilation); in TEST_F() local
96 ASSERT_EQ(execution.setInput(0, &input), Result::NO_ERROR); in TEST_F()
97 ASSERT_EQ(execution.setOutput(0, &output), Result::NO_ERROR); in TEST_F()
98 ASSERT_EQ(execution.setLoopTimeout(1 * kMillisecondsInNanosecond), Result::NO_ERROR); in TEST_F()
99 Result result = execution.compute(); in TEST_F()
DTestUnknownDimensions.cpp248 Execution execution(&compilation); in TestOne() local
292 ASSERT_EQ(execution.setInput(0, ones, sizeAtSet(paramsForInput0), typeAtSet(paramsForInput0)), in TestOne()
294 ASSERT_EQ(execution.setInput(1, twos, sizeAtSet(paramsForInput1), typeAtSet(paramsForInput1)), in TestOne()
297 execution.setOutput(0, actual, sizeAtSet(paramsForOutput), typeAtSet(paramsForOutput)), in TestOne()
301 ASSERT_EQ(execution.compute(computeMode), Result::NO_ERROR); in TestOne()
305 ASSERT_NE(execution.compute(), Result::NO_ERROR); in TestOne()
/packages/modules/NeuralNetworks/common/operations/
DQuantizedLSTMTest.cpp94 Execution execution(&compilation); in invoke() local
97 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputTensor, input_), in invoke()
99 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToInputWeightsTensor, in invoke()
102 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToForgetWeightsTensor, in invoke()
105 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToCellWeightsTensor, in invoke()
108 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToOutputWeightsTensor, in invoke()
111 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToInputWeightsTensor, in invoke()
114 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToForgetWeightsTensor, in invoke()
117 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToCellWeightsTensor, in invoke()
120 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToOutputWeightsTensor, in invoke()
[all …]
DLayerNormLSTMTest.cpp207 Execution execution(&compilation); in Invoke() local
210 execution.setInput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
220 execution.setOutput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
228 execution.setInput(LSTMCell::kInputToInputWeightsTensor, nullptr, 0); in Invoke()
229 execution.setInput(LSTMCell::kRecurrentToInputWeightsTensor, nullptr, 0); in Invoke()
234 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke()
237 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke()
238 execution.setInput(LSTMCell::kCellToForgetWeightsTensor, nullptr, 0); in Invoke()
239 execution.setInput(LSTMCell::kCellToOutputWeightsTensor, nullptr, 0); in Invoke()
244 execution.setInput(LSTMCell::kProjectionBiasTensor, nullptr, 0); in Invoke()
[all …]
DLSTMTest.cpp196 Execution execution(&compilation); in Invoke() local
199 execution.setInput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
208 execution.setOutput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
216 execution.setInput(LSTMCell::kInputToInputWeightsTensor, nullptr, 0); in Invoke()
217 execution.setInput(LSTMCell::kRecurrentToInputWeightsTensor, nullptr, 0); in Invoke()
222 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke()
225 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke()
226 execution.setInput(LSTMCell::kCellToForgetWeightsTensor, nullptr, 0); in Invoke()
227 execution.setInput(LSTMCell::kCellToOutputWeightsTensor, nullptr, 0); in Invoke()
232 execution.setInput(LSTMCell::kProjectionBiasTensor, nullptr, 0); in Invoke()
[all …]
DMultinomialTest.cpp63 Execution execution(&compilation); in Invoke() local
71 ASSERT_EQ(execution.setInput(Multinomial::kInputTensor, input_.data(), in Invoke()
74 ASSERT_EQ(execution.setInput(Multinomial::kSampleCountParam, &sample_size_, in Invoke()
79 ASSERT_EQ(execution.setInput(Multinomial::kRandomSeedsTensor, seeds.data(), in Invoke()
84 ASSERT_EQ(execution.setOutput(Multinomial::kOutputTensor, output_.data(), in Invoke()
88 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
DLSHProjectionTest.cpp103 Execution execution(&compilation); in Invoke() local
107 execution.setInput(LSHProjection::k##X##Tensor, X##_.data(), sizeof(T) * X##_.size()), \ in Invoke()
115 ASSERT_EQ(execution.setOutput(LSHProjection::k##X##Tensor, X##_.data(), \ in Invoke()
123 ASSERT_EQ(execution.setInput(LSHProjection::kTypeParam, &type_, sizeof(type_)), in Invoke()
126 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
DSVDFTest.cpp243 Execution execution(&compilation); in Invoke() local
248 ASSERT_EQ(execution.setInput(SVDF::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
257 ASSERT_EQ(execution.setOutput(SVDF::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
264 ASSERT_EQ(execution.setInput(SVDF::kRankParam, &rank_, sizeof(rank_)), Result::NO_ERROR); in Invoke()
267 ASSERT_EQ(execution.setInput(SVDF::kActivationParam, &activation, sizeof(activation)), in Invoke()
270 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
DRNNTest.cpp199 Execution execution(&compilation); in Invoke() local
201 ASSERT_EQ(execution.setInput(RNN::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
209 ASSERT_EQ(execution.setOutput(RNN::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke()
216 ASSERT_EQ(execution.setInput(RNN::kActivationParam, &activation_, sizeof(activation_)), in Invoke()
219 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
DEmbeddingLookupTest.cpp99 Execution execution(&compilation); in Invoke() local
102 ASSERT_EQ(execution.setInput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke()
111 ASSERT_EQ(execution.setOutput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke()
119 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
/packages/modules/NeuralNetworks/runtime/include/
DNeuralNetworks.h597 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) __NNAPI_INTRODUCED_IN(29);
620 int ANeuralNetworksExecution_getOutputOperandRank(ANeuralNetworksExecution* execution,
646 int ANeuralNetworksExecution_getOutputOperandDimensions(ANeuralNetworksExecution* execution,
723 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution,
788 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure)
813 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution,
1380 ANeuralNetworksExecution** execution) __NNAPI_INTRODUCED_IN(27);
1403 void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution) __NNAPI_INTRODUCED_IN(27);
1461 int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32_t index,
1531 int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execution, int32_t index,
[all …]
/packages/modules/NeuralNetworks/shim_and_sl/public/
DNeuralNetworksSupportLibraryImpl.h518 int (*ANeuralNetworksExecution_burstCompute)(ANeuralNetworksExecution* execution,
527 int (*ANeuralNetworksExecution_compute)(ANeuralNetworksExecution* execution);
536 ANeuralNetworksExecution** execution);
544 int (*ANeuralNetworksExecution_enableInputAndOutputPadding)(ANeuralNetworksExecution* execution,
553 void (*ANeuralNetworksExecution_free)(ANeuralNetworksExecution* execution);
561 int (*ANeuralNetworksExecution_getDuration)(const ANeuralNetworksExecution* execution,
570 int (*ANeuralNetworksExecution_getOutputOperandDimensions)(ANeuralNetworksExecution* execution,
579 int (*ANeuralNetworksExecution_getOutputOperandRank)(ANeuralNetworksExecution* execution,
588 int (*ANeuralNetworksExecution_setInput)(ANeuralNetworksExecution* execution, int32_t index,
598 int (*ANeuralNetworksExecution_setInputFromMemory)(ANeuralNetworksExecution* execution,
[all …]
/packages/modules/NeuralNetworks/runtime/
DNeuralNetworks.cpp825 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) { in ANeuralNetworksExecution_compute() argument
827 if (!execution) { in ANeuralNetworksExecution_compute()
833 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_compute()
837 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) { in ANeuralNetworksExecution_setMeasureTiming() argument
839 if (!execution) { in ANeuralNetworksExecution_setMeasureTiming()
843 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_setMeasureTiming()
847 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_getDuration() argument
850 if (!execution || !duration) { in ANeuralNetworksExecution_getDuration()
865 const ExecutionBuilder* r = reinterpret_cast<const ExecutionBuilder*>(execution); in ANeuralNetworksExecution_getDuration()
891 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_burstCompute() argument
[all …]
DCompilationBuilder.cpp336 int CompilationBuilder::createExecution(ExecutionBuilder** execution) { in createExecution() argument
339 *execution = nullptr; in createExecution()
344 *execution = nullptr; in createExecution()
348 *execution = new (std::nothrow) SimpleExecutionBuilder(this); in createExecution()
350 *execution = new (std::nothrow) CompoundExecutionBuilder(this); in createExecution()
352 return (*execution ? ANEURALNETWORKS_NO_ERROR : ANEURALNETWORKS_OUT_OF_MEMORY); in createExecution()
/packages/modules/NeuralNetworks/shim_and_sl/
DShimPreparedModel.cpp46 ::android::nn::sl_wrapper::Execution* execution, in parseInputs() argument
85 auto result = execution->setInputFromMemory( in parseInputs()
92 auto result = execution->setInput(i, nullptr, 0); in parseInputs()
109 auto result = execution->setOutputFromMemory( in parseInputs()
116 auto result = execution->setOutput(i, nullptr, 0); in parseInputs()
124 execution->setMeasureTiming(true); in parseInputs()
135 auto result = execution->setTimeout(std::max<uint64_t>(1, timeoutDuration.count())); in parseInputs()
143 execution->setLoopTimeout(loopTimeoutDurationNs); in parseInputs()
151 ::android::nn::sl_wrapper::Execution execution, Event e, in ShimFencedExecutionCallback() argument
155 mExecution(std::move(execution)), in ShimFencedExecutionCallback()
[all …]
/packages/modules/NeuralNetworks/runtime/test/android_fuzzing/
DFuzzTest.cpp105 Execution execution(&compilation); in CreateExecution() local
110 if (execution.setInput(i, operand.data.get<void>(), operand.data.size()) != in CreateExecution()
119 if (execution.setOutput(i, const_cast<void*>(operand.data.get<void>()), in CreateExecution()
125 return execution; in CreateExecution()
144 auto execution = CreateExecution(*compilation, testModel); in nnapiFuzzTest() local
145 if (!execution.has_value()) { in nnapiFuzzTest()
150 execution->compute(); in nnapiFuzzTest()
/packages/modules/NeuralNetworks/tools/api/
DNeuralNetworksTypes.t187 * invalid execution definition or invalid data at execution time.
192 * Failure caused by failed model execution.
293 // If no dependencies specified (for example, if the execution was scheduled other
301 // If no dependencies specified (for example, if the execution was scheduled other
326 * an execution. See {@link ANeuralNetworksExecution_setInputFromMemory}
340 * created using such a model, any execution object or burst object created
341 * using such a compilation, or any execution which references this memory
382 * This includes any compilation, execution object or burst object created using
421 * This includes any execution object or burst object created using the compilation,
435 * <li>Create a new execution instance by calling the
[all …]
/packages/modules/NeuralNetworks/tools/systrace_parser/parser/test/
Dlarge_test.sh23 echo parsing hdrnet --per-execution
24 ../../parse_systrace.py --per-execution hdrnet.html > hdrnet-bm.tmp
25 ../../parse_systrace.py --per-execution --json omr1_incomplete.html > omr1_incomplete.tmp

123