summaryrefslogtreecommitdiff
path: root/nn/runtime/test/Android.bp
AgeCommit message (Collapse)Author
2020-05-13Fix CPU fallback bug with SIMPLE execution planSlava Shklyaev
Fix: 155923033 Test: m Change-Id: Ia701c6097695fd452c408d4423998c55d823a52f
2020-05-01Merge changes I3e1eb543,I012eb4df into rvc-devMichael Butler
* changes: Create tests for VersionedInterfaces errors Simplify IDevice reboot logic
2020-04-29Fix validateRequest with unknown rank in model.Xusong Wang
This CL also re-enables TestUnspecifiedDimensions, which will trigger the bug in validateRequest when sample driver is deployed. Bug: 141294076 Fixes: 155228680 Test: NNT_static with sample driver Change-Id: I268eb67bda8933be180bd58b604ee76b72577697
2020-04-27Create tests for VersionedInterfaces errorsMichael Butler
This CL introduces the following kinds of tests: * device creation and initialization errors * "normal" functional positive and negative tests * HIDL transport error tests * mock service crash tests Fixes: 139189546 Bug: 129572750 Test: mma Test: atest NeuralNetworksTest_static Change-Id: I3e1eb5433732695572044a74f1529ffc9c3a1982
2020-04-17Add NNT_static internal tests for device memory allocation.Xusong Wang
These tests use a customized IDevice to test the device memory allocation and fallback logic. This CL also allows the runtime to dispatch device memory allocation with dynamic shape to drivers. Additionally, this CL fixes a bug that a failed device memory allocation will return BAD_DATA -- it should return OP_FAILED instead. Bug: 152209365 Test: NNT_static Change-Id: I1facb2dad345958c3b9b1bab4a9564085c382c4a
2020-04-07Merge "Fix control flow partial CPU fallback bug" into rvc-devTreeHugger Robot
2020-04-06Fix control flow partial CPU fallback bugSlava Shklyaev
Before this change, ExecutionPlan::Controller::mLastStepIndex is only updated at the beginning of the ExecutionPlan::next() call. When interpreted control flow is involved, this call might result in several logical steps being processed until an ExecutionStep is reached. When an interpreted CF loop terminates successfully but the next step is an ExecutionStep that fails, ExecutionPlan::fallback() restarts from mLastStepIndex, which happens to be the index of the WhileStep. This results in the loop being executed again. This happens forever. This change fixes the bug by updating mLastStepIndex when nextCompound(const ExecutionStep* ...) is called. This change renames mLastStepIndex to mFallbackNextStepIndex to reflect its usage. Fix: 152623151 Test: NNT_static Change-Id: Iff3b68f541adb8facf078e968abac2a6ae8e74c1
2020-03-31Remove trailing arguments set to default valuesSlava Shklyaev
Fix: 147105700 Test: NNT_static Change-Id: I733ed312c855e48b31b5876bdbce714b3da9929a
2020-03-26Merge "Add rank check to concatenation op" into rvc-devLev Proleev
2020-03-25Add rank check to concatenation opLev Proleev
Without this check concatenation would crash if passed 5D tensors as inputs. Also: * Add a folder for CTS only tests and modify Android.bp accordingly. * Add concatenation test with invalid rank to CTS. * Modify createModel and GeneratedTests::execute functions to handle validation failures for models with exepectFailure flag. The test is added only to CTS because we will very likely relax this rank requirement in the future. If this test was added to VTS, future drivers would have to contain logic to reject models with larger ranks from clients using older versions. In order to make driver development easier, we only introduce this test to CTS. Once we relax the rank requirements, we will remove corresponding tests. Fix: 139957680 Test: NNTest_static and VtsHalNeuralnetworksV1_3Target Change-Id: I6d3b825360e055934a4e2d44e50b8fdc83b958e3
2020-03-23Add TestControlFlow.cpp to Android.bpSlava Shklyaev
Fix: 152216745 Test: NNT_static Change-Id: I2873773166d65f2c55ee701c818d40d13229dfb7
2020-03-19Ensures test sources are not built with NDEBUGStefano Galarraga
Add cflag -UNDEBUG to default built target. Add a source file that will cause the build of test targets to fail if NDEBUG is defined. Bug: 148456997 Test: atest NeuralNetworksTest_static Change-Id: I1473cf99702ccf6e0b3b5f68f8fe32b9b0244d5f
2020-03-13Add neuralnetworks_generated_V1_3_example to NNT_mt_static.Xusong Wang
Bug: 150771047 Test: NNT_mt_static Change-Id: I12b85b19cc88dcb98cfb4d79849f8143c073c1a2
2020-03-09Refactor RGG tests to use TestModel utilities.Xusong Wang
Before this change, the RGG has its own logic creating a NDK model/request, and comparing the final results. This CL makes RGG to adopt the new TestModel utilities. Fixes: 139442221 Bug: 150805665 Test: NNT_static Test: NNT_static_fuzzing Change-Id: I041f45026ed271abad4632abd7ec5360f432efda
2020-03-09Separate generated test utilities and the tests.Xusong Wang
The enables a test target to use the generated test utilities without including all the generated tests. Bug: 150805665 Test: NNT_static Change-Id: I58fbf949a03f8f0199b0893da41fc90b5b5c004e
2020-03-09Add memory leak detector into RGG tests.Xusong Wang
The memory leak detector is enabled when deubg.nn.fuzzer.detectleak system property is set. Bug: 133780504 Test: NNT_static_fuzzing Change-Id: Ib0497e6d916a53a075b96626f6fca1c16dd10291
2020-02-18Add setLoopTimeout CTS testSlava Shklyaev
Also tests getDefaultLoopTimeout and getMaximumLoopTimeout. Bug: 145906499 Bug: 136735929 Test: NNT_static Change-Id: I1968fe97c6b3f51e9950d17abdc06a764a27c517
2020-02-05Merge "redefine _Float16 as __fp16 for x86[_64] to allow removing workaround ↵David Gross
from inhouse clang"
2020-01-22Sync fence support in NNAPIMiao Wang
The following APIs are added to NNAPI: - ANeuralNetworksEvent_createFromSyncFenceFd - ANeuralNetworksEvent_getSyncFenceFd - ANeuralNetworksExecution_startComputeWithDependencies Bug: 142778241 Test: mm Change-Id: I7bba64982c0d06e1224f5a71ee788a5044aac36a
2020-01-16Resolve linking error with libtextclassifier_hash.Xusong Wang
Fixes: 147728421 Test: m Change-Id: Ia4bce40d8214eec7cae1a7397c5e4468359a6c9e
2020-01-15Introduce libneuralnetworks_staticJiyong Park
The library is a static variant of the existing libneuralnetworks. It is introduced because the existing one isn't available to the platform due to the apex_available property. (the property was set in order to prevent installation of the lib to /system/lib) The problem was that a few number of nn tests are statically linking the library. Since the nn tests are outside of the APEX, they need the platform variant of the library. In order to solve the problem, the static variant is introduced just for the tests. Since it's a static library, it still isn't installable to /system/lib. Bug: 147158681 Test: mma under frameworks/ml/nn Change-Id: I61a56bf3bb9fde87d0268d911f4a22ff0febafd9
2019-12-20redefine _Float16 as __fp16 for x86[_64] to allow removing workaround from ↵David Gross
inhouse clang Bug: 138709788 Test: for (walleye, aosp_x86 [on emulator], aosp_x86_64 [on emulator]) Use clang where _Float16 is disabled for x86[_64] $ cd $ANDROID_BUILD_TOP ; m checkbuild inspect build commands for nn runtime as to whether or not expected options related to redefinition are present $ cd ml/nn/runtime/test ; m NeuralNetworksTest_static inspect build commands for NeuralNetworksTest_static as to whether or not expected options related to redefinition are present verify that NeuralNetworksTest_static still passes Change-Id: I75df15d12d026f59db301afa0020890484e0ec72
2019-12-16Add CC configuration to libneuralnetworks_fuzzerMichael Butler
Fuzzer bugs are found automatically. However, the fuzzer does not know who to contact in the case of a bug. This CL configures cc_fuzz to notify (via CC on buganizer) the recipients (currently butlermichael@google.com) whenever a bug is found. Bug: N/A Test: mma Change-Id: I16ea400e525a0c3341e88f0aa692e3d4ab2d2b98
2019-12-04Log test case to logcatSlava Shklyaev
Sample output: I NeuralNetworksTest: useCpuOnly = 0, computeMode = ComputeMode::SYNC, allowSyncExecHal = 0 // pass 0 I NeuralNetworksTest: [Test Case] OperationValidationTest.ADD_float16 BEGIN ... I NeuralNetworksTest: [Test Case] OperationValidationTest.ADD_float16 END I NeuralNetworksTest: [Test Case] OperationValidationTest.ADD_float32 BEGIN ... Bug: 145183949 Test: NNT_static Test: CtsNNAPITestCases Change-Id: I923ed709e4f3450c6795cfb5e956a32f4a0f6bd1 Merged-In: I923ed709e4f3450c6795cfb5e956a32f4a0f6bd1 (cherry picked from commit e7eedfa73c4dca5699782c4d9a0c458da587bb08)
2019-12-04Log test case to logcatSlava Shklyaev
Sample output: I NeuralNetworksTest: useCpuOnly = 0, computeMode = ComputeMode::SYNC, allowSyncExecHal = 0 // pass 0 I NeuralNetworksTest: [Test Case] OperationValidationTest.ADD_float16 BEGIN ... I NeuralNetworksTest: [Test Case] OperationValidationTest.ADD_float16 END I NeuralNetworksTest: [Test Case] OperationValidationTest.ADD_float32 BEGIN ... Bug: 145183949 Test: NNT_static Test: CtsNNAPITestCases Change-Id: I923ed709e4f3450c6795cfb5e956a32f4a0f6bd1
2019-11-21Replace GraphicBuffer with AHardwareBuffer.Przemyslaw Szczepaniak
In order to remove dependency on libui, CpuExecutor was changed to use public interface AHardwareBuffer instead of internal GraphicBuffer. An AHardwareBuffer is a reinterpreted GraphicBuffer so they behave identically. By removing libui dependency, we should further reduce the com. android.neuralnetworks APEX size. Test: Flashed pixel device & run NNAPI tests. Bug: 140440028 Bug: 144488395 Change-Id: I44e7613312d2ce60da8f859557c1c79cd0d7e2be Merged-In: I44e7613312d2ce60da8f859557c1c79cd0d7e2be (cherry picked from commit fa0aa4a446adb9e9e2de1694dd8ed08d08686ce2)
2019-11-18Replace GraphicBuffer with AHardwareBuffer.Przemyslaw Szczepaniak
In order to remove dependency on libui, CpuExecutor was changed to use public interface AHardwareBuffer instead of internal GraphicBuffer. An AHardwareBuffer is a reinterpreted GraphicBuffer so they behave identically. By removing libui dependency, we should further reduce the com. android.neuralnetworks APEX size. Test: Flashed pixel device & run NNAPI tests. Bug: 140440028 Bug: 144488395 Change-Id: I44e7613312d2ce60da8f859557c1c79cd0d7e2be
2019-10-30Merge "Add coverage-guided fuzz testing to NNAPI"Michael Butler
2019-10-30Temporarily disable UnspecifiedDimensionsTest.Xusong Wang
Bug: 143173918 Test: NNT_static Change-Id: I837d967d6da4bea298b29e692a572be45ea11252 Merged-In: I837d967d6da4bea298b29e692a572be45ea11252 (cherry picked from commit 646f43e02b078475dbe6ed20612281d4b37db2cb)
2019-10-29Add coverage-guided fuzz testing to NNAPIMichael Butler
Bug: 142286848 Test: mma Test: m fuzz dist (and verified all files were packaged properly) Test: adb shell LD_LIBRARY_PATH=/system/lib64:/system/lib64/vndk-R \ /data/fuzz/arm64/libneuralnetworks_fuzzer/libneuralnetworks_fuzzer \ /data/fuzz/arm64/libneuralnetworks_fuzzer/corpus/ Change-Id: Idea691bf0c437c030f5acc181d43b505f0bbcad6 Merged-In: Idea691bf0c437c030f5acc181d43b505f0bbcad6 (cherry picked from commit c169e1245f500f4b84e374db0d04c48713a84572)
2019-10-28Add coverage-guided fuzz testing to NNAPIMichael Butler
Bug: 142286848 Test: mma Test: m fuzz dist (and verified all files were packaged properly) Test: adb shell LD_LIBRARY_PATH=/system/lib64:/system/lib64/vndk-R \ /data/fuzz/arm64/libneuralnetworks_fuzzer/libneuralnetworks_fuzzer \ /data/fuzz/arm64/libneuralnetworks_fuzzer/corpus/ Change-Id: Idea691bf0c437c030f5acc181d43b505f0bbcad6
2019-10-23Temporarily disable UnspecifiedDimensionsTest.Xusong Wang
Bug: 143173918 Test: NNT_static Change-Id: I837d967d6da4bea298b29e692a572be45ea11252
2019-10-16Add HAL version 1.3 and add TENSOR_QUANT8_ASYMM_SIGNED OperandTypeLev Proleev
Bug: 139120468 Bug: 137828494 Test: NeuralNetworksTest_static and VtsHalNeuralnetworksV1_2TargetTest Change-Id: Ieaf5fe6387c890ff456c8cc8be6bae886936af36 Merged-In: Ieaf5fe6387c890ff456c8cc8be6bae886936af36 (cherry picked from commit 61c871c81b610a240d33ed84a30c14d13b470935)
2019-10-10Revert "Merge "Revert "Add HAL version 1.3 and add ↵Colin Cross
TENSOR_QUANT8_ASYMM_SIGNED OperandType"" am: fe3aba71df am: fb6b5a0c69 am: 83076786f9" This reverts commit f9bf17f998bf7d84038757fde8e4d3d3aee1b6cd. Reason for revert: revert of a cherry-pick broke master Change-Id: Ieaf5fe6387c890ff456c8cc8be6bae886936af36
2019-10-10Revert "Add HAL version 1.3 and add TENSOR_QUANT8_ASYMM_SIGNED OperandType"Lev Proleev
This reverts commit af88effce1b911743d562f5490af2300c54f2349. Reason for revert: the topic breaks git_qt-dev-plus-aosp Change-Id: Iddfcffb76af61fb20d749902ddf9c960e211c69d
2019-10-09Add HAL version 1.3 and add TENSOR_QUANT8_ASYMM_SIGNED OperandTypeLev Proleev
Bug: 139120468 Bug: 137828494 Test: NeuralNetworksTest_static and VtsHalNeuralnetworksV1_2TargetTest Change-Id: Iefcaf09145753facb2dc58bbc48e1e597c658b7c Merged-In: Iefcaf09145753facb2dc58bbc48e1e597c658b7c (cherry picked from commit 61c871c81b610a240d33ed84a30c14d13b470935)
2019-09-28Add libbase dependency to testsSlava Shklyaev
This CL introduces libbase_ndk to our CTS tests, enabling all runtime tests to use the LOG macro. Test: NNT_static Bug: 141294076 Change-Id: I3137fad81cbd2fd0c87aa56b47bd6f83a794c9be Merged-In: I3137fad81cbd2fd0c87aa56b47bd6f83a794c9be (cherry picked from commit 75674c07a23655e004d041214b0025d1ccef55b3)
2019-09-26Merge "Use shared libcrypto"Colin Cross
2019-09-25Merge "Rename TEST_VENDOR to EXAMPLE for consistency with the example.com ↵Slava Shklyaev
domain name"
2019-09-24Use shared libcryptoColin Cross
Shared libcrypto provides FIPS self tests, use it whenever possible. Use libcrypto_static for the tests. Bug: 141248879 Test: m checkbuild Change-Id: Ia4b9e45f33624fd021e38f051e49fc616e902e7a
2019-09-24Merge "Replace libbinder dependency with libneuralnetworks_packageinfo"Przemyslaw Szczepaniak
2019-09-23Replace libbinder dependency with libneuralnetworks_packageinfoPrzemyslaw Szczepaniak
libbinder communication from APEX is not allowed, because it doesn't form a stable way to communicate. After an update, if system libbinder and APEX libbinder are out of sync, then they may fail to work with each other. libbiner usage is moved into libneuralnetworks_packageinfo library, which is a stable API library. Test: flashed crosshatch / run NNAPI tests Bug: 139282353 Change-Id: Ibe7e01b7f3014aed8390091ff7250611a32bb2ee
2019-09-20Rename TEST_VENDOR to EXAMPLE for consistency with the example.com domain nameSlava Shklyaev
Bug: 120851298 Test: m Change-Id: I6c0a731f50a2ec3a8a00ca245282fece1091857f
2019-09-20Make android.hardware.neuralnetworks@1.X static lib for static tests.Przemyslaw Szczepaniak
After moving NNAPI to an APEX, android.hardware.neuralnetworks@1.X are no longer present on a system image (moved to apex, as libneuralnetworks.so was their only client). Bug: 139120468 Test: flashed crosshatch, NNAPI static tests Change-Id: I16fb79472f450bb752c8d5cc5b66c931a4ddc29b
2019-09-10Move libcrypto to a whole_static_libs section.Pete Bentley
libcrypto is unused by some targets which use these defaults, which causes problems when boringssl hash injection is turned on as the code is all stripped and there is nothing left to inject the hash into. Bug: 137267623 Test: croot frameworks/ml/nn/runtime/test && mm # Observe build fails with the rest of this topic applied # and succeeds with this CL applied. Change-Id: I58760a8ef5f52e5750c3147911975e540e8f3c88
2019-09-06Remove libhwbinder/libhidltransport depsSteven Moreland
Since these were combined into libhidlbase. Bug: 135686713 Test: build only (libhwbinder/libhidltransport are empty) Change-Id: Id24113833aa6177d554347d90864ed7c6c9c5b5b
2019-08-28Merge changes from topics "nnapi-build-1-cherry-pick", ↵Michael Butler
"nnapi-build-2-cherry-pick" am: f1f5ac8ee4 Change-Id: Ic841f3593a4ea83920c18b3674d3d37f907bb07e
2019-08-28Merge changes from topic "nnapi_test_dynamic_reg"Xusong Wang
am: db49c5e748 Change-Id: Ifb6ba4c9d908c021c511a714369fc2087526a157
2019-08-28Remove unused mobilenets filegroupMichael Butler
Bug: N/A Test: mma Test: NeuralNetworksTest_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksV1_*TargetTest (with sample-all) Change-Id: Id4db68cc8a2f5fe7a25184a963f2ae828c8c38e1 Merged-In: Id4db68cc8a2f5fe7a25184a963f2ae828c8c38e1 (cherry picked from commit f97f5a81153540e5784f08644040bb85418e1aed)
2019-08-28Build common test component as static libraryMichael Butler
Bug: 139889855 Test: mma Test: NeuralNetworksTest_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksV1_*TargetTest (with sample-all) Test: VtsHalNeuralnetworksV1_*CompatV1_*TargetTest (with sample-all) Change-Id: I7847d427af78d402010c2893139544a1d7f6b195 Merged-In: I7847d427af78d402010c2893139544a1d7f6b195 (cherry picked from commit 98488c8fdc5d6b6d77122fc059c840e564595c71)