summaryrefslogtreecommitdiff
path: root/nn/runtime
AgeCommit message (Collapse)Author
2020-05-01Merge "Dump RGG spec under all failures." into rvc-devXusong Wang
2020-05-01Merge "Fix null ptr dereference in squeeze cpu implementation." into rvc-devPrzemyslaw Szczepaniak
2020-04-30Add more NN priority validation testsMichael Butler
Bug: 147925145 Test: mma Test: NeuralNetworksTest_static Change-Id: Ie636c7cdc84ff7a262925f8ff8ebbd4d4f45201b
2020-05-01Merge "Add internal NNT_static tests for buffer copying." into rvc-devXusong Wang
2020-05-01Merge changes I3e1eb543,I012eb4df into rvc-devMichael Butler
* changes: Create tests for VersionedInterfaces errors Simplify IDevice reboot logic
2020-04-30Add internal NNT_static tests for buffer copying.Xusong Wang
This helps cover the code path of data copying between hidl memory and IBuffer, as well as data copying between IBuffers. These code paths may not be covered by CTS because of the lack of driver support. This CL additionally extracts TestAshmem class from TestGenerated to a common TestUtils. Bug: 152209365 Test: NNT_static Change-Id: I617bfbc391c7d0ada0c32b31ee2e6e493d5dc6a2
2020-05-01Merge "libneuralnetworks_headers is marked as available to platform" into ↵Jiyong Park
rvc-dev
2020-05-01libneuralnetworks_headers is marked as available to platformJiyong Park
The header lib is depended on by libneuralnetworks_common which is available to platform. With b/153073816, we will be checking the availability to the platform as well, i.e. platform-available module depending on platform-unavailable module will cause a build error. Prepare for the change by correctly marking that the header lib is also available to the platform. Bug: 153073816 Test: m Exempt-From-Owner-Approval: cherry-pick from AOSP Merged-In: I31a198068c98e7d6b01b7e2cd6f43e54769f28b1 (cherry picked from commit ddda33ec48ac01e042854c0a017a4ce276172488) Change-Id: I31a198068c98e7d6b01b7e2cd6f43e54769f28b1
2020-04-30Dump RGG spec under all failures.Xusong Wang
Fixes: 155195637 Test: NNT_static_fuzzing and inspect the dumped spec Change-Id: I11b50433b17afeceedae954f2832c1c2193b2c7f
2020-04-30Merge "Fix NNAPI TimingTests" into rvc-devMichael Butler
2020-04-30Merge changes I3e037df0,Ifd1f45a2 into rvc-devXusong Wang
* changes: Regenerate tests. Re-enable tests that are previously disabled.
2020-04-30Fix null ptr dereference in squeeze cpu implementation.Przemysław Szczepaniak
Squeeze, when used on a single-value tensor with 1s in each dimension, will result in zero-sized tensor without dimensions. This change fixes it, by making its output a tensor of size [1]. Bug: 155238914 Test: squeeze_b155238914.mod.py run on coral. Change-Id: Ia5bf655c647084d9fa094ae8a2048917a8237b81
2020-04-29Fix NNAPI TimingTestsMichael Butler
This CL fixes the ordering of sequences in the test. Specifically: 1) Causes the spin-loop in waitForExecutionToBegin to spin while the execution has not yet started 2) Adds dummyExecution() to the driver implementations of FAIL_LAUNCH 3) Skips getDurationWhileRunning for all DriverKind::CPU test cases Further, this CL adds dummyExecution() to TestPreparedModelLatest::executeFenced to ensure the call to executeFenced will not complete until after the test has called getDuration. This brings executeFenced in line with the other execution methods which call dummyExecution(). Finally, this CL has the following two minor changes: 1) code that was previously running from a detached thread in executeFenced now instead runs synchronously 2) a for-loop that iterated by constant reference now instead iterates by constant value Fixes: 155215099 Test: mma Test: NeuralNetworksTest_static --gtest_filter=Fenced/TimingTest* Change-Id: I69a7448367ce8353791c9462d144122b6c913802
2020-04-29Merge "Fix validateRequest with unknown rank in model." into rvc-devXusong Wang
2020-04-29Regenerate tests.Xusong Wang
Bug: 140641425 Test: NNT_static Change-Id: I3e037df067125b04efbd73f6d84da228d5e24f7a
2020-04-29Re-enable tests that are previously disabled.Xusong Wang
Bug: 140641425 Bug: 151328024 Bug: 152446228 Bug: 152445711 Bug: 152446298 Fixes: 152446228 Test: NNT_static Test: NNT_static_fuzzing Change-Id: Ifd1f45a2b058fe9996dca817a067ce2ad6d47b46
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-29Merge "Add STRIDED_SLICE validations on neg stride with shrinkMask." into ↵Xusong Wang
rvc-dev
2020-04-28Add STRIDED_SLICE validations on neg stride with shrinkMask.Xusong Wang
Fixes: 154639297 Test: NNT_static Test: NNT_static_fuzzing Change-Id: I2b37dd7fe07f3239682b5bc7f7cef0ae76134ad0
2020-04-28Skip TestRemoveDefaultArguments tests for useCpuOnly = 1Miao Wang
- The tests require mTestDevice being valid to perform the tests, while useCpuOnly will only allow CPU fallback path. Fixes: 155229031 Test: mm Test: NeuralNetworksTest_static Change-Id: Ic866d14de39d0c8f52648ad319bac14bc8fdd666
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-24Fix "#define VERBOSE" bit-rot (build failure)David Gross
Test: Build NeuralNetworksTest_static both normally and with #define VERBOSE uncommented in TestPartitioningRandom.cpp Bug: 136735929 Change-Id: I79e33239b63885b050d77b5a819b7be82a80528e
2020-04-24Simplify IDevice reboot logicMichael Butler
HIDL allows a service to be retrieved with two functions: * <Interface>::getService — blocks until service is retrieved * <Interface>::tryGetService — immediately returns service or nullptr Currently, the NN runtime retrieves the service in three different places: 1) When the runtime first starts, <Interface>::getService is used to acquire all services 2) When the object is dead, <Interface>::tryGetService is used to attempt to reacquire the service, but will quickly resume if the service is still rebooting 3) When the client calls ANNDevice_wait, <Interface>::getService is used to block until the service is active again This CL simplifies the IDevice reboot logic by changing these static class functions to dependency injection. Specifically, VersionedIDevice now retrieves a handle to the IDevice object through a DeviceFactory function that is passed in when the VersionedIDevice object is created. This function can either operate as blocking or nonblocking to support all use-cases described above, and makes it easier to test the VersionedIDevice recovery code. Bug: 139189546 Test: mma Test: NeuralNetworksTest_static Test: CtsNNAPITestCases Change-Id: I012eb4df6f09f98bdfbd0835457ba98bc22d906e
2020-04-22Merge "Add NNT_static internal tests for device memory allocation." into rvc-devXusong Wang
2020-04-22Merge changes I85577481,I43ed11e9 into rvc-devXusong Wang
* changes: Add STRIDED_SLICE with shrinkMask in RGG tests. Increase the fp precision in dumped spec.
2020-04-21Add STRIDED_SLICE with shrinkMask in RGG tests.Xusong Wang
Fixes: 132322549 Test: NNT_static_fuzzing Change-Id: I85577481125e131741992e9d896d12320af67e1a
2020-04-21Merge "Disable a non-sensible RGG test case." into rvc-devXusong Wang
2020-04-20Disable a non-sensible RGG test case.Xusong Wang
In this test, the RGG produces a non-sensible graph with extreme large output gain and highly clamped output range. Fixes: 153690038 Test: NNT_static_fuzzing Change-Id: I7063730e04ea8a18aecd20029eb6e726ac780c2a
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-17Merge "Add a WHILE test with unused outputs" into rvc-devSlava Shklyaev
2020-04-16Merge "Fix failures in TensorRankConstraint Tests" into rvc-devTreeHugger Robot
2020-04-15Fix failures in TensorRankConstraint TestsStefano Galarraga
Fix sporadic failures in CtsNNAPITestCases.TensorRankConstraint tests. Improves description of expectation failures when comparing OperandTypeWithExtraParams instances. Test: CtsNNAPITestCases Bug: 154093710 Change-Id: Ia2b8bc914892f2ff7908d247fa26743fa242f783
2020-04-15Add a WHILE test with unused outputsSlava Shklyaev
Fix: 148208229 Test: NNT_static Change-Id: I853f1f294cedacb0cbb810042ef2a3466a072ffe
2020-04-15Add operand type variations for WHILE testsSlava Shklyaev
Bug: 149199424 Test: NNT_static Test: VTS 1.3 Change-Id: I887be1b8530aad4568db9e75d3260b6b78884d23
2020-04-14Merge "Add WHILE tests with CONSTANT_REFERENCE inputs" into rvc-devTreeHugger Robot
2020-04-14Merge "Handle CONSTANT_REFERENCE memory in ExecutionPlan::getBuffer()" into ↵Slava Shklyaev
rvc-dev
2020-04-13Merge "Compute RGG golden results from FP model." into rvc-devXusong Wang
2020-04-10Merge "Increase guaranteed BLOB AHWB support feature level to Android R." ↵Xusong Wang
into rvc-dev
2020-04-09Merge "Add some V1_3 operations to Seed/RandomPartitioningTest.*" into rvc-devDavid Gross
2020-04-09Increase guaranteed BLOB AHWB support feature level to Android R.Xusong Wang
Bug: 153282844 Test: NNT_static Change-Id: Ia4528dc012ea9cca7980b508cd090a656c13476b
2020-04-09Add WHILE tests with CONSTANT_REFERENCE inputsSlava Shklyaev
Before this change, we only had tests with CONSTANT_COPY constant inputs (the default). This change adds CONSTANT_REFERENCE counterparts of those tests. Bug: 137836124 Test: NNT_static Change-Id: If6a0b897636f49b19ac7ccc1bc7ded3eee764744
2020-04-09Handle CONSTANT_REFERENCE memory in ExecutionPlan::getBuffer()Slava Shklyaev
Fix: 153432185 Bug: 137836124 Test: NNT_static Change-Id: Icc63966088cd92c4466ec9d94e068309c01342e9
2020-04-08Add some V1_3 operations to Seed/RandomPartitioningTest.*David Gross
Note that this change potentially changes EVERY pseudorandom test case in this particular test set. Test: NeuralNetworksTest_static --gtest_filter=Seed/RandomPartitioningTest.* Also verified that some randomly generated graphs include the newly-added V1_3 operations. Bug: 141704808 Change-Id: Ib762c5fe8f7c42825025a6e57b61631040e0911a
2020-04-08Merge "Support the fallback path with device memories." into rvc-devXusong Wang
2020-04-08Merge changes I54642338,Ica52243a into rvc-devXusong Wang
* changes: Prevent RGG from generating NaN values. Add broadcast with different ranks in RGG.
2020-04-07Merge "Fix control flow partial CPU fallback bug" into rvc-devTreeHugger Robot
2020-04-07Merge "Handle CONSTANT_REFERENCEs in generated CTS tests" into rvc-devTreeHugger Robot
2020-04-07Merge "Remove unused getStatus method" into rvc-devMichael Butler
2020-04-07Merge "Update loopTimeoutDuration documentation" into rvc-devTreeHugger Robot
2020-04-07Merge "Fix HARD_SWISH rank requirement" into rvc-devTreeHugger Robot