summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-24Merge "Add missing inequality operators to NNAPI Canonical Types"HEADmastermainMichael Butler
2020-11-24Add missing inequality operators to NNAPI Canonical TypesMichael Butler
Bug: N/A Test: mma Change-Id: Iacddd0aefdf2f3afd4c34bd97c4fee7159be53df Merged-In: Iacddd0aefdf2f3afd4c34bd97c4fee7159be53df (cherry picked from commit 836fb169e7648eac293d517625cc0413d6a035d3)
2020-11-24Merge "Adjust visibility for nnapi module."Treehugger Robot
2020-11-24Adjust visibility for nnapi module.Baligh Uddin
This work is in preparation for migration to packages/modules/NeuralNetworks. BUG: 167961889 Test: TH Change-Id: I54fe338a5aedf476d2ce320dd419457d85de74ef
2020-11-24Merge "Replace direct cgroup access with task profiles"Suren Baghdasaryan
2020-11-23Replace direct cgroup access with task profilesSuren Baghdasaryan
Cgroups should not be accessed directly. Replace direct access with task profile usage to perform the operation via cgroup anstraction layer. Bug: 170507876 Test: build pass Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I71e849cf7d1f0dfd46da1d9306310ce2c6ecf1ca
2020-11-23Merge "Log conversion errors in legacy code"Slava Shklyaev
2020-11-20Merge changes from topic "nn-shared-handle"Treehugger Robot
* changes: Replace native_handle with unique_fd Split Utils into LegacyUtils and LegacyHalUtils Copy Utils to LegacyUtils and LegacyHalUtils Use sensible Capabilities in test drivers
2020-11-20Log conversion errors in legacy codeSlava Shklyaev
Bug: N/A Test: NNT_static Change-Id: Ic9a3b162c63290c2a8f2228decdb3fb97f36095a Merged-In: Ic9a3b162c63290c2a8f2228decdb3fb97f36095a (cherry picked from commit 16d0e25d92189e8110190960b7194a97859219e8)
2020-11-20Replace native_handle with unique_fdSlava Shklyaev
This change replaces native_handle_t from libutils with a custom type that wraps std::vector<base::unique_fd> and std::vector<int>. Bug: 160669116 Test: NNT_static Change-Id: If4d767b35c2d48cabcb6a9a3436079f6f7d39a13 Merged-In: If4d767b35c2d48cabcb6a9a3436079f6f7d39a13 (cherry picked from commit b3c5d46cd1a7e8c7f4c624d2c24bf721f4d0edb2)
2020-11-20Split Utils into LegacyUtils and LegacyHalUtilsSlava Shklyaev
To simplify the review process and preserve the git history, change I2b54bc13 copies Utils to LegacyUtils and LegacyHalUtils and this change removes redundant code. Bug: 170289677 Test: NNT_static Test: NNT_utils Change-Id: I7ffc5824a382e121b86e7c8ad0de384c9c1a6d4c Merged-In: I7ffc5824a382e121b86e7c8ad0de384c9c1a6d4c (cherry picked from commit 93a2a1ec8100d4fe7d91373587869a9753cdb6bc)
2020-11-20Copy Utils to LegacyUtils and LegacyHalUtilsSlava Shklyaev
This change was generated with the following commands: cp common/include/Utils.h common/include/LegacyHalUtils.h mv common/include/Utils.h common/include/LegacyUtils.h cp common/Utils.cpp common/LegacyHalUtils.cpp mv common/Utils.cpp common/LegacyUtils.cp sed -i 's/"Utils.cpp"/"LegacyUtils.cp"/' common/Android.bp bpfmt -w -s common/Android.bp This is a separate change in order to help git preserve the history. See change I7ffc5824. Bug: 170289677 Test: N/A Change-Id: I2b54bc131ff4a2f05b3a1e0f180a7a4bbd7bf614 Merged-In: I2b54bc131ff4a2f05b3a1e0f180a7a4bbd7bf614 (cherry picked from commit 1e9f4d242c1159fa3a33020f0abfbfa95ca4be04)
2020-11-20Use sensible Capabilities in test driversSlava Shklyaev
Although zero PerformanceInfo::execTime or powerUsage is not explicitly prohibited by the spec, it makes little sense and the new HAL device wrappers (change Iec6ae739) do not accept zero PerformanceInfo. Bug: 170289677 Test: NNT_static Change-Id: I6cc0af5f30ad980e4866badacd9ae8d2c9f87022 Merged-In: I6cc0af5f30ad980e4866badacd9ae8d2c9f87022 (cherry picked from commit e72232d73cd95c8a0383430d5b491744367b2303)
2020-11-17Merge "Disable NNAPI host build"Michael Butler
2020-11-16Disable NNAPI host buildMichael Butler
A host build was enabled for canonical types and tests to ensure that the canonical types were not introducing new dependencies. Because we are not focusing on developing a host build for the short term, this CL disables it, but it's being tracked in b/146324523. Bug: N/A Test: mma Change-Id: Ib96349d17b202b163c4e377515b9c3117cc39b1d Merged-In: Ib96349d17b202b163c4e377515b9c3117cc39b1d (cherry picked from commit 7e468dabece62457b38e6c5cffb03f652d5ce3c0)
2020-11-17Merge "Introduce NNAPI Canonical Interface types"Michael Butler
2020-11-16Introduce NNAPI Canonical Interface typesMichael Butler
This CL introduces the canonical interface types: IDevice, IPreparedModel, and IBuffer. This CL also introduces three new types: * SyncFence: wraps a NativeHandle to represent a sync_fence * GeneralResult: a Result object where the error is extended with an ErrorStatus * ExecutionResult: a Result object where the error is extended with an ErrorStatus and a vector of OutputShapes Bug: 160668438 Test: mma Test: NeuralNetworksTest_static Change-Id: I99a6ccd88d0fa2f14296eb0019555b2aa46ab488 Merged-In: I99a6ccd88d0fa2f14296eb0019555b2aa46ab488 (cherry picked from commit 3fa5419e7a90fe98112c479e84952a4214496187)
2020-11-13Merge "Remove HAL types from NNAPI fuzz test harness"Michael Butler
2020-11-12Remove HAL types from NNAPI fuzz test harnessMichael Butler
Switches the implementation from using 1.3 HAL types to using canonical types. Bug: N/A Test: mma Test: libneuralnetworks_fuzzer Change-Id: Ia9b76f324ddb5559cb2834fc13b3a09a62d3d0bd
2020-11-12Merge "nnapi: Set min_sdk_version to "30""Nikita Ioffe
2020-11-12nnapi: Set min_sdk_version to "30"Nikita Ioffe
Just a cosmetic cleanup since "R" resolves to 30 as well. Test: m Bug: 171330443 Change-Id: Icbf97ddf20fda7df0d8050bfb9f036b4c5510a12
2020-11-10Merge changes I47c12e13,Iae0d6ef3Michael Butler
* changes: Make operation validation return Result<Version> Reorganize operation validation version code
2020-11-06Make operation validation return Result<Version>Michael Butler
Bug: N/A Test: mma Test: NeuralNetworksTest_static Change-Id: I47c12e13fcb41f832e31043b3f14e7b93472b0f8 Merged-In: I47c12e13fcb41f832e31043b3f14e7b93472b0f8 (cherry picked from commit 72146e08363add234a71d19accd96325cb77ce7c)
2020-11-06Reorganize operation validation version codeMichael Butler
Bug: N/A Test: mma Test: NeuralNetworksTest_static Change-Id: Iae0d6ef34551b1c3ad5ad670ff54733d38c288af Merged-In: Iae0d6ef34551b1c3ad5ad670ff54733d38c288af (cherry picked from commit 109f573c3d0feef5ebe8f86a0d10240dcb43254d)
2020-11-05Merge "Update operation validation from HalVersion to Version"Michael Butler
2020-11-05Update operation validation from HalVersion to VersionMichael Butler
Bug: N/A Test: mma Test: NeuralNetworksTest_static Change-Id: Ia1a10d9ee272a9c2c84a8f284df064c309e42a77 Merged-In: Ia1a10d9ee272a9c2c84a8f284df064c309e42a77 (cherry picked from commit 1ff99066e4f0fa451c03f6236f5de987c6ae064b)
2020-11-05Merge "Update NNAPI canonical validation"Michael Butler
2020-11-04Update NNAPI canonical validationMichael Butler
Previously, there was a gap in our validation code when it came to validating operations because it relied on code that was not compatible with the canonical types at the time. Now that the code is compatible, this CL closes the validation gap. To facilitate this, this CL also relocates some utility code (HalVersion, NN_RET_CHECK_*) from Utils.h to TypeUtils.h. Bug: 160668435 Test: mma Change-Id: I4b9ed9ad14f79ad84860809f72c0ccbd6399e6f0 Merged-In: I4b9ed9ad14f79ad84860809f72c0ccbd6399e6f0 (cherry picked from commit 5f02de4004735a216bf1726af22f3fe4ebb16c01)
2020-11-03Merge "Migrate NNAPI runtime to canonical types"Treehugger Robot
2020-11-03Merge "Update getNonExtensionSize() for TENSOR_OEM_BYTE"Treehugger Robot
2020-11-02Merge "Avoid potential use of uninitialized memory"Treehugger Robot
2020-11-02Migrate NNAPI runtime to canonical typesSlava Shklyaev
This change replaces most uses of HAL types in the codebase with equivalent canonical types. Later changes will introduce more refactorings. Also removes unused files nn/runtime/test/Bridge.{h,cpp}. Bug: 160669906 Fix: 155923931 Test: NeuralNetworksTest_static (all 7 passes) Test: NeuralNetworksTest_operations Test: NeuralNetworksTest_utils Test: NeuralNetworksTest_logtag Test: nnCache_test Test: BlobCache_test Change-Id: I63fa286e926a096948f1b1b172d1d562c4f52f29 Merged-In: I63fa286e926a096948f1b1b172d1d562c4f52f29 (cherry picked from commit 069993366ce59913ff162ed144749bb8794d990c)
2020-11-02Update getNonExtensionSize() for TENSOR_OEM_BYTESlava Shklyaev
This makes getNonExtensionSize() behave the same as the old nonExtensionOperandSizeOfData(). See kSizeOfDataTypeOEM. Bug: N/A Test: NNT_static --gtest_filter=ValidationTestModel.AddOEMOperand with change I63fa286e Change-Id: I29496d32ac9abbeca372f36442afce7f4c8a017c Merged-In: I29496d32ac9abbeca372f36442afce7f4c8a017c (cherry picked from commit 79f4d47c7e34557c1a36c7a6bca16c5db541a58f)
2020-11-02Avoid potential use of uninitialized memoryGreg Kaiser
We assure our pointers that are referenced in the destructor have valid values. Test: TreeHugger Change-Id: I03af3815884c89a50ca3298835aa9ea62be40d02 Merged-In: I03af3815884c89a50ca3298835aa9ea62be40d02 (cherry picked from commit 62799d699b3191b59165556c5754277ec02b8744)
2020-10-24Merge "Cleanup references to system/core/base -> system/libbase"Baligh Uddin
2020-10-23Merge "Make the connection between implementation and llndk_library explicit"Colin Cross
2020-10-23Cleanup references to system/core/base -> system/libbaseBaligh Uddin
BUG: 157656545 Test: TH Exempt-From-Owner-Approval: Trivial cleanup in comments. Change-Id: Ib20132248df9ee543a6d317b5af15c85350f41ee
2020-10-19Make the connection between implementation and llndk_library explicitColin Cross
Instead of assuming a module with the .llndk suffix exists, add an llndk_stubs property to every cc_library module that has a corresponding llndk_library. Also rename the llndk_library to have an explicit .llndk suffix. Bug: 170784825 Test: no changes to build.ninja (excluding comments) or Android-${TARGET_PRODUCT}.mk Change-Id: I2373423d671d0de7b6c9469ff796805d85d7d29c
2020-10-14Merge "Add to close copied dupfd." am: 249e937887Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/ml/+/1436811 Change-Id: I345cadbba83bccc16b2b1e407bba987cb6db09c9
2020-10-14Merge "Add to close copied dupfd."Treehugger Robot
2020-10-13Merge "Add FusedActivationFunc to canonical types" am: 7dfee7e7b7Michael Butler
Original change: https://android-review.googlesource.com/c/platform/frameworks/ml/+/1455997 Change-Id: I30741549225f7097bd06ff2bc8bf6c49f129d99c
2020-10-13Merge "Add FusedActivationFunc to canonical types"Michael Butler
2020-10-11Add FusedActivationFunc to canonical typesMichael Butler
This CL also makes two minor fixes to the validation code. Bug: N/A Test: mma Change-Id: I81b73f1236f6a43e7c249f8c2ca9144b5291b993
2020-10-09Merge "nn: use libc++_static as stl instead of c++_static" am: ae59a9ab36Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/ml/+/1455180 Change-Id: Ie0578cab6a3983ee03c6b42adfd35839b13f5c78
2020-10-09Merge "nn: use libc++_static as stl instead of c++_static"Treehugger Robot
2020-10-09nn: use libc++_static as stl instead of c++_staticJim Pollock
libc++_static is preferred and more consistent with the other build targets. Bug: None Test: mm CtsNNAPITests_static Change-Id: Id96b9705a1ad5bd57d79673a0bfc79e632a2b91b
2020-10-08Skip ab/6749736 in stage.Xin Li
Merged-In: Ic773e5c979e270df7f64552f6fb2affc39a2359c Change-Id: I49e81d1c98817e7e0d3b92c80298bc807911e5ae
2020-10-08Merge "ml: improve inclusive language use" am: cce0235216Jim Pollock
Original change: https://android-review.googlesource.com/c/platform/frameworks/ml/+/1442960 Change-Id: Ica932534a83c97e24a93395acbbb1a49beca0254
2020-10-08Merge "ml: improve inclusive language use"Jim Pollock
2020-10-07Merge "Add equality operator to canonical operand and operation types" am: ↵Michael Butler
521fea4b98 Original change: https://android-review.googlesource.com/c/platform/frameworks/ml/+/1451978 Change-Id: I13971cb7efedd12c62eb286160dbcd624356cc33