We had no tests for quantized PAD in NNAPI 1.1 and think that vendors might have implemented different behaviors.
Bug: 122243484
Test: N/A
Change-Id: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
This CL adds the following two types of validation tests on the NNAPI
Burst serialized format:
(1) it directly modifies the serialized data (invalidating it) to ensure
that vendor driver services properly validates the serialized
request
(2) it ensures that vendor driver services properly fail when the result
channel is not large enough to return the data
This CL additionally includes miscellaneous cleanups:
(1) having a generic "validateEverything" function
(2) moving the "prepareModel" function that's common across
validateRequest and validateBurst to a common area
Fixes: 129779280
Bug: 129157135
Test: mma
Test: VtsHalNeuralnetworksV1_2TargetTest (with sample-all)
Change-Id: Ib90fe7f662824de17db5a254a8c501855e45f6bd
hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
This CL creates a new suite of tests to enable presubmit tests:
* PresubmitHalNeuralnetworksV1_0TargetTest
* PresubmitHalNeuralnetworksV1_1TargetTest
* PresubmitHalNeuralnetworksV1_2TargetTest
These tests are the same as the VTS tests, with the exception that they
will skip running all tests (but still pass) if the service cannot be
found and its name starts with "service-".
This change does not affect the existing NNAPI VTS tests.
Test: mma
Test: atest
Bug: 124040554
Change-Id: I36a38b66b21fd51d0ca381bb4e05a39266dd353f
(cherry picked from commit ed68233697)
Argument-dependent lookup will only work for operator>> if the operator
is in one of the argument's namespaces. This caused the enumerations to
pretty-print for V1_0, but not for V1_1 or V1_2. This change ensures the
V1_0 namespace is used.
Test: mma
Test: atest VtsHalNeuralnetworksV1_0TargetTest (verified the test output "OFFLINE" for DeviceStatus and "DEVICE_UNAVAILABLE" for ErrorStatus instead of raw byte value representation)
Test: atest VtsHalNeuralnetworksV1_1TargetTest (verified the test output "OFFLINE" for DeviceStatus and "DEVICE_UNAVAILABLE" for ErrorStatus instead of raw byte value representation)
Test: atest VtsHalNeuralnetworksV1_2TargetTest (verified ran and passed tests)
Fixes: 124316129
Change-Id: I764a46e2d87615b1f3da0ab0e6edb134bb533887
(cherry picked from commit 42a35bee10)
Add the following tests for compilation caching:
- validation tests
- Test isCachingSupported
- Test prepareModelFromCache with invalid numFd and invalid access mode
- Test saveToCache with invalid numFd, invalid access mode,
invalid file size, and invalid fd offset
- execution test
- Save a mobilenet model to cache and then retrieve and run accuracy
evaluation.
- The same test but the file offsets for prepareModelFromCache is not at zero.
- security test
- CompilationCachingSecurityTest.CorruptedSecuritySensitiveCache
Randomly flip one bit of security-sensitive cache.
- CompilationCachingSecurityTest.WrongLengthSecuritySensitiveCache
Randomly append bytes to security-sensitive cache.
- CompilationCachingSecurityTest.WrongToken
Randomly flip one bit of cache token.
Bug: 119616526
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Change-Id: Iae9211cb28ce972b29572dfedd45d1ade4dfdaf5
Merged-In: Iae9211cb28ce972b29572dfedd45d1ade4dfdaf5
(cherry picked from commit 3405878e5e)
Create 1.2 version IPreparedModel, IPreparedModelCallback, and
IExecutionCallback.
Currently the new interfaces are created the same as 1.0 version,
but will have more methods introduced in later CLs.
Bug: 73506513
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: Icf4d04c22f88e825d87562f1489377fdf6bf585d
Merged-In: Icf4d04c22f88e825d87562f1489377fdf6bf585d
(cherry picked from commit b5cb8f7632)
This removes the use of a separately updated list of models
that has fallen out of sync.
Bug: 119293899
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_2CompatV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_2CompatV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_1CompatV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/sample-all
Change-Id: I2d8804d78331b8fceab4c622c871802aa0f0a4b4
Merged-In: I2d8804d78331b8fceab4c622c871802aa0f0a4b4
(cherry picked from commit b5fe58b95a)
This is a copy the v1.1 tests since we don't have any new ops
implemented in v1.2 yet.
Bug: 114365802
Test: mm
Test: NNAPI VTS
Change-Id: Ida7525fcd3ae0fd6f88ff9591e06aba922bdae64
Merged-In: Ida7525fcd3ae0fd6f88ff9591e06aba922bdae64
(cherry-picked from 871be94770)
Document that every model must have at least one input and one output.
Document graph constraints.
Elaborate a bit on "execution order".
Indicate how operands of different lifetimes are defined (or not).
Fix ANEURALNETWORKS_L2_NORMALIZATION documentation for output shape.
ANEURALNETWORKS_SPACE_TO_DEPTH has inconsistent names for dimensions.
ANEURALNETWORKS_PAD documentation doesn't clearly describe rank or
dimensions of output tensor.
Bug: 66478689
Bug: 67601776
Bug: 69631404
Bug: 79482779
Bug: 79539157
Bug: 79539928
Test: mma at tree root
Change-Id: I6227bea2a486d4b45022d590915e10a124d323d4
Merged-In: I6227bea2a486d4b45022d590915e10a124d323d4
Fix Model::pools documentation.
Specify that an output cannot overlap with an output/input/constant.
Document circumstances under which a prepared model should be expected to execute correctly.
Bug: 87805381
Bug: 79888238
Bug: 77237715
Test: mma at tree root
Change-Id: Ibf3daacad79f1d7e6127acf3887bd98b7c6bdf4e
Merged-In: Ibf3daacad79f1d7e6127acf3887bd98b7c6bdf4e
Updates hardware/interfaces/neuralnetworks/1.(0|1)/types.hal to match
the NeuralNetworks.h header in framework/ml/nn. Only comments have
changed.
Updated using framework/ml/nn/tools/sync_enums_to_hal.py.
Change-Id: I0754868ad8acf6e2e0c5b83661d04682febec9b0
Merged-In: I0754868ad8acf6e2e0c5b83661d04682febec9b0
Bug: 77604249
Test: checked changes with git diff
Test: mm in $ANDROID_BUILD_TOP
(cherry picked from commit 7e64e7f924)
Updates hardware/interfaces/neuralnetworks/1.(0|1)/types.hal to match
the NeuralNetworks.h header in framework/ml/nn. Only comments have
changed.
Updated using framework/ml/nn/tools/sync_enums_to_hal.py.
Change-Id: I0754868ad8acf6e2e0c5b83661d04682febec9b0
Bug: 77604249
Test: checked changes with git diff
Test: mm in $ANDROID_BUILD_TOP
New tests were added to V1_0 and V1_1 specs, but they did not have a
"_relaxed" test in V1_1.
This CL updates the 1.1 VTS validation as a followup CL.
Bug: 76434855
Test: mma
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Change-Id: Ic6b3aeb12a8b90e43cf082c78442af7ec7a1018f
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.
Bug: 68112778
Test: mma
Change-Id: I22b76f3d5bcd084afd2f06e613d2f9f37c1a0c9c
A model can be prepared in different ways to optimize for different
use-cases. This CL propagates the execution preference across the HAL so
that the NN service can better fit the users needs.
Bug: 77864669
Test: mma
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_1TargetTest
Merged-In: Ib928d510d462f36b6a87d5e81010513db7829fa8
Change-Id: Ib928d510d462f36b6a87d5e81010513db7829fa8
(cherry picked from commit 2504c2fe4f)
This CL adds the typo fixes, bug fixes, and missing descriptions added
to the NNAPI but not to the NN HAL. This CL also adds description of
implicit padding, which was present but not documented in 1.0.
Bug: 77541934
Bug: 75459529
Test: mma
Merged-In: I7baa9e515057c43e759849284b3bb0d420a71f1b
Change-Id: I7baa9e515057c43e759849284b3bb0d420a71f1b
(cherry picked from commit 25f3ad328b)
This CL adds validation tests for all of the existing generated models.
The strategy of this CL is this: given a valid model or request, make a
single change to invalidate the model or request, then verify that the
vendor service driver catches the inconsistency and returns
INVALID_ARGUMENT.
Bug: 67828197
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Merged-In: I8efcdbdccc77aaf78992e52c1eac5c940fc81a03
Change-Id: I8efcdbdccc77aaf78992e52c1eac5c940fc81a03
(cherry picked from commit f76acd0312)
Bug: http://b/74200014
Building this module with asan triggers an internal error in gold.
Test: mma SANITIZE_TARGET=address in
hardware/interfaces/neuralnetworks/1.1/vts/functional
Merged-In: I3ce5352a6c86c8dca257d35af06989e57f871749
Change-Id: I3ce5352a6c86c8dca257d35af06989e57f871749
(cherry picked from commit cca38c56f4)
A model can be prepared in different ways to optimize for different
use-cases. This CL propagates the execution preference across the HAL so
that the NN service can better fit the users needs.
Bug: 77864669
Test: mma
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_1TargetTest
Change-Id: Ib928d510d462f36b6a87d5e81010513db7829fa8
This CL adds the typo fixes, bug fixes, and missing descriptions added
to the NNAPI but not to the NN HAL. This CL also adds description of
implicit padding, which was present but not documented in 1.0.
Bug: 77541934
Bug: 75459529
Test: mma
Change-Id: I7baa9e515057c43e759849284b3bb0d420a71f1b