summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/vts
AgeCommit message (Collapse)Author
2022-05-15Merge TP1A.220507.001Brian Orr
Change-Id: Ifd94c5f23194526eeb62cfe29ad19207671380ad
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-03-11Merge TP1A.220225.003Scott Lobdell
Change-Id: Iad9e960e034127e3320f78d2eadd23e36300b10c
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-09Merge TP1A.220126.001Haamed Gheibi
Change-Id: Ibf6bd2c20d9927fde8b2a05dde2b58bd8faea20f
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-01-24Merge TP1A.211214.001Scott Lobdell
Change-Id: Ib12bd53bdfdf84dde7b986f5e2ae5392cd672882
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-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-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-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-14Merge TP1A.211116.001Scott Lobdell
Change-Id: Iba540947aa34084b7ef3210f93332bb757b4bb43
2021-12-16Merge TP1A.211029.001Scott Lobdell
Change-Id: I103ebd13ec220489591b453faccc3f12e5830774
2021-12-07Merge TP1A.211022.002Scott Lobdell
Change-Id: Iea2bc1b3194b2c7e251bc5b0a8fdd15791cbe7b9
2021-12-02FL7: Add some AIDL_V3 test infrastructureDavid Gross
Test: atest VtsHalNeuralnetworksTargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*abs*:*floor*:*log*:*rsqrt*:*sin*:*sqrt*" Bug: 202280925 Change-Id: I848add0ddb94e1500a5d4d6af5d51ddf5ebba045
2021-11-29Merge TP1A.211018.001Scott Lobdell
Change-Id: Idcb67c45e24a44ede33d72aa3f7c8d3acb75e94f
2021-11-15Consolidate NNAPI OWNERS filesMichael Butler
This change deletes all existing OWNERS files under hardware/interfaces/neuralnetworks and creates a new OWNERS file with the current NNAPI team members. This change also updates the NNAPI project path in hardware/interfaces/neuralnetworks/README. Bug: 179510251 Test: N/A Change-Id: Iaca69505c8449ae7d93be0db99205f5f56556e86
2021-11-05Remove unnecessary NNAPI header filesMichael Butler
This change removes the following header files, which were created temporarily while NNAPI utility code was being re-organized, and are no longer needed: * include/AidlBufferTracker.h * include/AidlHalInterfaces.h * include/AidlHalUtils.h * include/AidlValidateHal.h Bug: 191442336 Test: mma Test: atest neuralnetworks_utils_hal_* Change-Id: I895d0bf6b5fd0ec4ef2977da0ecfe2a106e44083
2021-10-29Revert^2 "Provide explicitly versioned NNAPI AIDL utils libs -- HAL."Michael Butler
Reason for revert: rollforward fix of this topic This change is a revert of I3d3ac4745, which itself is a revert of I74f1798e8. This CL modifies the AIDL utils libraries to be explicitly versioned. Currently, we only have two versions: v1 and "current". Specifically, the following changes are made: - Remove AIDL dependencies from neuralnetworks_utils_hal_common - Create explicitly versioned libs of neuralnetworks_utils_hal_aidl* This is needed because it is not allowed for a build target to link against multiple versions of the same AIDL lirary. The canonical driver will report ANDROID_S for AIDL v1, and FL6 for v2. Reverted Changes: I2aefa0023:Revert "Use explicitly versioned NNAPI HAL util li... Ia7df07ab9:Revert "Add neuralnetworks_utils_hal_aidl_v2 to al... Iadd823460:Revert "Provide explicitly version NNAPI AIDL util... I3d3ac4745:Revert "Provide explicitly versioned NNAPI AIDL ut... Bug: 202405342 Test: NNT_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksTargetTest Change-Id: Ib3b732aa406f6d37e8f941082807c9232720c909 Merged-In: Ib3b732aa406f6d37e8f941082807c9232720c909 (cherry picked from commit 478a78ea77fccf332b04d5ad25309428d0f96eaf)
2021-10-27Add FL6 spec tests to AIDL VTS. am: ca46f9768c am: 65a058482b am: 1a1d9d0325 ↵Ian Hua
am: cc144fffe5 am: 71e94d7243 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1866682 Change-Id: Ib085391c12ee7d82ced9f321d89799d736e7c877
2021-10-27Add FL6 spec tests to AIDL VTS.Ian Hua
Also skip FL6 (AIDL_V2) tests for older AIDL drivers. Bug: 203038813 Test: VtsHalNeuralnetworksTargetTest Specifically, for old driver such as AIDL_V1 sample driver, it can pass HIDL tests and skip AIDL_V2 tests. For new driver such as AIDL_V2 sample driver, it can pass all tests. Change-Id: I689fef0945428f6548977628e3c43628dd1e5bf7
2021-10-27Merge changes Iae9f692f,Ib43f1cb6,I9d4f0c30,I7d06ea35 am: 5f14bad22c am: ↵Michael Butler
b9aff55ad9 am: 6109e931d9 am: ebab2cdef5 am: 1fb34517fc Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1863342 Change-Id: Id84736e9ef21fb82f3905204498700ffb56c0390
2021-10-26Remove hal::utils::countNumberOfConsumersMichael Butler
This CL removes hal::utils::countNumberOfConsumers and uses the existing nn::countNumberOfConsumers. This change is part of a larger chain of changes to remove HIDL and AIDL libraries from neuralnetworks_utils_hal_common. Bug: N/A Test: mma Change-Id: I7d06ea355eae7aa80b94b09a23d606bbb2322120
2021-10-26Revert "Provide explicitly versioned NNAPI AIDL utils libs -- HAL."Michael Butler
Revert "Use explicitly versioned NNAPI HAL util libs in darwinn2." Revert "Add neuralnetworks_utils_hal_aidl_v2 to allowed_deps.txt" Revert "Provide explicitly version NNAPI AIDL utils lib -- runtime." Revert submission 16007539-nnapi-experimental-aidl-feature Reason for revert: The cherry-pick of this CL breaks the build Reverted Changes: Ieb2da3461:Add neuralnetworks_utils_hal_aidl_v2 to allowed_de... I8ae01e3c6:Provide explicitly version NNAPI AIDL utils lib --... I74f1798e8:Provide explicitly versioned NNAPI AIDL utils libs... I2362464e8:Use explicitly versioned NNAPI HAL util libs in da... Change-Id: I3d3ac4745fb707cbdceb2019f3c2fc7807183b71
2021-10-23Merge TP1A.211006.001Haamed Gheibi
Change-Id: I9165b331c1bb047a17950a425ae9eeed6aff127c
2021-10-21Provide explicitly versioned NNAPI AIDL utils libs -- HAL.Xusong Wang
This CL modifies the AIDL utils libraries to be explicitly versioned. Currently, we only have two versions: v1 and "current". Specifically, the following changes are made: - Remove AIDL dependencies from neuralnetworks_utils_hal_common - Create explicitly versioned libs of neuralnetworks_utils_hal_aidl_* This is needed because it is not allowed for a build target to link against multiple versions of the same AIDL lirary. The canonical driver will report ANDROID_S for AIDL v1, and FL6 for v2. Bug: 202405342 Test: NNT_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksTargetTest Change-Id: I74f1798e80a059949e43e0567d23e884a7f7c92d
2021-10-18AIDL interface changes for NNAPI feature level 6.Ian Hua
- Add BATCH_MATMUL operation - Support TENSOR_INT32 for RESHAPE operation. Also update "current" version snapshot and use android.hardware.neuralnetworks-V2-ndk since AIDL v1 has been frozen. Bug: 193012662 Bug: 200281183 Test: mm Change-Id: Iabe45c57e2306d61055f711eda03b80b9cbe906d Merged-In: Iabe45c57e2306d61055f711eda03b80b9cbe906d
2021-10-18Merge "AIDL interface changes for NNAPI feature level 6."Ian Hua
2021-10-15AIDL interface changes for NNAPI feature level 6.Ian Hua
- Add BATCH_MATMUL operation - Support TENSOR_INT32 for RESHAPE operation. Also update "current" version snapshot and use android.hardware.neuralnetworks-V2-ndk since AIDL v1 has been frozen. Bug: 193012662 Bug: 200281183 Test: NeuralNetworksTest_static,VtsHalNeuralnetworksTargetTest Change-Id: Iabe45c57e2306d61055f711eda03b80b9cbe906d
2021-10-15Merge "Update OWNERS file" am: 996054b24f am: fd6488319e am: f64e152e7b am: ↵Przemyslaw Szczepaniak
329d170010 am: 6736b287b5 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1857518 Change-Id: I86e0880b633d5f16adfb79052ee3017593b25334
2021-10-14Update OWNERS filePrzemysław Szczepaniak
Bug: 201534535 Test: - Change-Id: If4071e59baebd9d98b6c591e897206ad43439bd7
2021-09-23Add composer3 AIDLAdy Abraham
This is the initial AIDL interface based on the HIDL interface android.hardware.graphics.composer@2.4. Test: Build Bug: 198690211 Change-Id: I385ea8084f9a33c2b6dd79bb9a376692fec4a399
2021-08-27Merge "Fix use-after-free crash in VtsHalNeuralnetworksTargetTest."Treehugger Robot
2021-08-24Quickly exit VtsHalNeuralnetworks*TargetTest on failureMichael Butler
This change adds the AndroidTest.xml flag --gtest_break_on_failure to cause the gtest to terminate after an error has been reached. This early termination is important in the case where an NN HAL service crashes mid-test, and all remaining tests would otherwise continue to run. Bug: 197035200 Test: m vts -j Test: vts-tradefed Change-Id: I0b9a14345475e432b93f92c23010a8b39712443a
2021-08-23Quick-fail NNAPI VTS test case if driver is deadMichael Butler
This CL adds a check during SetUp that an NNAPI driver service is still alive by pinging the driver service. If it is not alive, the test will fail during SetUp. Without this quick-fail, the test case would continue as if the driver were still active, which would result in multiple EXPECT_* and ASSERT_* statements failing instead of a single, clear failure message. Bug: 197035200 Test: mma Test: presubmit: VtsHalNeuralnetworks*TargetTest Change-Id: Ib1b75ed20f764055699590581d5ad4e5aff4baae
2021-08-23Fix use-after-free crash in VtsHalNeuralnetworksTargetTest.Xusong Wang
Prior to this CL, the AHardwareBuffer in TestBlobAHWB is released in the destructor, but later used (unlock) during the destruction of the mMapping member. This CL fixed this issue by managing the lifetime of AHardwareBuffer with SharedMemory. Bug: 197199690 Test: VtsHalNeuralnetworksTargetTest Change-Id: I00748aaaa1a3a3d9b3b62bedb77a655ddb6e210f
2021-07-27Remove ndk_platform backend. Use the ndk backend.Jiyong Park
The ndk_platform backend will soon be deprecated because the ndk backend can serve the same purpose. This is to eliminate the confusion about having two variants (ndk and ndk_platform) for the same 'ndk' backend. Bug: 161456198 Test: m Change-Id: Ibe8beeaf0d1b33968fb782f1f70c17ae9e9bf871
2021-06-07Test readonly request input in AIDL VTS.Xusong Wang
This CL modifies the AIDL generated tests to use readonly memory pool for request inputs. Bug: 188104713 Test: VtsHalNeuralnetworksTargetTest Change-Id: I9e62f1cdeb501bf29bcb9c56317a452c9105b272 Merged-In: I9e62f1cdeb501bf29bcb9c56317a452c9105b272 (cherry picked from commit dfc013adaa13cae38393279a98a3753a44814827)
2021-06-01Modify VTS to allow testing shim cachingSlava Shklyaev
Bug: 185777967 Bug: 182877255 Test: VtsHalNeuralnetworksTargetTest Change-Id: Ibaba149715cfd5e655ce4916b75a29473170f013
2021-04-21Merge "Add units to hal times and durations names"Treehugger Robot
2021-04-20Add units to hal times and durations namesLev Proleev
The change adds "Ns" suffix to timeOnDevice, timeInDriver, loopTimeoutDuration, deadline and duration. Fix: 183118329 Test: mm Change-Id: I4afe34f27fc8717ac28c8fa09edda9918641c39a Merged-In: Id1f9ee4b8e41873c97690bb19a5e84572dd9ccf1
2021-04-13Enable NN VTS and utility code to use lazy servicesMichael Butler
This CL enables VtsHalNeuralnetworksTargetTest to use lazy services by changing from AServiceManager_getService (which will return nullptr for the service if the service is not able to be loaded within a short amount of time) to AServiceManager_waitForService (which will wait for a longer time, allowing lazy services to start up). Similarly, the utility code is changed from using AServiceManager_getService to AServiceManager_waitForService where possible. This CL also introduces an "InvalidDevice" utility class to the nnapi/hal/aidl utility code. InvalidDevices are minimal devices that support no functionality but are still able to pass VTS tests. Bug: 170696939 Test: mma Test: VtsHalNeuralnetworksTargetTest Change-Id: I4f806b104ef6af863ec55c2c3f2a2dd1f72b9633
2021-04-07Update NN utility code and VTS tests with new Memory typeMichael Butler
This CL fixes the compiler errors that arose of changing the Memory representation of the NN AIDL HAL, and updates the conversion and utility code to work with the new Memory type. This change also makes libaidlcommonsupport available to apex modules at min sdk level 29. Bug: 183118727 Test: mma Test: VtsHalNeuralnetworksTargetTest Change-Id: Ief565473b4d82e0bb43785fc3b8275b16bd26cf6 Merged-In: Ief565473b4d82e0bb43785fc3b8275b16bd26cf6 (cherry picked from commit b0fcb3927d848e9721f05a458b5d6d4d2cb8079d)
2021-04-06Change NNAPI time from steady_clock to boot_clock -- halMichael Butler
Previously, the NNAPI used std::chrono::steady_clock to represent and measure timings. However, steady_clock does not count while the system is suspended. Instead, boot_clock is monotonic like steady_clock but does include the time when the system is suspended. This change also indicates that services may convert from std::chrono::steady_clock::time_point to android::base::boot_clock::time_point in the HIDL 1.3 NN HAL. Bug: 183118340 Test: mma Test: VtsHalNeuralnetworksV1_3TargetTest Test: VtsHalNeuralnetworksTargetTest Test: presubmit Change-Id: I5a7d039a31d9ce98602a301387ec99635f279f42 Merged-In: I5a7d039a31d9ce98602a301387ec99635f279f42 (cherry picked from commit b8cf54cf5a5dc1639364cc6d79cc986efa6dceab)
2021-04-02Add missing validation for NN canonical typesMichael Butler
Bug: 177669661 Test: mma Test: NeuralNetworksTest_static Change-Id: Ic05c177f61a906a69bf82ff9c4d5bb8b0556d5ca Merged-In: Ic05c177f61a906a69bf82ff9c4d5bb8b0556d5ca (cherry picked from commit 08ee3f9287811e9087a5263c3176ce1439f70c2c)
2021-04-02Rename BufferRole.frequency -> probability -- HAL.Xusong Wang
"Frenquency" often refers to the number of occurrences over a period of time, while "probability" refers to the number of occurrences of one event over the number of occurrences of all events. "Probability" is a better name for this field. Fixes: 183117895 Test: VtsHalNeuralnetworksTargetTest Test: NNT_static Change-Id: Ic86f73b8be2aed567ae4ca17bdb3a57c658fb349 Merged-In: Ic86f73b8be2aed567ae4ca17bdb3a57c658fb349 (cherry picked from commit 46bf892f46aac0f3269970267e6ab7ed0d7d61a3)
2021-03-20Add Burst tests to NN AIDL HAL VTSMichael Butler
Bug: 180492058 Bug: 177267324 Test: mma Test: VtsHalNeuralnetworksTargetTest Change-Id: I1744005cbf750b70b42367b81a2fa6b8f24c1904 Merged-In: I1744005cbf750b70b42367b81a2fa6b8f24c1904 (cherry picked from commit 8b7e8138685678c1e7b1d7de8b06ff0899c61b2d)