/frameworks/ml/nn/runtime/test/ |
D | TestValidation.cpp | 351 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsInput() local 352 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsInput() 354 ASSERT_EQ(ANeuralNetworksExecution_setInputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsInput() 356 ASSERT_EQ(ANeuralNetworksExecution_setOutput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsInput() 358 ASSERT_EQ(ANeuralNetworksExecution_compute(execution), expectedResult); in executeWithMemoryAsInput() 359 ANeuralNetworksExecution_free(execution); in executeWithMemoryAsInput() 365 ANeuralNetworksExecution* execution = nullptr; in executeWithMemoryAsOutput() local 366 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), in executeWithMemoryAsOutput() 368 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &data, sizeof(float)), in executeWithMemoryAsOutput() 370 ASSERT_EQ(ANeuralNetworksExecution_setOutputFromMemory(execution, 0, nullptr, memory, 0, 0), in executeWithMemoryAsOutput() [all …]
|
D | TestTrivialModel.cpp | 117 Execution execution(&compilation); in TEST_F() local 118 ASSERT_EQ(execution.setInput(0, matrix1, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 119 ASSERT_EQ(execution.setInput(1, matrix2, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 120 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 121 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F() 146 Execution execution(&compilation); in TEST_F() local 147 ASSERT_EQ(execution.setInputFromMemory(0, &matrix1Memory, 0, sizeof(Matrix3x4)), in TEST_F() 149 ASSERT_EQ(execution.setInput(1, matrix2, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 150 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 166 ANeuralNetworksExecution* executionHandle = execution.getHandle(); in TEST_F() [all …]
|
D | TestExecution.cpp | 665 void setInputOutput(WrapperExecution* execution) { in setInputOutput() argument 668 ASSERT_EQ(execution->setInput(0, &mInputBuffer, sizeof(mInputBuffer)), Result::NO_ERROR); in setInputOutput() 669 ASSERT_EQ(execution->setOutput(0, &mOutputBuffer, sizeof(mOutputBuffer)), Result::NO_ERROR); in setInputOutput() 704 const auto getDimensionsWhileRunning = [](WrapperExecution& execution) { in TestWait() argument 708 EXPECT_EQ(execution.getOutputOperandDimensions(0, &dimensions), Result::BAD_STATE); in TestWait() 713 WrapperExecution execution(&mCompilation); in TestWait() local 714 ASSERT_NO_FATAL_FAILURE(setInputOutput(&execution)); in TestWait() 717 ASSERT_EQ(execution.startCompute(&event), Result::NO_ERROR); in TestWait() 718 getDimensionsWhileRunning(execution); in TestWait() 728 ASSERT_EQ(execution.getOutputOperandDimensions(0, &dimensions), kExpectResult); in TestWait() [all …]
|
D | TestFailingDriver.cpp | 163 WrapperExecution execution(&compilation); in TEST_F() local 167 ASSERT_EQ(execution.setInput(0, &fInput), Result::NO_ERROR); in TEST_F() 168 ASSERT_EQ(execution.setInput(1, &bInput), Result::NO_ERROR); in TEST_F() 169 ASSERT_EQ(execution.setOutput(0, &fSqrt), Result::NO_ERROR); in TEST_F() 170 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F() 203 WrapperExecution execution(&compilation); in TEST_F() local 206 ASSERT_EQ(execution.setInput(0, &fInput), Result::NO_ERROR); in TEST_F() 207 ASSERT_EQ(execution.setOutput(0, &fSqrt), Result::NO_ERROR); in TEST_F() 208 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F()
|
D | TestGenerated.cpp | 141 static void computeWithPtrs(const TestModel& testModel, Execution* execution, Result* result, in computeWithPtrs() argument 145 createRequest(testModel, execution, outputs); in computeWithPtrs() 147 *result = execution->compute(); in computeWithPtrs() 178 Execution* execution, Result* result, in computeWithDeviceMemories() argument 180 ASSERT_NE(execution, nullptr); in computeWithDeviceMemories() 194 ASSERT_EQ(Result::NO_ERROR, execution->setInput(i, nullptr, 0)); in computeWithDeviceMemories() 208 ASSERT_EQ(Result::NO_ERROR, execution->setInputFromMemory(i, &wrapperMemory, 0, 0)); in computeWithDeviceMemories() 217 ASSERT_EQ(Result::NO_ERROR, execution->setOutputFromMemory(i, &wrapperMemory, 0, 0)); in computeWithDeviceMemories() 221 *result = execution->compute(); in computeWithDeviceMemories() 243 Execution execution(&compilation); in executeWithCompilation() local [all …]
|
D | TestControlFlow.cpp | 91 Execution execution(&compilation); in TEST_F() local 92 ASSERT_EQ(execution.setInput(0, &input), Result::NO_ERROR); in TEST_F() 93 ASSERT_EQ(execution.setOutput(0, &output), Result::NO_ERROR); in TEST_F() 94 ASSERT_EQ(execution.setLoopTimeout(1 * kMillisecondsInNanosecond), Result::NO_ERROR); in TEST_F() 95 Result result = execution.compute(); in TEST_F()
|
D | TestUnspecifiedDimensions.cpp | 249 Result setInOut(Execution* execution, uint32_t index, uint32_t opIndex, in setInOut() argument 260 return execution->setInputFromMemory(opIndex, memory->getMemory(), 0, size, t); in setInOut() 262 return execution->setOutputFromMemory(opIndex, memory->getMemory(), 0, size, t); in setInOut() 266 return execution->setInput(opIndex, buffer, size, t); in setInOut() 268 return execution->setOutput(opIndex, buffer, size, t); in setInOut() 341 Execution execution(&compilation); in TestOne() local 348 result = setInOut<T>(&execution, kIndex0_Execution, 0, {kValueA, valueB}, bufferOp0, in TestOne() 355 result = setInOut<T>(&execution, kIndex3_Execution, 1, {2}, nullptr, nullptr, in TestOne() 365 result = setInOut<T>(&execution, kIndex4_Execution, 0, {valueB, kValueA}, bufferOp4, in TestOne() 371 result = execution.compute(); in TestOne() [all …]
|
D | TestFree.cpp | 119 ANeuralNetworksExecution* execution = nullptr; in TEST() local 120 ASSERT_EQ(ANeuralNetworksExecution_create(compilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST() 121 ANeuralNetworksExecution_free(execution); in TEST()
|
D | TestUnknownDimensions.cpp | 243 Execution execution(&compilation); in TestOne() local 287 ASSERT_EQ(execution.setInput(0, ones, sizeAtSet(paramsForInput0), typeAtSet(paramsForInput0)), in TestOne() 289 ASSERT_EQ(execution.setInput(1, twos, sizeAtSet(paramsForInput1), typeAtSet(paramsForInput1)), in TestOne() 292 execution.setOutput(0, actual, sizeAtSet(paramsForOutput), typeAtSet(paramsForOutput)), in TestOne() 296 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TestOne() 300 ASSERT_NE(execution.compute(), Result::NO_ERROR); in TestOne()
|
/frameworks/ml/nn/common/operations/ |
D | QuantizedLSTMTest.cpp | 93 Execution execution(&compilation); in invoke() local 96 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputTensor, input_), in invoke() 98 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToInputWeightsTensor, in invoke() 101 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToForgetWeightsTensor, in invoke() 104 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToCellWeightsTensor, in invoke() 107 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToOutputWeightsTensor, in invoke() 110 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToInputWeightsTensor, in invoke() 113 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToForgetWeightsTensor, in invoke() 116 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToCellWeightsTensor, in invoke() 119 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kRecurrentToOutputWeightsTensor, in invoke() [all …]
|
D | LayerNormLSTMTest.cpp | 207 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 …]
|
D | LSTMTest.cpp | 197 Execution execution(&compilation); in Invoke() local 200 execution.setInput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 209 execution.setOutput(LSTMCell::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 217 execution.setInput(LSTMCell::kInputToInputWeightsTensor, nullptr, 0); in Invoke() 218 execution.setInput(LSTMCell::kRecurrentToInputWeightsTensor, nullptr, 0); in Invoke() 223 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke() 226 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke() 227 execution.setInput(LSTMCell::kCellToForgetWeightsTensor, nullptr, 0); in Invoke() 228 execution.setInput(LSTMCell::kCellToOutputWeightsTensor, nullptr, 0); in Invoke() 233 execution.setInput(LSTMCell::kProjectionBiasTensor, nullptr, 0); in Invoke() [all …]
|
D | MultinomialTest.cpp | 63 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()
|
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 | 241 Execution execution(&compilation); in Invoke() local 246 ASSERT_EQ(execution.setInput(SVDF::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 255 ASSERT_EQ(execution.setOutput(SVDF::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 262 ASSERT_EQ(execution.setInput(SVDF::kRankParam, &rank_, sizeof(rank_)), Result::NO_ERROR); in Invoke() 265 ASSERT_EQ(execution.setInput(SVDF::kActivationParam, &activation, sizeof(activation)), in Invoke() 268 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | EmbeddingLookupTest.cpp | 98 Execution execution(&compilation); in Invoke() local 101 ASSERT_EQ(execution.setInput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke() 110 ASSERT_EQ(execution.setOutput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke() 118 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | RNNTest.cpp | 198 Execution execution(&compilation); in Invoke() local 200 ASSERT_EQ(execution.setInput(RNN::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 208 ASSERT_EQ(execution.setOutput(RNN::k##X##Tensor, X##_.data(), sizeof(float) * X##_.size()), \ in Invoke() 215 ASSERT_EQ(execution.setInput(RNN::kActivationParam, &activation_, sizeof(activation_)), in Invoke() 218 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | HashtableLookupTest.cpp | 113 Execution execution(&compilation); in Invoke() local 116 ASSERT_EQ(execution.setInput(HashtableLookup::k##X##Tensor, X##_.data(), \ in Invoke() 125 ASSERT_EQ(execution.setOutput(HashtableLookup::k##X##Tensor, X##_.data(), \ in Invoke() 133 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
/frameworks/ml/nn/runtime/include/ |
D | NeuralNetworks.h | 6837 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) __INTRODUCED_IN(29); 6861 int ANeuralNetworksExecution_getOutputOperandRank(ANeuralNetworksExecution* execution, 6887 int ANeuralNetworksExecution_getOutputOperandDimensions(ANeuralNetworksExecution* execution, 6957 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, 7020 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) 7045 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, 7626 ANeuralNetworksExecution** execution) __INTRODUCED_IN(27); 7649 void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution) __INTRODUCED_IN(27); 7690 int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32_t index, 7738 int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execution, int32_t index, [all …]
|
/frameworks/base/core/java/android/os/ |
D | TestLooperManager.java | 122 MessageExecution execution = new MessageExecution(); in execute() local 123 execution.m = message; in execute() 124 synchronized (execution) { in execute() 125 mExecuteQueue.add(execution); in execute() 128 execution.wait(); in execute() 131 if (execution.response != null) { in execute() 132 throw new RuntimeException(execution.response); in execute()
|
/frameworks/ml/nn/runtime/ |
D | NeuralNetworks.cpp | 800 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) { in ANeuralNetworksExecution_compute() argument 802 if (!execution) { in ANeuralNetworksExecution_compute() 808 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_compute() 812 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) { in ANeuralNetworksExecution_setMeasureTiming() argument 814 if (!execution) { in ANeuralNetworksExecution_setMeasureTiming() 818 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_setMeasureTiming() 822 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_getDuration() argument 825 if (!execution || !duration) { in ANeuralNetworksExecution_getDuration() 840 const ExecutionBuilder* r = reinterpret_cast<const ExecutionBuilder*>(execution); in ANeuralNetworksExecution_getDuration() 866 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_burstCompute() argument [all …]
|
D | CompilationBuilder.cpp | 180 int CompilationBuilder::createExecution(ExecutionBuilder** execution) { in createExecution() argument 183 *execution = nullptr; in createExecution() 188 *execution = nullptr; in createExecution() 191 *execution = new (std::nothrow) ExecutionBuilder(this); in createExecution() 192 return (*execution ? ANEURALNETWORKS_NO_ERROR : ANEURALNETWORKS_OUT_OF_MEMORY); in createExecution()
|
/frameworks/ml/nn/tools/api/ |
D | NeuralNetworks.t | 208 * invalid execution definition or invalid data at execution time. 213 * Failure caused by failed model execution. 314 // If no dependencies specified (for example, if the execution was scheduled other 322 // If no dependencies specified (for example, if the execution was scheduled other 330 * Relative execution priority. 357 * an execution. See {@link ANeuralNetworksExecution_setInputFromMemory} 371 * created using such a model, any execution object or burst object created 372 * using such a compilation, or any execution which references this memory 413 * This includes any compilation, execution object or burst object created using 452 * This includes any execution object or burst object created using the compilation, [all …]
|
/frameworks/ml/nn/runtime/test/android_fuzzing/ |
D | FuzzTest.cpp | 105 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()
|
/frameworks/ml/nn/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
|