/aosp12/hardware/interfaces/neuralnetworks/utils/common/test/ |
H A D | ResilientExecution.cpp | 94 const auto result = execution->getExecution(); in TEST() 106 const auto result = execution->compute({}); in TEST() 119 const auto result = execution->compute({}); in TEST() 133 const auto result = execution->compute({}); in TEST() 149 const auto result = execution->compute({}); in TEST() 164 const auto result = execution->computeFenced({}, {}, {}); in TEST() 177 const auto result = execution->computeFenced({}, {}, {}); in TEST() 191 const auto result = execution->computeFenced({}, {}, {}); in TEST() 209 const auto result = execution->computeFenced({}, {}, {}); in TEST() 223 const auto result = execution->recover(mockExecution.get()); in TEST() [all …]
|
/aosp12/packages/modules/NeuralNetworks/runtime/test/ |
H A D | TestValidation.cpp | 1249 ANeuralNetworksExecution* execution; in TEST_F() local 1262 ANeuralNetworksExecution* execution; in TEST_F() local 1846 ANeuralNetworksExecution* execution; in TEST_F() local 2244 ANeuralNetworksExecution* execution; in TEST_F() local 2277 ANeuralNetworksExecution* execution; in TEST_F() local 2359 ANeuralNetworksExecution* execution; in TEST_F() local 2539 ANeuralNetworksExecution* execution; in TEST_F() local 2633 ANeuralNetworksExecution* execution; in TEST_F() local 2674 ANeuralNetworksExecution* execution; in TEST_F() local 2990 ANeuralNetworksExecution* execution; in TEST_F() local [all …]
|
H A 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() 125 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F() 158 Execution execution(&compilation); in testAddTwoWithHardwareBufferInput() local 178 ANeuralNetworksExecution* executionHandle = execution.getHandle(); in testAddTwoWithHardwareBufferInput() 186 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in testAddTwoWithHardwareBufferInput() 293 Execution execution(&compilation); in TEST_F() local 297 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in TEST_F() 322 Execution execution(&compilation); in TEST_F() local [all …]
|
H A D | TestExecution.cpp | 762 WrapperExecution execution(&mCompilation); in TestWait() local 765 const auto compute = [this, &execution] { in TestWait() 769 getDimensionsWhileRunning(execution); in TestWait() 793 const auto compute = [this, &execution] { in TestWait() 795 std::thread run([this, &execution] { EXPECT_EQ(execution.compute(), kExpectResult); }); in TestWait() 796 getDimensionsWhileRunning(execution); in TestWait() 825 const auto compute = [this, &execution] { in TestWait() 827 std::thread run([this, &execution] { in TestWait() 830 getDimensionsWhileRunning(execution); in TestWait() 856 const auto compute = [this, &execution] { in TestWait() [all …]
|
H A 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()
|
H A 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()
|
H A D | TestGenerated.cpp | 179 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() 262 Result result = execution.compute(mComputeMode); in executeInternal() [all …]
|
/aosp12/hardware/interfaces/neuralnetworks/utils/common/src/ |
H A D | ResilientExecution.cpp | 42 auto execution = resilientExecution.getExecution(); in protect() local 43 auto result = fn(*execution); in protect() 51 auto maybeExecution = resilientExecution.recover(execution.get()); in protect() 59 execution = std::move(maybeExecution).value(); in protect() 61 return fn(*execution); in protect() 72 auto execution = NN_TRY(makeExecution()); in create() local 73 CHECK(execution != nullptr); in create() 75 std::move(execution)); in create() 79 nn::SharedExecution execution) in ResilientExecution() argument 105 const auto fn = [&deadline](const nn::IExecution& execution) { in compute() argument [all …]
|
/aosp12/hardware/interfaces/neuralnetworks/1.3/ |
H A D | IPreparedModel.hal | 36 * Launches an asynchronous execution on a prepared model. 53 * the execution. 98 * execution may be aborted. 131 * Performs a synchronous execution on a prepared model. 139 * perform the execution, and must not return until the execution is 157 * execution may be aborted, and either {@link 182 * execution may be aborted. 192 * @return status Error status of the execution, must be: 235 * to be signaled before starting the actual execution. 276 * execution may be aborted. [all …]
|
H A D | IExecutionCallback.hal | 25 * execution asynchronously launched from IPreparedModel::execute*. 33 * finished performing the execution. One of the notify methods must be 34 * provided with the ErrorStatus from the execution. If the asynchronous 41 * - NONE if the asynchronous execution was successful 50 * - MISSED_DEADLINE_* if the execution is aborted because it 58 * @param timing Duration of execution. Unless MeasureTiming::YES was passed when 59 * launching the execution and status is NONE, all times must
|
/aosp12/packages/modules/NeuralNetworks/runtime/include/ |
H A D | NeuralNetworks.h | 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, 1461 int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32_t index, 1596 int ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution, int32_t index, 1728 int ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution* execution, 1985 ANeuralNetworksExecution* execution, const ANeuralNetworksEvent* const* dependencies, 2060 int ANeuralNetworksExecution_enableInputAndOutputPadding(ANeuralNetworksExecution* execution, [all …]
|
/aosp12/packages/modules/NeuralNetworks/common/operations/ |
H A 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() 105 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kInputToCellWeightsTensor, in invoke() 126 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kForgetGateBiasTensor, in invoke() 131 ASSERT_EQ(setInputTensor(&execution, QuantizedLSTMCell::kOutputGateBiasTensor, in invoke() 143 ASSERT_EQ(setOutputTensor(&execution, QuantizedLSTMCell::kOutputTensor, &output_), in invoke() 146 ASSERT_EQ(execution.compute(), Result::NO_ERROR); in invoke() 227 return execution->setInput(tensor, data.data(), sizeof(T) * data.size()); in setInputTensor() 230 Result setOutputTensor(Execution* execution, int tensor, std::vector<T>* data) { in setOutputTensor() argument [all …]
|
H A D | LayerNormLSTMTest.cpp | 207 Execution execution(&compilation); in Invoke() local 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() 247 execution.setInput(LSTMCell::kProjectionWeightsTensor, nullptr, 0); in Invoke() 248 execution.setInput(LSTMCell::kProjectionBiasTensor, nullptr, 0); in Invoke() [all …]
|
H A D | LSTMTest.cpp | 196 Execution execution(&compilation); in Invoke() local 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() 235 execution.setInput(LSTMCell::kProjectionWeightsTensor, nullptr, 0); in Invoke() 236 execution.setInput(LSTMCell::kProjectionBiasTensor, nullptr, 0); in Invoke() [all …]
|
H A 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()
|
/aosp12/packages/modules/NeuralNetworks/shim_and_sl/public/ |
H A D | NeuralNetworksSupportLibraryImpl.h | 518 int (*ANeuralNetworksExecution_burstCompute)(ANeuralNetworksExecution* execution, 527 int (*ANeuralNetworksExecution_compute)(ANeuralNetworksExecution* execution); 536 ANeuralNetworksExecution** execution); 553 void (*ANeuralNetworksExecution_free)(ANeuralNetworksExecution* execution); 561 int (*ANeuralNetworksExecution_getDuration)(const ANeuralNetworksExecution* execution, 579 int (*ANeuralNetworksExecution_getOutputOperandRank)(ANeuralNetworksExecution* execution, 598 int (*ANeuralNetworksExecution_setInputFromMemory)(ANeuralNetworksExecution* execution, 610 int (*ANeuralNetworksExecution_setLoopTimeout)(ANeuralNetworksExecution* execution, 619 int (*ANeuralNetworksExecution_setMeasureTiming)(ANeuralNetworksExecution* execution, 638 int (*ANeuralNetworksExecution_setOutputFromMemory)(ANeuralNetworksExecution* execution, [all …]
|
/aosp12/hardware/interfaces/neuralnetworks/1.2/ |
H A D | IPreparedModel.hal | 27 * IPreparedModel describes a model that has been prepared for execution and 32 * Launches an asynchronous execution on a prepared model. 45 * When the asynchronous task has finished its execution, it must 48 * the execution. 78 * be called exactly once, even if the execution was 93 * Performs a synchronous execution on a prepared model. 100 * perform the execution, and must not return until the execution is 112 * legal values, then the execution should complete successfully 126 * @return status Error status of the execution, must be: 127 * - NONE if execution is performed successfully [all …]
|
H A D | IExecutionCallback.hal | 24 * execution asynchronously launched from IPreparedModel::execute. 30 * task has finished performing the execution. Either notify_1_2 or notify must be 31 * provided with the ErrorStatus from the execution. If the asynchronous task is 38 * - NONE if the asynchronous execution was successful 52 * @return Timing Duration of execution. Unless MeasureTiming::YES was passed when 53 * launching the execution and status is NONE, all times must
|
H A D | types.t | 120 * execution request (a {@link @1.0::Request} object and a {@link MeasureTiming} 123 * The serialized representation for a particular execution is referred to later 223 * for the inputs and outputs of an execution. However, these memory pools 237 * Specifies whether or not to measure duration of the execution. The 247 * values returned from an execution ({@link @1.0::ErrorStatus}, 251 * The serialized representation for a particular execution is referred to later 257 * The execution return values ({@link @1.0::ErrorStatus} and 278 * Status of the execution. 307 * execution. 322 * Duration of execution. Unless measurement was requested and execution
|
/aosp12/packages/modules/NeuralNetworks/shim_and_sl/ |
H A D | ShimPreparedModel.cpp | 46 ::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() 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() 276 auto execution = in executeSynchronously() local [all …]
|
/aosp12/frameworks/base/core/java/android/os/ |
H A 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()
|
/aosp12/packages/modules/NeuralNetworks/runtime/ |
H A D | NeuralNetworks.cpp | 827 if (!execution) { in ANeuralNetworksExecution_compute() 839 if (!execution) { in ANeuralNetworksExecution_setMeasureTiming() 894 if (!execution || !burst) { in ANeuralNetworksExecution_burstCompute() 1296 if (!execution || !rank) { in ANeuralNetworksExecution_getOutputOperandRank() 1332 if (!execution || !memory) { in ANeuralNetworksExecution_setInputFromMemory() 1359 if (!execution || !memory) { in ANeuralNetworksExecution_setOutputFromMemory() 1376 if (!execution) { in ANeuralNetworksExecution_startCompute() 1399 if (!execution) { in ANeuralNetworksExecution_setTimeout() 1432 if (!execution) { in ANeuralNetworksExecution_setLoopTimeout() 1615 if (!execution) { in ANeuralNetworksExecution_enableInputAndOutputPadding() [all …]
|
/aosp12/hardware/interfaces/neuralnetworks/1.0/ |
H A D | IPreparedModel.hal | 22 * IPreparedModel describes a model that has been prepared for execution and 27 * Launches an asynchronous execution on a prepared model. 29 * The execution is performed asynchronously with respect to the caller. 34 * launch an asynchronous task to perform the execution in the background, 40 * When the asynchronous task has finished its execution, it must 43 * the execution. 55 * - the execution should launch successfully (ErrorStatus::NONE): There 57 * - if at execution time every operation's input operands have legal 58 * values, the execution should complete successfully (ErrorStatus::NONE): 67 * the execution. The callback object's notify function must [all …]
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/ |
H A D | LockscreenSmartspaceController.kt | 72 private val execution: Execution, 110 execution.assertIsMainThread() 117 execution.assertIsMainThread() 124 execution.assertIsMainThread() 131 execution.assertIsMainThread() 138 execution.assertIsMainThread() 159 execution.assertIsMainThread() 168 execution.assertIsMainThread() 256 execution.assertIsMainThread() 278 execution.assertIsMainThread() [all …]
|
/aosp12/packages/modules/NeuralNetworks/runtime/test/android_fuzzing/ |
H A 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()
|