/frameworks/ml/nn/runtime/test/ |
D | TestValidation.cpp | 768 ANeuralNetworksExecution* execution = nullptr; in TEST_F() local 769 EXPECT_EQ(ANeuralNetworksExecution_create(nullptr, &execution), in TEST_F() 773 EXPECT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_BAD_STATE); in TEST_F() 793 ANeuralNetworksExecution* execution; in TEST_F() local 794 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), ANEURALNETWORKS_NO_ERROR); in TEST_F() 796 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, false), in TEST_F() 798 EXPECT_EQ(ANeuralNetworksExecution_setMeasureTiming(execution, true), ANEURALNETWORKS_BAD_DATA); in TEST_F() 809 ANeuralNetworksExecution* execution; in TEST_F() local 810 ASSERT_EQ(ANeuralNetworksExecution_create(mCompilation, &execution), in TEST_F() 815 ASSERT_EQ(ANeuralNetworksExecution_setInput(execution, 0, nullptr, &in0, sizeof(in0)), in TEST_F() [all …]
|
D | TestTrivialModel.cpp | 121 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() 181 Execution execution(&compilation); in TEST_F() local 182 ASSERT_EQ(execution.setInput(0, matrix1, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 183 ASSERT_EQ(execution.setInput(1, matrix2b, sizeof(Matrix4)), Result::NO_ERROR); in TEST_F() 184 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F() 185 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F() [all …]
|
D | TestGenerated.cpp | 136 Execution execution(compilation); in executeWithCompilation() local 141 for_all(inputs, [&execution](int idx, const void* p, size_t s) { in executeWithCompilation() 143 ASSERT_EQ(Result::NO_ERROR, execution.setInput(idx, buffer, s)); in executeWithCompilation() 148 for_all(test, [&execution](int idx, void* p, size_t s) { in executeWithCompilation() 150 ASSERT_EQ(Result::NO_ERROR, execution.setOutput(idx, buffer, s)); in executeWithCompilation() 154 Result r = execution.compute(); in executeWithCompilation() 161 test.operandDimensions, [&execution](int idx, std::vector<uint32_t>& t) { in executeWithCompilation() 162 ASSERT_EQ(Result::NO_ERROR, execution.getOutputOperandDimensions(idx, &t)); in executeWithCompilation()
|
D | TestExecution.cpp | 418 void setInputOutput(WrapperExecution* execution) { in setInputOutput() argument 421 ASSERT_EQ(execution->setInput(0, &mInputBuffer, sizeof(mInputBuffer)), Result::NO_ERROR); in setInputOutput() 422 ASSERT_EQ(execution->setOutput(0, &mOutputBuffer, sizeof(mOutputBuffer)), Result::NO_ERROR); in setInputOutput() 458 WrapperExecution execution(&mCompilation); in TestWait() local 459 ASSERT_NO_FATAL_FAILURE(setInputOutput(&execution)); in TestWait() 461 ASSERT_EQ(execution.startCompute(&event), Result::NO_ERROR); in TestWait() 469 ASSERT_EQ(execution.getOutputOperandDimensions(0, &dimensions), in TestWait() 472 ASSERT_EQ(execution.getOutputOperandDimensions(0, &dimensions), Result::NO_ERROR); in TestWait() 481 WrapperExecution execution(&mCompilation); in TestWait() local 482 ASSERT_NO_FATAL_FAILURE(setInputOutput(&execution)); in TestWait() [all …]
|
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 | TestUnknownDimensions.cpp | 228 Execution execution(&compilation); in TestOne() local 270 ASSERT_EQ(execution.setInput(0, ones, sizeAtSet(paramsForInput0), typeAtSet(paramsForInput0)), in TestOne() 272 ASSERT_EQ(execution.setInput(1, twos, sizeAtSet(paramsForInput1), typeAtSet(paramsForInput1)), in TestOne() 274 ASSERT_EQ(execution.setOutput(0, actual, sizeAtSet(paramsForOutput), in TestOne() 279 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TestOne() 283 ASSERT_NE(execution.compute(), Result::NO_ERROR); in TestOne()
|
D | TestMemoryInternal.cpp | 273 WrapperExecution execution(&compilation); in TEST_F() local 277 ASSERT_EQ(WrapperResult::NO_ERROR, execution.setInput(0, input, sizeof(input))); in TEST_F() 279 ASSERT_EQ(WrapperResult::NO_ERROR, execution.setOutput(0, output, sizeof(output))); in TEST_F() 282 WrapperResult r = execution.compute(); in TEST_F()
|
/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 | 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 | 193 Execution execution(&compilation); in Invoke() local 195 ASSERT_EQ(execution.setInput(LSTMCell::k##X##Tensor, X##_.data(), \ in Invoke() 204 ASSERT_EQ(execution.setOutput(LSTMCell::k##X##Tensor, X##_.data(), \ in Invoke() 213 execution.setInput(LSTMCell::kInputToInputWeightsTensor, nullptr, 0); in Invoke() 214 execution.setInput(LSTMCell::kRecurrentToInputWeightsTensor, nullptr, 0); in Invoke() 219 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke() 222 execution.setInput(LSTMCell::kCellToInputWeightsTensor, nullptr, 0); in Invoke() 223 execution.setInput(LSTMCell::kCellToForgetWeightsTensor, nullptr, 0); in Invoke() 224 execution.setInput(LSTMCell::kCellToOutputWeightsTensor, nullptr, 0); in Invoke() 229 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 | 102 Execution execution(&compilation); in Invoke() local 106 execution.setInput(LSHProjection::k##X##Tensor, X##_.data(), sizeof(T) * X##_.size()), \ in Invoke() 114 ASSERT_EQ(execution.setOutput(LSHProjection::k##X##Tensor, X##_.data(), \ in Invoke() 122 ASSERT_EQ(execution.setInput(LSHProjection::kTypeParam, &type_, sizeof(type_)), in Invoke() 125 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | EmbeddingLookupTest.cpp | 96 Execution execution(&compilation); in Invoke() local 99 ASSERT_EQ(execution.setInput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke() 108 ASSERT_EQ(execution.setOutput(EmbeddingLookup::k##X##Tensor, X##_.data(), \ in Invoke() 116 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | SVDFTest.cpp | 259 Execution execution(&compilation); in Invoke() local 264 ASSERT_EQ(execution.setInput(SVDF::k##X##Tensor, X##_.data(), \ in Invoke() 274 ASSERT_EQ(execution.setOutput(SVDF::k##X##Tensor, X##_.data(), \ in Invoke() 282 ASSERT_EQ(execution.setInput(SVDF::kRankParam, &rank_, sizeof(rank_)), in Invoke() 286 ASSERT_EQ(execution.setInput(SVDF::kActivationParam, &activation, in Invoke() 290 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | RNNTest.cpp | 222 Execution execution(&compilation); in Invoke() local 224 ASSERT_EQ(execution.setInput(RNN::k##X##Tensor, X##_.data(), \ in Invoke() 233 ASSERT_EQ(execution.setOutput(RNN::k##X##Tensor, X##_.data(), \ in Invoke() 241 ASSERT_EQ(execution.setInput(RNN::kActivationParam, &activation_, in Invoke() 245 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
D | HashtableLookupTest.cpp | 110 Execution execution(&compilation); in Invoke() local 113 ASSERT_EQ(execution.setInput(HashtableLookup::k##X##Tensor, X##_.data(), \ in Invoke() 122 ASSERT_EQ(execution.setOutput(HashtableLookup::k##X##Tensor, X##_.data(), \ in Invoke() 130 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in Invoke()
|
/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/include/ |
D | NeuralNetworks.h | 5531 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) __INTRODUCED_IN(29); 5554 int ANeuralNetworksExecution_getOutputOperandRank(ANeuralNetworksExecution* execution, 5579 int ANeuralNetworksExecution_getOutputOperandDimensions(ANeuralNetworksExecution* execution, 5632 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, 5691 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) 5725 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, 6175 ANeuralNetworksExecution** execution) __INTRODUCED_IN(27); 6194 void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution) __INTRODUCED_IN(27); 6232 int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32_t index, 6275 int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execution, int32_t index, [all …]
|
/frameworks/ml/nn/runtime/ |
D | NeuralNetworks.cpp | 725 int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) { in ANeuralNetworksExecution_compute() argument 727 if (!execution) { in ANeuralNetworksExecution_compute() 733 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_compute() 737 int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure) { in ANeuralNetworksExecution_setMeasureTiming() argument 739 if (!execution) { in ANeuralNetworksExecution_setMeasureTiming() 743 ExecutionBuilder* r = reinterpret_cast<ExecutionBuilder*>(execution); in ANeuralNetworksExecution_setMeasureTiming() 747 int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_getDuration() argument 750 if (!execution || !duration) { in ANeuralNetworksExecution_getDuration() 763 const ExecutionBuilder* r = reinterpret_cast<const ExecutionBuilder*>(execution); in ANeuralNetworksExecution_getDuration() 789 int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution, in ANeuralNetworksExecution_burstCompute() argument [all …]
|
D | CompilationBuilder.cpp | 133 int CompilationBuilder::createExecution(ExecutionBuilder **execution) { in createExecution() argument 136 *execution = nullptr; in createExecution() 141 *execution = nullptr; in createExecution() 144 *execution = new (std::nothrow) ExecutionBuilder(this); in createExecution() 145 return (*execution ? ANEURALNETWORKS_NO_ERROR : ANEURALNETWORKS_OUT_OF_MEMORY); in createExecution()
|
D | CompilationBuilder.h | 53 int createExecution(ExecutionBuilder** execution);
|
/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
|
D | make_golden.sh | 8 ../../parse_systrace.py --per-execution hdrnet.html > hdrnet-bm.txt
|
/frameworks/ml/nn/runtime/test/fuzzing/ |
D | TestRandomGraph.cpp | 257 test_wrapper::Execution execution(&compilation); in computeAndVerifyResultsForDevice() local 260 mGraph.createRequest(&execution); in computeAndVerifyResultsForDevice() 262 mGraph.createRequest(&execution, &outputs); in computeAndVerifyResultsForDevice() 266 Result executeReturn = execution.compute(); in computeAndVerifyResultsForDevice() 293 test_wrapper::Execution execution(&compilation); in computeAndVerifyResults() local 295 mGraph.createRequest(&execution, &outputs); in computeAndVerifyResults() 298 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in computeAndVerifyResults()
|
D | RandomGraphGenerator.cpp | 250 void RandomGraph::createRequest(test_wrapper::Execution* execution, in createRequest() argument 256 EXPECT_EQ(execution->setInput(operand->ioIndex, operand->buffer.data(), in createRequest() 261 EXPECT_EQ(execution->setOutput(operand->ioIndex, operand->buffer.data(), in createRequest() 267 EXPECT_EQ(execution->setOutput(operand->ioIndex, buffers->back().data(), in createRequest()
|