Age | Commit message (Collapse) | Author |
|
Change-Id: I6b3acf023780524076585f8c581f258d2635093a
|
|
This CL adds the following additional bounds checks:
* Adds additional checks of the index of the std::vector before
accessing the element at the index
* Changes the array index operator [] to the checked std::vector::at
method
Bug: 256589724
Test: mma
Merged-In: I6bfb02a5cd76258284cc4d797a4508b21e672c4b
Change-Id: I6bfb02a5cd76258284cc4d797a4508b21e672c4b
(cherry picked from commit 9b17e6485b12e20cd73c4b0b71e5798e608a177a)
Merged-In: I6bfb02a5cd76258284cc4d797a4508b21e672c4b
|
|
Change-Id: Ifd94c5f23194526eeb62cfe29ad19207671380ad
|
|
Prior to this change, if IDevice::prepareModel* was passed a null
callback, the code would still attempt to call "notify" on the callback
to return the error to the client. This CL ensures the "notify" method
will not be invoked if the callback is null.
Bug: 230914930
Test: mma
Test: presubmit
Change-Id: I4a15d02c4879a0261ec26cc0e7a47d0a4da86b8b
Merged-In: I4a15d02c4879a0261ec26cc0e7a47d0a4da86b8b
(cherry picked from commit d6f6d01499d84d0186114262a5bd190aa09e99fa)
|
|
|
|
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
|
|
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
|
|
Change-Id: I3bce78ab5d441ef9e6c038cf7ebea0adcc41d47e
|
|
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
|
|
Change-Id: Ic15874018152ca90e6f51bdb1be1b24eb32d57dd
|
|
Change-Id: Iad9e960e034127e3320f78d2eadd23e36300b10c
|
|
Change-Id: Ia39c40c82efb5b7c7d2ad4c464b75e6fd4e073aa
|
|
f955569c8a am: c7d8c19823 am: 277e31957b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2005130
Change-Id: Ic8e1f71731ef3f429ec363a0730c0baafdf751b0
|
|
This change alters the asynchronous execute* methods to be handled
synchronously (from the same thread) for three reasons:
1) To remove the need to use IPreparedModel::getUnderlyingResource
2) To simplify the code
3) To make the code more performant
Bug: N/A
Test: mma
Test: presubmit
Change-Id: I2c37deb03d1b1c34b0173bd741e55fce4de757f7
|
|
5eb895c047 am: bbd66d27a0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1999055
Change-Id: Ie0a38cc29d50c65b8168435c70786321fc9de199
|
|
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
|
|
am: 6d588b7cd9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1997731
Change-Id: I2bfc9dbc8c7fbc0940eed48968dc5df89314b08c
|
|
fa83970b3a am: 581616e658
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232
Change-Id: I2eac13fe3b5ab0b4f15d6ceadf376e5e74124a81
|
|
|
|
|
|
These defines are redundant because they are already defined in
neuralnetworks_utils_defaults.
Bug: N/A
Test: mma
Change-Id: I1c5c44e9e61da19bc10dd8ed2e38099f7c4baccd
|
|
* 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
|
|
3d9540d5ed am: 7c858f2ae4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1985407
Change-Id: I25779bbd5701bb1a3c0c6c3dcc2e82a5e50ec271
|
|
27e3ce4cf6 am: 9c4d73c39d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1985406
Change-Id: I6b5669f02cf59128acb218d0baf1a2ea3cc99b39
|
|
The NNAPI originally planned to have updated platform drivers delivered
through GMSCore. These updatable drivers would be retrieved through the
NN sAIDL utility code, and were known to be updatable through
Manager.cpp's Device::isUpdatable query.
However, the NNAPI ultimately did not move forward with its updatability
plans. This CL removes the updatability check in the NN AIDL utility
code.
Bug: N/A
Test: mma
Test: CtsNNAPITestCases
Test: NeuralNetworksTest_static
Change-Id: I6f9c1eac3af8cb54565bfaaeab7ddd382a85e3bd
|
|
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
|
|
Change-Id: Ibf6bd2c20d9927fde8b2a05dde2b58bd8faea20f
|
|
am: cfa3838085 am: aba49d0512
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1957303
Change-Id: I88834c87adc1958cfd6cc68929d38eaad43c2d93
|
|
- 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
|
|
Change-Id: Ie5eba313ee102e452f5f96942ed2f3a7bb4e8f01
|
|
ea3e90c1f1 am: 0d612d723b am: f288828f8e am: 67a0cba6b5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1966388
Change-Id: Ie8eccccc4d97287b776cf786d146f4cf80f1edc5
|
|
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
|
|
Change-Id: I655d5412ccd734059dfb19075bb9abc810396975
|
|
Change-Id: Ib12bd53bdfdf84dde7b986f5e2ae5392cd672882
|
|
am: ca13a2b719 am: c5699bca62 am: b81e3f351c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1946651
Change-Id: I34ce4c7d79fe86d57399daf363178d436e227fc2
|
|
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
|
|
Change-Id: I8b3a43021a3328cf6afb4e7e157339d8e214ddbe
|
|
fd0636d14b am: b3d989c805 am: 2dddfa7d4a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1950217
Change-Id: Ibf979c129b008a94d1b729e84cc2e338624e176b
|
|
|
|
Bug: N/A
Test: mma
Change-Id: I0243c477098d9a2de28ca78bfde155d3ecb5acb6
|
|
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)
|
|
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
|
|
- 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)
|
|
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)
|
|
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)
|
|
- 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
|
|
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
|
|
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
|
|
Change-Id: Iba540947aa34084b7ef3210f93332bb757b4bb43
|
|
b81359e293 am: 9894d5625f am: 112d1a22f1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1947667
Change-Id: Ia846557ffc6b8a0b5e897690e75aed2950bfbd23
|