summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl
AgeCommit message (Collapse)Author
2022-05-15Merge TP1A.220507.001Brian Orr
Change-Id: Ifd94c5f23194526eeb62cfe29ad19207671380ad
2022-04-29Merge "Move NN_TRY macro out of struct initialization" into tm-devMichael Butler
2022-04-28Move NN_TRY macro out of struct initializationMichael Butler
NNAPI NN_TRY macros use Statement Expressions (a GNU extension) to propagate errors. However, a "return" statement in a Statement Expression can lead to memory leaks when the Statement Expression is being used to initialize a member of a struct. Specifically, when one member of a struct is already initialized, and a Statement Expression used to initialize a subsequent member early-returns, the previously initialized members will not have their destructors called. This CL moves any NN_TRY macro out of struct initialization to avoid any potential memory leaks. Bug: 230500484 Test: mma Test: presubmit Change-Id: I3493fd4764f8eacc86750e6414e62bc891abaccd
2022-04-27Do not call releaseMemoryResource on ignored slot in NN VTSMichael Butler
For IBurst, a slot value of -1 indicates the slot should be ignored. However, GeneratedTestHarness still attempts to call IBurst::releaseMemoryResource on ignored slots. Instead, we should skip releasing any ignored slots. Bug: 230103381 Test: mma Test: VtsHalNeuralnetworksTargetTest Test: presubmit Change-Id: I82e538aa0fd9e8ecc077df1c1ceece46a6166e67
2022-04-08Merge TP1A.220404.001Scott Lobdell
Change-Id: I3bce78ab5d441ef9e6c038cf7ebea0adcc41d47e
2022-03-31Freeze AIDL APIs for TMJiyong Park
Bug: 225941299 Test: m Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-17Merge TP1A.220310.002Daniel Norman
Change-Id: Ic15874018152ca90e6f51bdb1be1b24eb32d57dd
2022-03-11Merge TP1A.220225.003Scott Lobdell
Change-Id: Iad9e960e034127e3320f78d2eadd23e36300b10c
2022-03-07Merge TP1A.220209.001Deyao Ren
Change-Id: Ia39c40c82efb5b7c7d2ad4c464b75e6fd4e073aa
2022-03-01Merge "Cast to the underlying type for union tags" am: 6cd0d474b2 am: ↵Treehugger Robot
5eb895c047 am: bbd66d27a0 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1999055 Change-Id: Ie0a38cc29d50c65b8168435c70786321fc9de199
2022-02-26Cast to the underlying type for union tagsJooyung Han
Union tags are of enum type. Streaming it would make more sense by casting to underlying types. For now casting is not required since tags are defined as `enum Tag`. But we're going to change it to `enum class Tag` which won't work with operator<< without casting. Bug: 218912230 Test: m Change-Id: Ia5e8a5c38fe23c72dffbdca320a32abdfa0eb38e
2022-02-24Merge "Remove NN host specific build defines" am: fe9368b729 am: 13a6d16614 ↵Michael Butler
am: 6d588b7cd9 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1997731 Change-Id: I2bfc9dbc8c7fbc0940eed48968dc5df89314b08c
2022-02-24Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f am: ↵Chih-hung Hsieh
fa83970b3a am: 581616e658 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232 Change-Id: I2eac13fe3b5ab0b4f15d6ceadf376e5e74124a81
2022-02-24Merge "Remove NN host specific build defines"Michael Butler
2022-02-23Remove NN host specific build definesMichael Butler
These defines are redundant because they are already defined in neuralnetworks_utils_defaults. Bug: N/A Test: mma Change-Id: I1c5c44e9e61da19bc10dd8ed2e38099f7c4baccd
2022-02-18Add timed out test files to tidy_timeout_srcsChih-Hung Hsieh
* Timed out runs do not show any warning messages. * These test files cannot finish clang-tidy runs with the following settings: TIDY_TIMEOUT=90 WITH_TIDY=1 CLANG_ANALYZER_CHECKS=1 * When TIDY_TIMEOUT is set, in Android continuous builds, tidy_timeout_srcs files will not be compiled by clang-tidy. When developers build locally without TIDY_TIMEOUT, tidy_timeout_srcs files will be compiled. * Some of these test modules may be split into smaller ones, or disable some time consuming checks, and then enable clang-tidy to run within limited time. Bug: 201099167 Test: make droid tidy-hardware-interfaces_subset Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
2022-02-15Merge "Clamp NNAPI HAL Version to runtime version -- hal" am: b66f1308ac am: ↵Michael Butler
27e3ce4cf6 am: 9c4d73c39d Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1985406 Change-Id: I6b5669f02cf59128acb218d0baf1a2ea3cc99b39
2022-02-14Clamp NNAPI HAL Version to runtime version -- halMichael Butler
The NNAPI is a Mainline Module, and its runtime version is determined by an Android Feature Flag to remotely rollout and rollback Feature Levels as needed. This change propagates the maximum feature level version allowed by the runtime to the HAL utility code, and clamps the utility code's version to the version allowed by the runtime. Bug: N/A Test: mma Test: CtsNNAPITestCases Test: NeuralNetworksTest_static Test: logged driver version, set current_feature_level, and verified the driver version was clamped by current_feature_level Change-Id: Ibaa895f8e35d36b2ddf9432b3ef9468e5886075f
2022-02-09Merge TP1A.220126.001Haamed Gheibi
Change-Id: Ibf6bd2c20d9927fde8b2a05dde2b58bd8faea20f
2022-02-09Merge "Address ANAPIC review comments -- hal." am: 8b389e1123 am: 706652c817 ↵Xusong Wang
am: cfa3838085 am: aba49d0512 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1957303 Change-Id: I88834c87adc1958cfd6cc68929d38eaad43c2d93
2022-02-07Address ANAPIC review comments -- hal.Xusong Wang
- Document that IPreparedModel::execute*WithConfig are for single-time usages, and IPreparedModel::createReusableExecution is for reusable usages. - Make PrepareModelConfig::cacheToken a fixed sized array. Fixes: 215566186 Test: VtsHalNeuralnetworksTargetTest Test: NNT_static Change-Id: I9c5a49c46a3eac2828b9eb666f3d742038493121
2022-02-04Merge TP1A.220120.003Haamed Gheibi
Change-Id: Ie5eba313ee102e452f5f96942ed2f3a7bb4e8f01
2022-02-01Merge "Move NNAPI HAL CommonUtils to nnapi/SharedMemory -- hal" am: ↵Michael Butler
ea3e90c1f1 am: 0d612d723b am: f288828f8e am: 67a0cba6b5 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1966388 Change-Id: Ie8eccccc4d97287b776cf786d146f4cf80f1edc5
2022-01-31Move NNAPI HAL CommonUtils to nnapi/SharedMemory -- halMichael Butler
This CL relocates utility code that transfers data between pointer-based memory and shared memory for Request objects and Model objects, moving it from nnapi/hal/CommonUtils.h (hal utilities) to nnapi/SharedMemory.h (canonical library). This change also adds a check for whether Model and Requests have pointer-based data in neuralnetworks/aidl/utils/src/Conversions.cpp to make it consistent with the HIDL utility conversions. Bug: 217217023 Test: mma Test: presubmit Change-Id: I55a0fea186708d806bc709681e10027a9e4b0ffb
2022-01-24Merge TP1A.211214.001Scott Lobdell
Change-Id: Ib12bd53bdfdf84dde7b986f5e2ae5392cd672882
2022-01-22Merge "Make VtsHalNeuralnetworksTargetTest run on the host" am: 8f255182ec ↵Michael Butler
am: ca13a2b719 am: c5699bca62 am: b81e3f351c Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1946651 Change-Id: I34ce4c7d79fe86d57399daf363178d436e227fc2
2022-01-21Make VtsHalNeuralnetworksTargetTest run on the hostMichael Butler
This change adds a host build of VtsHalNeuralnetworksTargetTest. In the existing device build of VtsHalNeuralnetworksTargetTest, the drivers run out-of-process. In the host build of VtsHalNeuralnetworkaTargetTest, the driver runs in-process. The in-process driver that runs on the host is the canonical sample driver (which is just the CPU "driver", located in packages/modules/NeuralNetworks/driver/sample) adapted to an AIDL interface (by the adapter code in hardware/interfaces/neuralnetworks/utils/adapter/aidl). Bug: N/A Test: mma Test: VtsHalNeuralnetworksTargetTest on host Change-Id: Ia30dd3a7db8e0592b9f13d69c9831f8ffe10c371
2022-01-21Merge TP1A.211206.001Scott Lobdell
Change-Id: I8b3a43021a3328cf6afb4e7e157339d8e214ddbe
2022-01-21Merge "Cleanup NN utility libraries' dependencies" am: d3e413e759 am: ↵Michael Butler
fd0636d14b am: b3d989c805 am: 2dddfa7d4a Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1950217 Change-Id: Ibf979c129b008a94d1b729e84cc2e338624e176b
2022-01-20Merge "Cleanup NN utility libraries' dependencies"Michael Butler
2022-01-20Cleanup NN utility libraries' dependenciesMichael Butler
Bug: N/A Test: mma Change-Id: I0243c477098d9a2de28ca78bfde155d3ecb5acb6
2022-01-20HAL interface for compilation and execution hintsMiao Wang
The following AIDL types are added: - TokenValuePair - PrepareModelConfig - ExecutionConfig The following AIDL methods are added: - IDevice::prepareModelWithConfig - IPreparedModel::executeSynchronouslyWithConfig - IPreparedModel::executeFencedWithConfig - IBurst::executeSynchronouslyWithConfig The compilation and execution hints are being stored as a list of token-value pairs as part of the PrepareModelConfig / ExecutionConfig. And the PrepareModelConfig / ExecutionConfig parcelables are created in order to make future extensions to the execution related interfaces easier. It is the drivers responsibility to verify the hints, and it is allowed for the driver to ignore them. Bug: 203248587 Test: neuralnetworks_utils_hal_aidl_test Change-Id: I98240fd75089fc85cdfcaa0be28aab8a6f0dfca5 Merged-In: I98240fd75089fc85cdfcaa0be28aab8a6f0dfca5 (cherry picked from commit 0e671f3edb9d2c78658a4ef4169e3211e3f9bb00)
2022-01-20HAL interface for compilation and execution hintsMiao Wang
The following AIDL types are added: - TokenValuePair - PrepareModelConfig - ExecutionConfig The following AIDL methods are added: - IDevice::prepareModelWithConfig - IPreparedModel::executeSynchronouslyWithConfig - IPreparedModel::executeFencedWithConfig - IBurst::executeSynchronouslyWithConfig The compilation and execution hints are being stored as a list of token-value pairs as part of the PrepareModelConfig / ExecutionConfig. And the PrepareModelConfig / ExecutionConfig parcelables are created in order to make future extensions to the execution related interfaces easier. It is the drivers responsibility to verify the hints, and it is allowed for the driver to ignore them. Bug: 203248587 Test: neuralnetworks_utils_hal_aidl_test Change-Id: I98240fd75089fc85cdfcaa0be28aab8a6f0dfca5
2022-01-19Add VTS tests for reusable execution.Xusong Wang
- Modified generated tests and validation tests to exercise reusable execution. - Add a scoped trace to print the test config when an error occurs Bug: 202405342 Bug: 202431255 Test: VtsHalNeuralnetworksTargetTest Change-Id: I3e2346903e430080ec4d926bf08daf6825ea4dce Merged-In: I3e2346903e430080ec4d926bf08daf6825ea4dce (cherry picked from commit 859200800c70a5780931abc8db40b7ade99eef12)
2022-01-18Reusable execution at HAL level -- HAL.Xusong Wang
This CL modifies the canonical/AIDL adapter to use IExecution object if available. Bug: 202405342 Bug: 202431255 Test: NNT_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksTargetTest Change-Id: I6aac3c57f97ac87a5ba3f78cfd843fcc403decff Merged-In: I6aac3c57f97ac87a5ba3f78cfd843fcc403decff (cherry picked from commit 7f5c7d293c2dad462dc9c0f1f1a160fb2c2c9a9b)
2022-01-18Define AIDL reusable execution interface.Xusong Wang
This CL defines the AIDL interface for reusable execution. This CL also fixes a stale statement in IBurst about deadlineNs: boot_clock should be used rather than steady_clock. Bug: 202405342 Bug: 202431255 Test: NNT_static Test: VtsHalNeuralnetworksTargetTest Change-Id: I07d26909081018ffd92264d76109a66d4a0de3bd Merged-In: I07d26909081018ffd92264d76109a66d4a0de3bd (cherry picked from commit 0d9b1a9d287d3751c305742af81850b7ceea0c6b)
2022-01-18Add VTS tests for reusable execution.Xusong Wang
- Modified generated tests and validation tests to exercise reusable execution. - Add a scoped trace to print the test config when an error occurs Bug: 202405342 Bug: 202431255 Test: VtsHalNeuralnetworksTargetTest Change-Id: I3e2346903e430080ec4d926bf08daf6825ea4dce
2022-01-14Reusable execution at HAL level -- HAL.Xusong Wang
This CL modifies the canonical/AIDL adapter to use IExecution object if available. Bug: 202405342 Bug: 202431255 Test: NNT_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksTargetTest Change-Id: I6aac3c57f97ac87a5ba3f78cfd843fcc403decff
2022-01-14Define AIDL reusable execution interface.Xusong Wang
This CL defines the AIDL interface for reusable execution. This CL also fixes a stale statement in IBurst about deadlineNs: boot_clock should be used rather than steady_clock. Bug: 202405342 Bug: 202431255 Test: NNT_static Test: VtsHalNeuralnetworksTargetTest Change-Id: I07d26909081018ffd92264d76109a66d4a0de3bd
2022-01-14Merge TP1A.211116.001Scott Lobdell
Change-Id: Iba540947aa34084b7ef3210f93332bb757b4bb43
2022-01-13Merge "Freeze neuralnetworks AIDL version as v3 for FL7" am: 3e6d04f6df am: ↵David Gross
b81359e293 am: 9894d5625f am: 112d1a22f1 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1947667 Change-Id: Ia846557ffc6b8a0b5e897690e75aed2950bfbd23
2022-01-13Merge "Freeze neuralnetworks AIDL version as v3 for FL7"David Gross
2022-01-12Freeze neuralnetworks AIDL version as v3 for FL7David Gross
$ m android.hardware.neuralnetworks-update-api $ m android.hardware.neuralnetworks-freeze-api Bug: 202280925 Test: adb shell NeuralNetworksTest_static Test: atest VtsHalNeuralnetworksTargetTest Change-Id: I2b2755d7376bb847b15b395e280bf352b5b9ef55
2022-01-12Merge changes Ifeffea05,I966f65a1 am: 104192c28f am: ca40766dd6 am: ↵Michael Butler
c0bceee092 am: d038448af8 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1944552 Change-Id: If3fb99d21670277bcf99f54d7f064d792e4ee0cc
2022-01-11Create NN AIDL adapterMichael Butler
This change adds the following adapters: * nn::IDevice -> BnDevice * nn::IPreparedModel -> BnPreparedModel * nn::IBurst -> BnBurst * nn::IBuffer -> BnBuffer Bug: N/A Test: mma Test: locally created a binderized service with this adapter code, which passed VtsHalNeuralnetworksTargetTest Change-Id: I966f65a1e4d75284c050b77f3f40c515e4970130
2022-01-10Merge "FL7: Refine MIRROR_PAD specification" am: f914da59a6 am: 7dc880a386 ↵David Gross
am: e22d6fbd77 am: 072433f545 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1940673 Change-Id: I96262f815d9a0296cdf9311c1b585575d2f5296d
2022-01-07FL7: Refine MIRROR_PAD specificationDavid Gross
Test: N/A Bug: 202280925 Change-Id: If19d45d806f6ba33f9aa6c7af9bc411957cdc706
2021-12-16Merge TP1A.211029.001Scott Lobdell
Change-Id: I103ebd13ec220489591b453faccc3f12e5830774
2021-12-10Merge "FL7: Refine REVERSE specification" am: dd26914af7 am: d90a3fdb5a am: ↵David Gross
84924a175d am: 6c9a09cdc5 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1915765 Change-Id: I5b3abc55ef5986a8bbcc5fe102e200d2944029fd
2021-12-08FL7: Refine REVERSE specificationDavid Gross
Test: N/A Bug: 202280925 Change-Id: Iae1f177254023c750c701e6594a61f3958de538c