This CL is to modify validateBurstSanitized implementation in accordance
with the new test generator and test harness change in the same topic.
Bug: 123092187
Test: 1.2 VTS
Change-Id: Iacfe0e3bba8b4b44b7aee023d1c8129cbd089d4a
Merged-In: Iacfe0e3bba8b4b44b7aee023d1c8129cbd089d4a
(cherry picked from commit 8fc4622bf1)
Comparing with v1.1, the converter for 1.2 HIDL model has additional support
for extraParam, dynamic output shape, and zero-sized output.
Modify CompilationCachingTests to use the new test struct.
Bug: 123092187
Bug: 138718240
Test: All VTS
Change-Id: I54ac97f62898e47a338b51cc6d895a0309ab001f
Merged-In: I54ac97f62898e47a338b51cc6d895a0309ab001f
(cherry picked from commit 491b0a8913)
Comparing with v1.1, the converter for 1.2 HIDL model has additional support
for extraParam, dynamic output shape, and zero-sized output.
Modify CompilationCachingTests to use the new test struct.
Bug: 123092187
Bug: 138718240
Test: All VTS
Change-Id: I54ac97f62898e47a338b51cc6d895a0309ab001f
Merged-In: I54ac97f62898e47a338b51cc6d895a0309ab001f
(cherry picked from commit 491b0a8913)
Fixes: 123092187
Test: mma all VTS
Test: Attempt to modify test enum value,
confirm that there is build error with proper error message.
Change-Id: I0129378c87637b33bb145ec93307634273a9d2fd
This CL is to modify validateBurstSanitized implementation in accordance
with the new test generator and test harness change in the same topic.
Bug: 123092187
Test: 1.2 VTS
Change-Id: Iacfe0e3bba8b4b44b7aee023d1c8129cbd089d4a
Comparing with v1.1, the converter for 1.2 HIDL model has additional support
for extraParam, dynamic output shape, and zero-sized output.
Modify CompilationCachingTests to use the new test struct.
Bug: 123092187
Bug: 138718240
Test: All VTS
Change-Id: I54ac97f62898e47a338b51cc6d895a0309ab001f
See change I2c0366fb87c96851fa6e0f8fe9ceac012d8e3513
Bug: 136097638
Test: m VtsHalNeuralnetworksV1_0TargetTest
Test: m VtsHalNeuralnetworksV1_1TargetTest
Test: m VtsHalNeuralnetworksV1_2TargetTest
Test: m VtsHalNeuralnetworksV1_2CompatV1_0TargetTest
Change-Id: I6fdede028422145d313d46532b5d2154ef0d40bc
Merged-In: I6fdede028422145d313d46532b5d2154ef0d40bc
(cherry picked from commit 2bcfdc82a0)
Prior to this CL, HalInterfaces.h polluted the global namespace through
the "using" declarations. To fix b/72880287, those names were put in a
new ::android::nn::hal namespace. This CL fixes the compilation errors
that occur due to this cleanup.
Bug: 72880287
Test: mma
Change-Id: Idb228e37615af7c0343a09f9a51de378e63bdb5a
Merged-In: Idb228e37615af7c0343a09f9a51de378e63bdb5a
(cherry picked from commit 4745a3d96e)
See change I2c0366fb87c96851fa6e0f8fe9ceac012d8e3513
Bug: 136097638
Test: m VtsHalNeuralnetworksV1_0TargetTest
Test: m VtsHalNeuralnetworksV1_1TargetTest
Test: m VtsHalNeuralnetworksV1_2TargetTest
Test: m VtsHalNeuralnetworksV1_2CompatV1_0TargetTest
Change-Id: I6fdede028422145d313d46532b5d2154ef0d40bc
The VTS Callback files are a subset of the Callback files in
frameworks/ml/nn/runtime/Callbacks.*. This CL syncs the implementations,
removing the functionality that is not needed in VTS.
Fixes: 132322149
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I114ce7f3b6c3d58de0196e9508209614d0a73e11
Merged-In: I114ce7f3b6c3d58de0196e9508209614d0a73e11
(cherry picked from commit 23d0e562e0)
Having separate VTS models and tests for difference HAL version. This
compiler flag is no longer needed.
Bug: 122740334
Test: All VTS 1.x and 1.xCompat1.y
Change-Id: Idbd96a954da9bd5a0e0e66afd9120d84a1efc784
Merged-In: Idbd96a954da9bd5a0e0e66afd9120d84a1efc784
(cherry picked from commit 7763d53545)
To make it easier to create the next version of NNAPI, this change
removes the following nonsensical dependence:
- NNAPI 1.0 VTS depends on NNAPI 1.1 and 1.2
- NNAPI 1.1 VTS depends on NNAPI 1.2
In particular, I made the following changes:
- split GeneratedTestHarness.cpp into three separate implementations,
- created a restricted version of Callbacks.h for 1.0 and 1.1,
- removed the dependency on frameworks/ml/nn/HalInterfaces.h,
- refactored Android.bp files for more autonomy between 1.0, 1.1, and 1.2,
- consolidated some common code into Utils.h,
- created structure for sharing code between VTS versions (VtsHalNeuralNetworksV1_0_utils).
Bug: 74827824
Bug: 124462414
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_1CompatV1_0TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Test: VtsHalNeuralnetworksV1_2CompatV1_0TargetTest
Test: VtsHalNeuralnetworksV1_2CompatV1_1TargetTest
Change-Id: I4243d0b5e574255cef1070850f4d0a284f65f54e
Merged-In: I4243d0b5e574255cef1070850f4d0a284f65f54e
(cherry picked from commit 1d6b465997)
Prior to this CL, HalInterfaces.h polluted the global namespace through
the "using" declarations. To fix b/72880287, those names were put in a
new ::android::nn::hal namespace. This CL fixes the compilation errors
that occur due to this cleanup.
Bug: 72880287
Test: mma
Change-Id: Idb228e37615af7c0343a09f9a51de378e63bdb5a
The VTS Callback files are a subset of the Callback files in
frameworks/ml/nn/runtime/Callbacks.*. This CL syncs the implementations,
removing the functionality that is not needed in VTS.
Fixes: 132322149
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I114ce7f3b6c3d58de0196e9508209614d0a73e11
Having separate VTS models and tests for difference HAL version. This
compiler flag is no longer needed.
Bug: 122740334
Test: All VTS 1.x and 1.xCompat1.y
Change-Id: Idbd96a954da9bd5a0e0e66afd9120d84a1efc784
To make it easier to create the next version of NNAPI, this change
removes the following nonsensical dependence:
- NNAPI 1.0 VTS depends on NNAPI 1.1 and 1.2
- NNAPI 1.1 VTS depends on NNAPI 1.2
In particular, I made the following changes:
- split GeneratedTestHarness.cpp into three separate implementations,
- created a restricted version of Callbacks.h for 1.0 and 1.1,
- removed the dependency on frameworks/ml/nn/HalInterfaces.h,
- refactored Android.bp files for more autonomy between 1.0, 1.1, and 1.2,
- consolidated some common code into Utils.h,
- created structure for sharing code between VTS versions (VtsHalNeuralNetworksV1_0_utils).
Bug: 74827824
Bug: 124462414
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_1CompatV1_0TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Test: VtsHalNeuralnetworksV1_2CompatV1_0TargetTest
Test: VtsHalNeuralnetworksV1_2CompatV1_1TargetTest
Change-Id: I4243d0b5e574255cef1070850f4d0a284f65f54e
Bug: 121347610 document that NNAPI Execution inputs/outputs and HAL Request inputs/outputs must not be modified
Test: cd hardware/interfaces/neuralnetworks/1.0/vts/functional ; mma
Test: cd hardware/interfaces/neuralnetworks/1.2/vts/functional ; mma
Change-Id: Iac71d6d5ad92a90afd1b6babb7cfa128d7484c64
We don't have a framework for handcrafting tests resulting in execution
failure. To produce this test, I created
strided_slice_invalid_output_dims.mod.py and used our VTS test generator
to create the corresponding example.cpp and model.cpp files. I put those
under the new directory neuralnetworks/1.2/vts/functional/generated to
distinguish them from the streamlined generated tests.
Bug: 79856511
Bug: 132155416
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Ib331778605c2e3828195e1e7d1651091873985a0
Merged-In: Ib331778605c2e3828195e1e7d1651091873985a0
(cherry picked from commit 1a18c08052)
The documentation said that cell-to-input weights are required to be
present when input-to-input weights, recurrent-to-input weights and
input gate bias are present. This was incorrect since this weights can
be omitted if peephole connections are not used even if all the other
tensors are present.
Another bug that is fixed in this change is that for output #0 the docs
said "of shape [batch_size, num_units * 4] with CIFG, or [batch_size,
num_units * 3] without CIFG" when in fact it is the opposite, i.e. "of
shape [batch_size, num_units * 3] with CIFG, or [batch_size, num_units *
4] without CIFG."
Existing CTS/VTS tests expect behaviour described in the fixed documentation.
Existing CPU implementation is also compliant with the fixed documentation.
Fix: 111842951
Test: mma
Change-Id: Id011783e33672ae65dc6fe3784cb26feb832acf9
Merged-In: Id011783e33672ae65dc6fe3784cb26feb832acf9
(cherry picked from commit e0537f09fb)
We don't have a framework for handcrafting tests resulting in execution
failure. To produce this test, I created
strided_slice_invalid_output_dims.mod.py and used our VTS test generator
to create the corresponding example.cpp and model.cpp files. I put those
under the new directory neuralnetworks/1.2/vts/functional/generated to
distinguish them from the streamlined generated tests.
Bug: 79856511
Bug: 132155416
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Ib331778605c2e3828195e1e7d1651091873985a0
Prior to this CL, the VTS compilation caching tests are using float32
models. However, there exists several drivers that only support QUANT8
operations, and most of the tests are simply skipped.
This CL makes the CompilationCachingTest fixture parameterized that
every test will run twice, with the first pass running with float32
models and the second pass running with quant8 models.
Bug: 132112463
Test: 1.2 VTS with sample drivers
Test: 1.2 VTS with test drivers that can read and write cache entries
Change-Id: Iaf28065e46c2d90ab8b347b9848be1e6546cce86
Merged-In: Iaf28065e46c2d90ab8b347b9848be1e6546cce86
(cherry picked from commit 35e7599eb2)
Before this change, getSupportedOperations_1_2 was invoked in
saveModelToCache prior to prepareModel_1_2, which delayed the model
preparation and cache overwriting always ran faster in
SaveToCache_TOCTOU test.
This change increases the chance that the model is overwritten after it
is saved in SaveToCache_TOCTOU test by moving getSupportedOperations_1_2
out of saveToCache.
Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Test: TOCTOU tests with a sample driver that is deliberately broken
Change-Id: Ieba6a82252623ac429d5fcb6950b99db949f9886
Merged-In: Ieba6a82252623ac429d5fcb6950b99db949f9886
(cherry picked from commit f8c5987bbd)
We only expect the driver to not crash.
Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Change-Id: Ic9bd7ad6e42d77d505955cb9dda597a39e95cdb6
Merged-In: Ic9bd7ad6e42d77d505955cb9dda597a39e95cdb6
(cherry picked from commit 83ab17f224)
Two tests are added into VTS:
1. The TOCTOU test, for a fixed number of iterations.
We try to attack the driver by replacing the model cache with another
cache entry from a similar model while the driver is saving to or
preparing from cache, and see if the driver crashes or falsely prepares
an unexpected model (by checking the execution result). Either of the
following results are acceptable
* Fails -> the driver detects this corruption.
* Succeeds and produces correct execution result -> the corruption
happens before saving to cache or after preparing from cache.
Due to the racy nature, this test is probabilistic and we run it several
times.
2. Similar to the TOCTOU test but replace the content between
compile-to-cache and compile-from-cache (once only).
Additionally, remove tmp cache directory if test succeeds.
Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Test: Check /data/local/tmp and confirm that
* dirs are preserved on failure
* dirs are removed on success
Change-Id: Ie04fa905f465c3775979f0ca74359d185dcacea9
Merged-In: Ie04fa905f465c3775979f0ca74359d185dcacea9
(cherry picked from commit a44e130a92)
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
Merged-In: Ib90fe7f662824de17db5a254a8c501855e45f6bd
(cherry picked from commit 20f28a24e9)
Prior to this CL, the VTS compilation caching tests are using float32
models. However, there exists several drivers that only support QUANT8
operations, and most of the tests are simply skipped.
This CL makes the CompilationCachingTest fixture parameterized that
every test will run twice, with the first pass running with float32
models and the second pass running with quant8 models.
Bug: 132112463
Test: 1.2 VTS with sample drivers
Test: 1.2 VTS with test drivers that can read and write cache entries
Change-Id: Iaf28065e46c2d90ab8b347b9848be1e6546cce86
The documentation said that cell-to-input weights are required to be
present when input-to-input weights, recurrent-to-input weights and
input gate bias are present. This was incorrect since this weights can
be omitted if peephole connections are not used even if all the other
tensors are present.
Another bug that is fixed in this change is that for output #0 the docs
said "of shape [batch_size, num_units * 4] with CIFG, or [batch_size,
num_units * 3] without CIFG" when in fact it is the opposite, i.e. "of
shape [batch_size, num_units * 3] with CIFG, or [batch_size, num_units *
4] without CIFG."
Existing CTS/VTS tests expect behaviour described in the fixed documentation.
Existing CPU implementation is also compliant with the fixed documentation.
Fix: 111842951
Test: mma
Change-Id: Id011783e33672ae65dc6fe3784cb26feb832acf9
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
Merged-In: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
(cherry picked from commit b01ce9644e)
RESIZE_NEAREST_NEIGHBOR
- The CPU implementation always had the order of {width, height}.
- In P, the documentation was incorrectly changed to {height, width}.
Bug: 131623949
Bug: 130035110
Test: mm
Change-Id: I6c79459fa73347fb51fc34a76ad78d5ac207f210
Merged-In: I6c79459fa73347fb51fc34a76ad78d5ac207f210
(cherry picked from commit 286339b4c8)
FmqResultDatum::OperandInformation has padding that may not be
initialized by an NN HAL service instance. This CL adds a validation
check to ensure that services are not leaking uninitialized data through
this padding region.
Bug: 131356202
Test: mma
Test: atest VtsHalNeuralnetworksV1_2TargetTest
(for ValidationTest with sample-all)
Test: altered sample-driver to randomly set a padding byte to 1;
the new validation test successfully failed the test
Change-Id: I6661945392b3fc773493d8f2f306f29b39e09bab
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
RESIZE_NEAREST_NEIGHBOR
- The CPU implementation always had the order of {width, height}.
- In P, the documentation was incorrectly changed to {height, width}.
Bug: 131623949
Bug: 130035110
Test: mm
Change-Id: I6c79459fa73347fb51fc34a76ad78d5ac207f210
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
Before this change, getSupportedOperations_1_2 was invoked in
saveModelToCache prior to prepareModel_1_2, which delayed the model
preparation and cache overwriting always ran faster in
SaveToCache_TOCTOU test.
This change increases the chance that the model is overwritten after it
is saved in SaveToCache_TOCTOU test by moving getSupportedOperations_1_2
out of saveToCache.
Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Test: TOCTOU tests with a sample driver that is deliberately broken
Change-Id: Ieba6a82252623ac429d5fcb6950b99db949f9886
We only expect the driver to not crash.
Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Change-Id: Ic9bd7ad6e42d77d505955cb9dda597a39e95cdb6
Two tests are added into VTS:
1. The TOCTOU test, for a fixed number of iterations.
We try to attack the driver by replacing the model cache with another
cache entry from a similar model while the driver is saving to or
preparing from cache, and see if the driver crashes or falsely prepares
an unexpected model (by checking the execution result). Either of the
following results are acceptable
* Fails -> the driver detects this corruption.
* Succeeds and produces correct execution result -> the corruption
happens before saving to cache or after preparing from cache.
Due to the racy nature, this test is probabilistic and we run it several
times.
2. Similar to the TOCTOU test but replace the content between
compile-to-cache and compile-from-cache (once only).
Additionally, remove tmp cache directory if test succeeds.
Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Test: Check /data/local/tmp and confirm that
* dirs are preserved on failure
* dirs are removed on success
Change-Id: Ie04fa905f465c3775979f0ca74359d185dcacea9
Update the docs for ops:
- LOG_SOFTMAX
- LOCAL_RESPONSE_NORMALIZATION
The docs mentioned possibility to use float16 as an input type but
didn't specify that other inputs must be float16 as well in that case.
Fix: 123500722
Test: mma
Change-Id: I9028c4a109c80f0b8571fab45555818e9e4bc783
Merged-In: I9028c4a109c80f0b8571fab45555818e9e4bc783
(cherry picked from commit 6d13ba258b)
hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
Update the docs for ops:
- LOG_SOFTMAX
- LOCAL_RESPONSE_NORMALIZATION
The docs mentioned possibility to use float16 as an input type but
didn't specify that other inputs must be float16 as well in that case.
Fix: 123500722
Test: mma
Change-Id: I9028c4a109c80f0b8571fab45555818e9e4bc783
In case of CIFG LSTM, input layer norm weights are not used in the
computation.
Bug: 129126572
Test: mma
Change-Id: I57bc578606132a2c44c71ab63dd7645dcc001302
Merged-In: I57bc578606132a2c44c71ab63dd7645dcc001302
(cherry picked from commit 0480af9aa8)
This CL adapts the VTS code to the corresponding changes made in the NN
utility library.
Bug: 128319484
Test: mma
Test: atest VtsHalNeuralnetworksV1_0Target
Test: atest VtsHalNeuralnetworksV1_1Target
Test: atest VtsHalNeuralnetworksV1_2Target
Change-Id: I470e8228cde2b75620ad851e4fe408f8e8329e7c
Merged-In: I470e8228cde2b75620ad851e4fe408f8e8329e7c
(cherry picked from commit 102e0442d8)
This CL adapts the VTS code to the corresponding changes made in the NN
utility library.
Bug: 119570067
Test: mma
Test: atest VtsHalNeuralnetworksV1_0Target
Test: atest VtsHalNeuralnetworksV1_1Target
Test: atest VtsHalNeuralnetworksV1_2Target
Change-Id: I7cbc1d7025c0352aa1ed29d71dc84c2fcfc20a4f
Merged-In: I7cbc1d7025c0352aa1ed29d71dc84c2fcfc20a4f
(cherry picked from commit e68668f65b)
This CL adapts the VTS code to the corresponding changes made in the NN
utility library.
Bug: 128319484
Test: mma
Test: atest VtsHalNeuralnetworksV1_0Target
Test: atest VtsHalNeuralnetworksV1_1Target
Test: atest VtsHalNeuralnetworksV1_2Target
Change-Id: I470e8228cde2b75620ad851e4fe408f8e8329e7c
This CL adapts the VTS code to the corresponding changes made in the NN
utility library.
Bug: 119570067
Test: mma
Test: atest VtsHalNeuralnetworksV1_0Target
Test: atest VtsHalNeuralnetworksV1_1Target
Test: atest VtsHalNeuralnetworksV1_2Target
Change-Id: I7cbc1d7025c0352aa1ed29d71dc84c2fcfc20a4f
In case of CIFG LSTM, input layer norm weights are not used in the
computation.
Bug: 129126572
Test: mma
Change-Id: I57bc578606132a2c44c71ab63dd7645dcc001302
- Instead of isCachingSupport returning a single boolean, switch to
getNumberOfCacheFilesNeeded returning the number of cache files. This
is to support use cases when driver needs more than one cache file for
each type, or when driver does not need data cache.
- Instead of a separate saveToCache, pass cache info along with
prepareModel_1_2 to save into cache as well as perform compilation.
This is to avoid a potential additional copy of cache files.
Bug: 123780248
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Change-Id: I921b7b8ccc3c66af19f6589f7213c6870d6f07bf
Merged-In: I921b7b8ccc3c66af19f6589f7213c6870d6f07bf
(cherry picked from commit b61ba1ed0b)
Also updates documentation for this op and UnidirectionalSequenceLSTM
op.
Bug: 123644584
Test: in ag/6758764
Change-Id: I72d029fef6d890eb1771c21814b028b09af280c7
Merged-In: I72d029fef6d890eb1771c21814b028b09af280c7
(cherry picked from commit f404a1e894)
Performance information in Capabilities is used by the runtime when
it selects the appropriate processor to distribute work to. Prior to
this CL, Capabilities can only distinguish between float and non-float
data types -- so, for example, float16 and float32 performance is
considered to be the same, and performance for all non-float data types is
considered to be the same.
Bug: 124041010
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: I83fb5920c1c75afbd7750d793a0b8f3e72a0552c
Merged-In: I83fb5920c1c75afbd7750d793a0b8f3e72a0552c
(cherry picked from commit 632b4bd9b0)
Performance information in Capabilities is used by the runtime when
it selects the appropriate processor to distribute work to. Prior to
this CL, Capabilities can only distinguish between float and non-float
data types -- so, for example, float16 and float32 performance is
considered to be the same, and performance for all non-float data types is
considered to be the same.
Bug: 124041010
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: I83fb5920c1c75afbd7750d793a0b8f3e72a0552c
- Instead of isCachingSupport returning a single boolean, switch to
getNumberOfCacheFilesNeeded returning the number of cache files. This
is to support use cases when driver needs more than one cache file for
each type, or when driver does not need data cache.
- Instead of a separate saveToCache, pass cache info along with
prepareModel_1_2 to save into cache as well as perform compilation.
This is to avoid a potential additional copy of cache files.
Bug: 123780248
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
read and write cache entries
Change-Id: I921b7b8ccc3c66af19f6589f7213c6870d6f07bf
Also updates documentation for this op and UnidirectionalSequenceLSTM
op.
Bug: 123644584
Test: in ag/6758764
Change-Id: I72d029fef6d890eb1771c21814b028b09af280c7
The filter tensor is not always operand 1 if there are multiple
operations in the model.
Test: 1.2 VTS tests with sample driver
Change-Id: I8925dfd18072ae5579657e8aa13128e7d9f58324
Merged-In: I8925dfd18072ae5579657e8aa13128e7d9f58324
(cherry picked from commit 8804423ca1)
The filter tensor is not always operand 1 if there are multiple
operations in the model.
Test: 1.2 VTS tests with sample driver
Change-Id: I8925dfd18072ae5579657e8aa13128e7d9f58324