/packages/modules/NeuralNetworks/runtime/test/ |
D | TestValidation.cpp | 371 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsInput() local 372 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsInput() 374 ASSERT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsInput() 376 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsInput() 378 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), expectedResult); in executeWithMemoryAsInput() 379 ANeuralNetworksExecution_free(execution); in executeWithMemoryAsInput() 385 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsOutput() local 386 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsOutput() 388 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsOutput() 390 ASSERT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsOutput() [all …]
|
D | TestTrivialModel.cpp | 126 Execution execution(&compilation); in TEST_F() local 127 ASSERT_EQ(execution.setInput(0, matrix1, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 128 ASSERT_EQ(execution.setInput(1, matrix2, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 129 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 130 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F() 168 Execution execution(&compilation); in testAddTwoWithHardwareBufferInput() local 169 ASSERT_EQ(execution.setInputFromMemory(0, &matrix1Memory, 0, sizeof(Matrix3x4)), in testAddTwoWithHardwareBufferInput() 171 ASSERT_EQ(execution.setInput(1, matrix2, sizeof(Matrix3x4)), Result::NO_ERROR); in testAddTwoWithHardwareBufferInput() 172 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in testAddTwoWithHardwareBufferInput() 188 ANeuralNetworksExecution* executionHandle = execution.getHandle(); in testAddTwoWithHardwareBufferInput() [all …]
|
D | TestExecution.cpp | 683 void getDimensionsWhileRunning(WrapperExecution& execution) { in getDimensionsWhileRunning() argument 687 EXPECT_EQ(execution.getOutputOperandDimensions(0, &dimensions), WrapperResult::BAD_STATE); in getDimensionsWhileRunning() 709 void setInputOutput(WrapperExecution* execution) { in setInputOutput() argument 712 ASSERT_EQ(execution->setInput(0, &mInputBuffer, sizeof(mInputBuffer)), in setInputOutput() 714 ASSERT_EQ(execution->setOutput(0, &mOutputBuffer, sizeof(mOutputBuffer)), in setInputOutput() 763 WrapperExecution execution(&mCompilation); in TestWait() local 764 ASSERT_EQ(execution.setReusable(reusable), WrapperResult::NO_ERROR); in TestWait() 765 ASSERT_NO_FATAL_FAILURE(setInputOutput(&execution)); in TestWait() 766 const auto compute = [this, &execution] { in TestWait() 769 ASSERT_EQ(execution.startCompute(&event), WrapperResult::NO_ERROR); in TestWait() [all …]
|
D | TestFailingDriver.cpp | 162 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()
|
D | TestControlFlow.cpp | 95 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()
|
D | TestTelemetry.cpp | 67 Execution execution(&compilation); in TEST_F() local 68 ASSERT_EQ(execution.setInput(0, matrix, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 69 ASSERT_EQ(execution.setInput(1, matrix, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 70 ASSERT_EQ(execution.setOutput(0, matrix, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 71 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F()
|
D | TestGenerated.cpp | 182 const TestModel& testModel, Execution* execution, in createRequestWithDeviceMemories() argument 185 ASSERT_NE(execution, nullptr); in createRequestWithDeviceMemories() 195 ASSERT_EQ(Result::NO_ERROR, execution->setInput(i, nullptr, 0)); in createRequestWithDeviceMemories() 209 ASSERT_EQ(Result::NO_ERROR, execution->setInputFromMemory(i, &wrapperMemory, 0, 0)); in createRequestWithDeviceMemories() 218 ASSERT_EQ(Result::NO_ERROR, execution->setOutputFromMemory(i, &wrapperMemory, 0, 0)); in createRequestWithDeviceMemories() 249 Execution execution(&compilation); in executeInternal() local 251 execution.setReusable(testReusableExecution); in executeInternal() 258 createRequestWithDeviceMemories(compilation, testModel, &execution, &inputMemories, in executeInternal() 261 createRequest(testModel, &execution, &outputs); in executeInternal() 264 const auto computeAndCheckResults = [this, &testModel, &execution, &outputs, &outputMemories] { in executeInternal() [all …]
|
D | TestUnspecifiedDimensions.cpp | 281 Result setInOut(Execution* execution, uint32_t index, uint32_t opIndex, in setInOut() argument 292 return execution->setInputFromMemory(opIndex, memory->getMemory(), 0, size, t); in setInOut() 294 return execution->setOutputFromMemory(opIndex, memory->getMemory(), 0, size, t); in setInOut() 298 return execution->setInput(opIndex, buffer, size, t); in setInOut() 300 return execution->setOutput(opIndex, buffer, size, t); in setInOut() 373 Execution execution(&compilation); in TestOne() local 377 ASSERT_EQ(execution.enableInputAndOutputPadding(true), Result::NO_ERROR); in TestOne() 379 ASSERT_EQ(execution.enableInputAndOutputPadding(false), Result::NO_ERROR); in TestOne() 387 result = setInOut<T>(&execution, kIndex0_Execution, 0, {kValueA, valueB}, bufferOp0, in TestOne() 394 result = setInOut<T>(&execution, kIndex3_Execution, 1, {2}, nullptr, nullptr, in TestOne() [all …]
|
D | SupportLibraryTestGenerated.cpp | 81 const Compilation& compilation, const TestModel& testModel, Execution* execution, 253 void computeWithPtrs(const TestModel& testModel, Execution* execution, in computeWithPtrs() argument 258 createRequest(testModel, execution, outputs); in computeWithPtrs() 260 *result = execution->compute(computeMode); in computeWithPtrs() 293 const Compilation& compilation, const TestModel& testModel, Execution* execution, in computeWithDeviceMemories() argument 295 EXPECT_NE(execution, nullptr); in computeWithDeviceMemories() 309 EXPECT_EQ(Result::NO_ERROR, execution->setInput(i, nullptr, 0)); in computeWithDeviceMemories() 325 EXPECT_EQ(Result::NO_ERROR, execution->setInputFromMemory(i, &wrapperMemory, 0, 0)); in computeWithDeviceMemories() 336 EXPECT_EQ(Result::NO_ERROR, execution->setOutputFromMemory(i, &wrapperMemory, 0, 0)); in computeWithDeviceMemories() 340 *result = execution->compute(computeMode); in computeWithDeviceMemories() [all …]
|
/packages/modules/NeuralNetworks/common/cpu_operations/ |
D | QuantizedLSTMTest.cpp | 94 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 …]
|
D | LayerNormLSTMTest.cpp | 208 Execution execution(&compilation); in Invoke() local 211 execution.setInput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 221 execution.setOutput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 229 execution.setInput(LSTMCell::kInputToInputWeightsTensor, nullptr, 0); in Invoke() 230 execution.setInput(LSTMCell::kRecurrentToInputWeightsTensor, nullptr, 0); in Invoke() 235 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke() 238 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke() 239 execution.setInput(LSTMCell::kCellToForgetWeightsTensor, nullptr, 0); in Invoke() 240 execution.setInput(LSTMCell::kCellToOutputWeightsTensor, nullptr, 0); in Invoke() 245 execution.setInput(LSTMCell::kProjectionBiasTensor, nullptr, 0); in Invoke() [all …]
|
D | LSTMTest.cpp | 196 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 …]
|
D | MultinomialTest.cpp | 68 Execution execution(&compilation); in Invoke() local 76 ASSERT_EQ(execution.setInput(Multinomial::kInputTensor, input_.data(), in Invoke() 79 ASSERT_EQ(execution.setInput(Multinomial::kSampleCountParam, &sample_size_, in Invoke() 84 ASSERT_EQ(execution.setInput(Multinomial::kRandomSeedsTensor, seeds.data(), in Invoke() 89 ASSERT_EQ(execution.setOutput(Multinomial::kOutputTensor, output_.data(), in Invoke() 93 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | LSHProjectionTest.cpp | 103 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()
|
D | SVDFTest.cpp | 243 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()
|
D | RNNTest.cpp | 199 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()
|
D | EmbeddingLookupTest.cpp | 100 Execution execution(&compilation); in Invoke() local 103 ASSERT_EQ(execution.setInput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke() 112 ASSERT_EQ(execution.setOutput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke() 120 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
/packages/modules/NeuralNetworks/runtime/include/ |
D | NeuralNetworks.h | 673 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) __NNAPI_INTRODUCED_IN(29) 700 int ANeuralNetworksExecution_getOutputOperandRank(ANeuralNetworksExecution* execution, 729 int ANeuralNetworksExecution_getOutputOperandDimensions(ANeuralNetworksExecution* execution, 817 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, 891 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) 919 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, 1555 ANeuralNetworksExecution** execution) __NNAPI_INTRODUCED_IN(27) 1582 void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution) __NNAPI_INTRODUCED_IN(27) 1644 int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32_t index, 1718 int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execution, int32_t index, [all …]
|
/packages/modules/NeuralNetworks/shim_and_sl/ |
D | ShimPreparedModel.cpp | 49 ::android::nn::sl_wrapper::Execution* execution, in parseInputs() argument 82 const auto enablePaddingResult = execution->enableInputAndOutputPadding(true); in parseInputs() 101 auto result = execution->setInputFromMemory( in parseInputs() 108 auto result = execution->setInput(i, nullptr, 0); in parseInputs() 128 auto result = execution->setOutputFromMemory( in parseInputs() 135 auto result = execution->setOutput(i, nullptr, 0); in parseInputs() 143 execution->setMeasureTiming(true); in parseInputs() 154 auto result = execution->setTimeout(std::max<uint64_t>(1, timeoutDuration.count())); in parseInputs() 162 execution->setLoopTimeout(loopTimeoutDurationNs); in parseInputs() 182 const auto result = execution->addExtensionAttribute( in parseInputs() [all …]
|
/packages/modules/NeuralNetworks/shim_and_sl/public/ |
D | NeuralNetworksSupportLibraryImpl.h | 842 int (*ANeuralNetworksExecution_burstCompute)(ANeuralNetworksExecution* execution, 851 int (*ANeuralNetworksExecution_compute)(ANeuralNetworksExecution* execution); 860 ANeuralNetworksExecution** execution); 868 int (*ANeuralNetworksExecution_enableInputAndOutputPadding)(ANeuralNetworksExecution* execution, 877 void (*ANeuralNetworksExecution_free)(ANeuralNetworksExecution* execution); 885 int (*ANeuralNetworksExecution_getDuration)(const ANeuralNetworksExecution* execution, 894 int (*ANeuralNetworksExecution_getOutputOperandDimensions)(ANeuralNetworksExecution* execution, 903 int (*ANeuralNetworksExecution_getOutputOperandRank)(ANeuralNetworksExecution* execution, 912 int (*ANeuralNetworksExecution_setInput)(ANeuralNetworksExecution* execution, int32_t index, 922 int (*ANeuralNetworksExecution_setInputFromMemory)(ANeuralNetworksExecution* execution, [all …]
|
/packages/modules/NeuralNetworks/runtime/ |
D | NeuralNetworks.cpp | 865 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) { in ANeuralNetworksExecution_compute() argument 867 if (!execution) { in ANeuralNetworksExecution_compute() 873 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_compute() 877 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) { in ANeuralNetworksExecution_setMeasureTiming() argument 879 if (!execution) { in ANeuralNetworksExecution_setMeasureTiming() 883 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_setMeasureTiming() 887 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_getDuration() argument 890 if (!execution || !duration) { in ANeuralNetworksExecution_getDuration() 905 const ExecutionBuilder* r = reinterpret_cast<const ExecutionBuilder*>(execution); in ANeuralNetworksExecution_getDuration() 931 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_burstCompute() argument [all …]
|
D | CompilationBuilder.cpp | 369 int CompilationBuilder::createExecution(ExecutionBuilder** execution) { in createExecution() argument 372 *execution = nullptr; in createExecution() 377 *execution = nullptr; in createExecution() 381 *execution = new (std::nothrow) SimpleExecutionBuilder(this); in createExecution() 383 *execution = new (std::nothrow) CompoundExecutionBuilder(this); in createExecution() 385 return (*execution ? ANEURALNETWORKS_NO_ERROR : ANEURALNETWORKS_OUT_OF_MEMORY); in createExecution()
|
/packages/modules/NeuralNetworks/runtime/test/android_fuzzing/ |
D | FuzzTest.cpp | 167 Execution execution(&compilation); in CreateExecution() local 172 if (execution.setInput(i, operand.data.get<void>(), operand.data.size()) != in CreateExecution() 181 if (execution.setOutput(i, const_cast<void*>(operand.data.get<void>()), in CreateExecution() 187 return execution; in CreateExecution() 206 auto execution = CreateExecution(*compilation, testModel); in nnapiFuzzTest() local 207 if (!execution.has_value()) { in nnapiFuzzTest() 212 execution->compute(); in nnapiFuzzTest()
|
/packages/modules/NeuralNetworks/tools/api/ |
D | NeuralNetworksTypes.t | 204 * invalid execution definition or invalid data at execution time. 209 * Failure caused by failed model execution. 310 // If no dependencies specified (for example, if the execution was scheduled other 318 // If no dependencies specified (for example, if the execution was scheduled other 343 * an execution. See {@link ANeuralNetworksExecution_setInputFromMemory} 357 * created using such a model, any execution object or burst object created 358 * using such a compilation, or any execution which references this memory 399 * This includes any compilation, execution object or burst object created using 438 * This includes any execution object or burst object created using the compilation, 452 * <li>Create a new execution instance by calling the [all …]
|
/packages/modules/NeuralNetworks/tools/systrace_parser/parser/test/ |
D | large_test.sh | 23 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
|