Commit graph

870 commits

Author SHA1 Message Date
Ian Hua
f51390d3ac Merge "Fix aidl_format errors for NNAPI AIDL." am: 80502796ab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1827693

Change-Id: I23035ad4000dda7bbae1fa836f8cd5c3cabed56b
2021-09-21 10:41:36 +00:00
Ian Hua
80502796ab Merge "Fix aidl_format errors for NNAPI AIDL." 2021-09-21 10:27:22 +00:00
Ian Hua
60b2f9730e Fix aidl_format errors for NNAPI AIDL.
Test: mm
Change-Id: I21576c79396c03cb741b576eee157560579f13a8
2021-09-15 15:45:55 +01:00
Treehugger Robot
f6f3b6b0aa Merge "Add OWNERS for VTS module VtsHalNeuralnetworksV1_2TargetTest" am: d3f408de5a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1783307

Change-Id: Ia5301516ebcef36648f1a100be852f4a77047a9f
2021-09-10 17:57:21 +00:00
Treehugger Robot
3f5b0db7d5 Merge "Backfill owner information for VTS module VtsHalNeuralnetworksV1_0TargetTest." am: 2551b76bb7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1813762

Change-Id: I0454419dd71eb87ddbbcb1d44e5a47f524424012
2021-09-10 17:57:14 +00:00
Treehugger Robot
061d36e51d Merge "Backfill owner information for VTS module VtsHalNeuralnetworksV1_1TargetTest." am: e08c698459
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1813763

Change-Id: Ia41147949f60c5910db28af6739e1d159a4ab1d5
2021-09-10 17:57:08 +00:00
Treehugger Robot
95ddd8a1dd Merge "Add OWNERS for VTS module VtsHalNeuralnetworksV1_3TargetTest" am: 3bd069f994
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1783308

Change-Id: Ib15e907b5b66eced091d8d3ffc6e5d0645ea8192
2021-09-10 17:56:53 +00:00
Treehugger Robot
d3f408de5a Merge "Add OWNERS for VTS module VtsHalNeuralnetworksV1_2TargetTest" 2021-09-10 17:48:14 +00:00
Treehugger Robot
2551b76bb7 Merge "Backfill owner information for VTS module VtsHalNeuralnetworksV1_0TargetTest." 2021-09-10 17:47:44 +00:00
Treehugger Robot
e08c698459 Merge "Backfill owner information for VTS module VtsHalNeuralnetworksV1_1TargetTest." 2021-09-10 17:47:04 +00:00
Treehugger Robot
3bd069f994 Merge "Add OWNERS for VTS module VtsHalNeuralnetworksV1_3TargetTest" 2021-09-10 17:46:53 +00:00
Yiming Pan
2f40211da4 Add OWNERS for VTS module VtsHalNeuralnetworksV1_2TargetTest
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: Id49d1630f193617521d089e0b0b2f5ce180467b6
2021-09-09 14:56:57 -07:00
Yiming Pan
2520ea1aa7 Add OWNERS for VTS module VtsHalNeuralnetworksV1_3TargetTest
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: Ia91342cef75e7dabd417db557c64fdb46ae4e67e
2021-09-09 14:54:37 -07:00
Yiming Pan
31a675d43c Backfill owner information for VTS module VtsHalNeuralnetworksV1_0TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I9f163c163077c25ae88565df778aa26dd81b0947
2021-09-09 14:48:37 -07:00
Yiming Pan
55f41b2996 Backfill owner information for VTS module VtsHalNeuralnetworksV1_1TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: If85b0ca5caecf4e0561c29b7c1e64464ad80c6ba
2021-09-09 14:43:35 -07:00
Ian Hua
df56bdcee9 Merge "Fix HAL and AIDL files to be consistent with API generation tool." am: 650dc957ee
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1818131

Change-Id: I4f275432c7beb4e97b50f9a4a8e5343bb57235da
2021-09-09 12:59:34 +00:00
Ian Hua
d910bd6aaa Fix HAL and AIDL files to be consistent with API generation tool.
Bug: 161426966
Test: generate_api.sh
Change-Id: I4f4cc108ccdf2f37a1a7fa154ba8e8a186295276
2021-09-08 17:41:10 +01:00
Steven Moreland
bbde18214d Merge changes from topic "b188871598-security" am: 067901ea81
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814146

Change-Id: I1c7478f9581a8092b74e1505ad6dec15d22c9ae3
2021-08-31 17:09:37 +00:00
Steven Moreland
067901ea81 Merge changes from topic "b188871598-security"
* changes:
  neuralnetworks: use versions for imports
  .graphics.common: use versions for imports
  keymint: use versions for imports
2021-08-31 16:47:14 +00:00
Steven Moreland
15a92dad5d neuralnetworks: use versions for imports
This makes sure that when developers add a new version of an interface,
or when interfaces are being frozen, the runtime/buildtime situation of
clients depending on those interfaces remains the same. This is required
for AIDL to continue working at scale.

Bug: 188871598
Test: build
Change-Id: Ib4c6e8f5bf34cc333675201dca4eab08dd88628d
2021-08-30 18:02:43 -07:00
Treehugger Robot
f4263bff8f Merge "Fix use-after-free crash in VtsHalNeuralnetworksTargetTest." am: 50a0c3ae3f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1806243

Change-Id: Ib67d8b80f076d3f8f8bf1a3e7eb038144ef77f89
2021-08-27 19:02:22 +00:00
Treehugger Robot
50a0c3ae3f Merge "Fix use-after-free crash in VtsHalNeuralnetworksTargetTest." 2021-08-27 18:48:44 +00:00
Michael Butler
89ba8b68e7 Merge "Quickly exit VtsHalNeuralnetworks*TargetTest on failure" am: 0b2aee13af
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1808356

Change-Id: Id9bb8ec4a17efddc55253489180922345237b805
2021-08-25 18:16:37 +00:00
Michael Butler
ac45a5d77e Quickly exit VtsHalNeuralnetworks*TargetTest on failure
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-24 23:44:57 -07:00
Michael Butler
77c62d1131 Merge "Quick-fail NNAPI VTS test case if driver is dead" am: 994a3856c9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1806419

Change-Id: Ia14cfc51ae570c7bcef90b765ec5ac15e7d8afe6
2021-08-24 18:04:46 +00:00
Michael Butler
9c3c8642fb Quick-fail NNAPI VTS test case if driver is dead
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-23 18:27:49 -07:00
Xusong Wang
d2ecde5c54 Fix use-after-free crash in VtsHalNeuralnetworksTargetTest.
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-08-23 11:41:46 -07:00
Xin Li
e287df40b9 Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: Ifa71accba7ecf2ab15980227a4413831cfceb187
Change-Id: I7fb44c6c578a51c8ad36649d20a46233fd9609ca
2021-08-14 06:30:57 +00:00
Treehugger Robot
2cac932fef Merge "Revert^2 "Making NN hardware interface libs "host supported""" 2021-08-12 16:01:47 +00:00
Ray Hernandez
338d6f8b86 Revert^2 "Making NN hardware interface libs "host supported""
This is a revert of I6f657743, which is a revert of I1d7c66516.

Changing static libraries in hardware/interfaces/neuralnetworks to be
"host supported", meaning that the libraries within this directory
will be available on the host/linux build to make integration and
debugging more efficient.

Host Supported Libs:
* neuralnetworks_utils_hal_1_0
* neuralnetworks_utils_hal_1_1
* neuralnetworks_utils_hal_1_2
* neuralnetworks_utils_hal_1_3
* neuralnetworks_utils_hal_aidl
* neuralnetworks_utils_hal_common

Host Supported Tests:
* neuralnetworks_utils_hal_1_0_test
* neuralnetworks_utils_hal_1_1_test
* neuralnetworks_utils_hal_1_2_test
* neuralnetworks_utils_hal_1_3_test
* neuralnetworks_utils_hal_aidl_test
* neuralnetworks_utils_hal_common_test

Bug: 146324523
Test: neuralnetworks_utils_hal_*_test
Change-Id: I6c3cc00cd1ceefe4ae4ca5e40a8f3062d3251ff1
2021-08-11 21:54:44 +00:00
Michael Butler
31460f295e Merge "Revert "Making NN hardware interface libs "host supported""" am: e0b2d17cbf am: b3ee9e328f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1787049

Change-Id: I86ed5656b45311b4d1dfc7cbaf0d6ce28719898e
2021-08-05 00:28:24 +00:00
Michael Butler
e0b2d17cbf Merge "Revert "Making NN hardware interface libs "host supported""" 2021-08-05 00:00:07 +00:00
Ray Hernandez
ea89e30439 Revert "Making NN hardware interface libs "host supported""
Revert "Making NNAPI libraries and tests host supported"

Revert submission 1769046-neuralnetworks_host_build

Reason for revert: New Build Breakage
Reverted Changes:
Ib54d5c274:Making NNAPI libraries and tests host supported
I1d7c66516:Making NN hardware interface libs "host supported"...

Change-Id: I6f65774325889c50b9f8bbab13b557705419b6cf
2021-08-04 23:46:41 +00:00
Treehugger Robot
47a4958116 Merge "Making NN hardware interface libs "host supported"" am: 7519960237 am: 3b43fa6722
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1760967

Change-Id: I95006abc26c14dbe916b542efcbd51ca96f44c3a
2021-08-04 22:57:38 +00:00
Treehugger Robot
7519960237 Merge "Making NN hardware interface libs "host supported"" 2021-08-04 22:27:11 +00:00
Jiyong Park
48131c0ace Merge "Remove ndk_platform backend. Use the ndk backend." am: 2346a4c6b9 am: 4ef9aa49dc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1778908

Change-Id: Ib35b7b0ddc0bebd0714d290b1ac2fab8d5a1893e
2021-07-28 12:39:05 +00:00
rayhdez
a6d6002431 Making NN hardware interface libs "host supported"
Changing static libraries in hardware/interfaces/neuralnetworks to be
"host supported", meaning that the libraries within this directory
will be available on the host/linux build to make integration and
debugging more efficient.

Host Supported Libs:
* neuralnetworks_utils_hal_1_0
* neuralnetworks_utils_hal_1_1
* neuralnetworks_utils_hal_1_2
* neuralnetworks_utils_hal_1_3
* neuralnetworks_utils_hal_aidl
* neuralnetworks_utils_hal_common

Host Supported Tests:
* neuralnetworks_utils_hal_1_0_test
* neuralnetworks_utils_hal_1_1_test
* neuralnetworks_utils_hal_1_2_test
* neuralnetworks_utils_hal_1_3_test
* neuralnetworks_utils_hal_aidl_test
* neuralnetworks_utils_hal_common_test

Bug: 146324523
Test: neuralnetworks_utils_hal_*_test
Change-Id: I1d7c665169d2ce0c978b1e510e71f1371402a950
2021-07-27 22:14:05 +00:00
Jiyong Park
27f77fefd7 Remove ndk_platform backend. Use the ndk backend.
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-07-27 14:44:47 +09:00
Lev Proleev
aadf889c61 Fix ordering of cache files requirements from device am: 3fd4ec4706
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15126842

Change-Id: Ic4a246435d2c5c2e356068fc1852125e768e89c8
2021-06-28 15:11:52 +00:00
Lev Proleev
a31aff1ace Fix ordering of cache files requirements from device
Data and model numbers were switched in the AIDL implementation of
canonical Device.

Bug: 190757709
Test: neuralnetworks_utils_hal_aidl_test
Change-Id: I0d95b2d436994ffc877a4e02eb31f449b983e61e
Merged-In: I0d95b2d436994ffc877a4e02eb31f449b983e61e
(cherry picked from commit 3fd4ec4706)
2021-06-28 16:11:43 +01:00
Lev Proleev
3fd4ec4706 Fix ordering of cache files requirements from device
Data and model numbers were switched in the AIDL implementation of
canonical Device.

Bug: 190757709
Test: neuralnetworks_utils_hal_aidl_test
Change-Id: I0d95b2d436994ffc877a4e02eb31f449b983e61e
2021-06-28 12:16:02 +00:00
Treehugger Robot
a26d05b9a7 Merge "Correct grammatical error in README.md" am: 00baab69f1 am: c10941d4de
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1741753

Change-Id: I79b1717da7df8b7b0f8f0b2bfd5b97f5e331042b
2021-06-23 20:40:49 +00:00
rayhdez
5d3fcb2c57 Correct grammatical error in README.md
Bug: 175887156
Test: N/A
Change-Id: Ic89de4ac17ac5d67ff4d4c634c444f167878b7eb
2021-06-22 00:20:07 +00:00
Michael Butler
75f71ea4ab Merge "Simplify NNAPI SharedHandle -- hal" am: 12ec862f4a am: 81663327b9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1730974

Change-Id: I433bfd23e4a1df79d62ad8afca2da00fdf02532a
2021-06-16 04:26:44 +00:00
Michael Butler
e52a77efaa Simplify NNAPI SharedHandle -- hal
Prior to this CL, the NNAPI represented SharedHandle as a collection of
file descriptors and a vector of ints to act as metadata. This struct
mirrored Android's native_handle_t. However, the NNAPI only uses
SharedHandle to hold a single file descriptor to hold a single cache
file.

A sibling CL simplifies the SharedHandle by changing it to be a single
ref-counted file descriptor. This CL makes changes to the HAL utility
code in response to the SharedHandle change.

Bug: N/A
Test: mma
Test: NeuralNetworksTest_static
Change-Id: Ib390ad76bcdadffd85f8c2c502189aaa7da483e4
2021-06-08 20:14:52 -07:00
Xusong Wang
378a93819b Test readonly request input in AIDL VTS.
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 dfc013adaa)
2021-06-07 11:25:54 -07:00
Xusong Wang
5e0459576c Fix a bug in reusable burst execution.
The reusable burst execution incorrectly holds a reference to memory
identifier tokens.

Bug: 188568523
Test: NNT_static and inspect logcat
Change-Id: Ic8fb8be12bf579a316e7df8480ab3ccdc5c0e635
Merged-In: Ic8fb8be12bf579a316e7df8480ab3ccdc5c0e635
(cherry picked from commit 2082b871ab)
2021-06-07 11:25:33 -07:00
Przemyslaw Szczepaniak
62d0446772 Merge "Modify VTS to allow testing shim caching" into sc-dev 2021-06-04 13:20:53 +00:00
Slava Shklyaev
dff39c0081 Modify VTS to allow testing shim caching
Bug: 185777967
Bug: 182877255
Test: VtsHalNeuralnetworksTargetTest
Change-Id: Ibaba149715cfd5e655ce4916b75a29473170f013
Merged-In: Ibaba149715cfd5e655ce4916b75a29473170f013
(cherry picked from commit 2980a7c9fc)
2021-06-03 16:10:35 +00:00
Przemyslaw Szczepaniak
4203835cfe Merge "Modify VTS to allow testing shim caching" am: 53bd1cc985 am: d7ad17bd16
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1684770

Change-Id: I13104df5dc3bc79939b3e2008ac1ce8534c3d68d
2021-06-01 20:03:46 +00:00