Commit graph

645 commits

Author SHA1 Message Date
Steven Moreland
6ca8276e8b Add VtsHalNeuralnetworksV1_3TargetTest to vts.
Bug: 139438327
Test: N/A
Change-Id: I48342f6e242735e3ee693a7f2bdbe3334a072f81
2020-04-02 14:43:49 -07:00
Miao Wang
077c0339d4 Update the specification for the following operations
- RANDOM_MULTINOMIAL
 - L2_NORMALIZATION

Bug: 136279892
Bug: 140177375
Test: mm
Change-Id: Iab38ef29ebf6d1f5c0a408436b3d564e45e537a0
2020-03-25 16:46:13 -07:00
Michael Butler
3c8593c0fe Merge "Remove extra tests from NNAPI VTS validation tests" into rvc-dev 2020-03-23 22:07:32 +00:00
Miao Wang
1be73e85a1 Merge "Fix the timing initialization error for failed executeFenced case" into rvc-dev 2020-03-23 20:47:22 +00:00
Miao Wang
ad7678c8cb Fix the timing initialization error for failed executeFenced case
Fixes: 152075771
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I5829397346354ee3fc4a58b0a418197a1eee47cc
2020-03-23 20:46:58 +00:00
Xusong Wang
e71fa3a11a Merge "Add BLOB AHWB tests in VTS." into rvc-dev 2020-03-21 06:38:36 +00:00
Xusong Wang
9c415917e0 Add fenced compute path to memory domain validation test.
Bug: 147777318
Test: 1.3 VTS
Change-Id: I0b731d10384ef2024241af1d908acf3ba760d73f
2020-03-20 14:49:54 -07:00
Xusong Wang
fed2f5213f Add memory domain VTS validation tests.
Bug: 147777318
Test: 1.3 VTS with sample driver
Change-Id: Ia2097345924726d8fb627845fd7438cc3eb35eb6
2020-03-20 13:56:40 -07:00
Michael Butler
678a10600c Remove extra tests from NNAPI VTS validation tests
Do not run validation on "inputs_as_internal" and
"all_tensors_as_inputs" variants.

Bug: 138149072
Bug: 149840439
Test: mma
Test: VtsHalNeuralnetworksV1_*TargetTest
Change-Id: I0699ed6703e48b6c4bc0e7a392b79c12770f04c9
2020-03-19 18:37:23 -07:00
Xusong Wang
962fdb26ca Exclude invalid test models from QuantizationCouplingTest.
Bug: 151674996
Test: 1.3 VTS
Change-Id: I381eb6d39926054279f1791bd71d28a963acc0b9
2020-03-16 17:13:41 -07:00
Xusong Wang
41adc5bc11 Add BLOB AHWB tests in VTS.
Bug: 149847930
Test: 1.3 VTS
Change-Id: I9c795dcb7696c843afd12551927463c5529a4b60
2020-03-13 20:04:38 -07:00
TreeHugger Robot
140597c6a0 Merge "Fix VTS of fenced execution with zero-sized output." into rvc-dev 2020-03-14 02:16:31 +00:00
Xusong Wang
5882d6d911 Fix VTS of fenced execution with zero-sized output.
Fixes: 151441390
Test: 1.3 VTS
Change-Id: I100329e18c34c377d217af155c2abc8e67078778
Merged-In: I100329e18c34c377d217af155c2abc8e67078778
(cherry picked from commit 9fcccf8b85)
2020-03-13 15:15:39 -07:00
Michael Butler
b715967a15 Merge "NNAPI VTS: Add validation for Priority" into rvc-dev 2020-03-13 22:13:12 +00:00
Michael Butler
f0d0616d7c Merge "NNAPI VTS: decouple 1.2 tests from 1.3 types" into rvc-dev 2020-03-13 20:04:25 +00:00
Michael Butler
4876af1ba1 NNAPI VTS: decouple 1.2 tests from 1.3 types
Bug: 141718368
Test: mma
Test: VtsHalNeuralnetworksV1_*TargetTest
Change-Id: Ied7b95e146e4d2d95622642bfbb959cf134b5a7a
2020-03-13 19:59:43 +00:00
Michael Butler
da1a692880 NNAPI VTS: Add validation for Priority
This CL also cleans up the validation framework code.

Bug: 67828197
Test: mma
Test: VtsHalNeuralnetworksV1_*TargetTest
Change-Id: I84661fb2b8204148788d10425ca0ac986158b15f
2020-03-12 11:29:08 -07:00
Lev Proleev
f161cc74a1 Clarify supported ranks for new ops in R
Fix: 151108533
Test: mma
Change-Id: I85b66ab5940d09b2786ecb14bff5bc1c1dee894a
2020-03-12 13:34:18 +00:00
Miao Wang
fa161c7a0a Add tests to make sure executeFenced validate unspecified output shapes
Bug: 148979873
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ib4960c71ca46ca034777cc7b02d7d2885a98691d
2020-03-04 14:56:46 -08:00
Miao Wang
34dfa2f74c Add more tests exercising IPreparedModel::executeFenced API
- executeFenced with device memory
  - executeFenced with depending sync fences

Bug: 148979873
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I772c5c85f75cee56e2af06470c2de5b810f8078d
2020-02-26 13:17:22 -08:00
Lev Proleev
3ab17d6b02 Add align_corners and half_pixel_centers parameters to resize ops
Fix: 135147454
Test: NNTest_static
Change-Id: I4115120c8b6261c5518d561c043cda913d47dd45
2020-02-20 11:01:07 +00:00
Michael Butler
c7327c57f9 Fix NNAPI QoS Deadline test
The Deadline test was directly loading into the field of a std::optional
instead of emplacing, which is undefined behavior. This has been
corrected to emplace.

Additionally, previously the deadline test always checked the tensor
results of the execution. This is changed to only check the results
when the driver reports that the execution completed successfully.

Finally, this CL merges similar switch case statements.

Bug: 149766387
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I1068fe70e74a12006dea3cdf4ae9da50004ad24b
2020-02-19 18:33:16 +00:00
Michael Butler
9b9a804fe4 Relax NNAPI QoS deadline parameter
Prior to this CL, the NNAPI QoS deadline is a strict deadline: a task
with a deadline must either complete or abort by the deadline. To
avoid as much overhead as possible, it is requested for Android R to
have a relaxed deadline, where the task *may* be aborted after the
deadline has passed or when the task is estimated to take too long.

Because the deadline is now relaxed, the querying method
IDevice::supportsDeadlines can be removed.

Bug: 149766387
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ib9937b5bb95646c2fd82e1aa17f2b0b639e2c420
2020-02-19 10:07:56 -08:00
Slava Shklyaev
f283a54fcc Merge "Add NNAPI loop timeout VTS test" 2020-02-19 11:19:58 +00:00
Slava Shklyaev
cc873aee8f Add NNAPI loop timeout VTS test
Fix: 149554639
Bug: 145906499
Bug: 136735929
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I642772d3c00c12d72380598d9d86743706179d72
2020-02-19 11:10:13 +00:00
Lev Proleev
13c43c0059 Add parallel linking support for BIDIRECTIONAL_SEQUENCE_{LSTM|RNN}
Change-Id: I51396f82de8dd7282db85a26b0a1be84b236b8c1
Fix: 138653129
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
2020-02-18 21:00:44 +00:00
Slava Shklyaev
f034bf9c92 Add NNAPI loop timeout API
Bug: 145906499
Bug: 136735929
Test: NNT_static
Change-Id: Ie40c248b174964676985403f9f1a5127b408a00a
2020-02-18 13:37:37 +00:00
TreeHugger Robot
5efd0f7194 Merge "Add control flow support to NNAPI VTS tests" 2020-02-17 16:56:44 +00:00
TreeHugger Robot
372b792efe Merge "Add control flow performance to NNAPI Capabilities" 2020-02-15 09:54:45 +00:00
Michael Butler
c16a7603fc Merge "NNAPI VTS: use max time point instead of uint64_t max" 2020-02-14 00:26:58 +00:00
Michael Butler
79d6bb1ad2 NNAPI VTS: use max time point instead of uint64_t max
Bug: 149441015
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ic74f83242cbe04a4cec47adbfc51002fdf8bb47d
2020-02-12 19:06:13 -08:00
Slava Shklyaev
1f98e2e929 Add control flow support to NNAPI VTS tests
See change I98a3edd1.

Bug: 148077633
Bug: 148601177
Bug: 136735929
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I1e436cdba404b68026a45797ac4fb3a34f8be76a
2020-02-12 14:29:27 +00:00
Slava Shklyaev
8a9b306571 Add control flow performance to NNAPI Capabilities
Bug: 139181916
Test: m
Change-Id: I62696a6519191e33568c9664c0047fb57426b99f
2020-02-12 14:29:27 +00:00
Lev Proleev
0b0d69e74f Merge "NNAPI: Add state outputs for {UNI|BI}DIRECTIONAL_SEQUENCE_{RNN|LSTM}" 2020-02-12 11:12:57 +00:00
Automerger Merge Worker
c231f0be30 Merge "Revert "Remove VtsHalNeuralnetworksV1_2TargetTest from vts-core suite"" am: 20a5d89241 am: 3251b30fb2 am: 38d5f26305
Change-Id: I0db62643a33ad66d76da15455afc7a4e35efd895
2020-02-11 19:27:18 +00:00
Treehugger Robot
20a5d89241 Merge "Revert "Remove VtsHalNeuralnetworksV1_2TargetTest from vts-core suite"" 2020-02-11 18:48:38 +00:00
Lev Proleev
188a8f90f0 NNAPI: Add state outputs for {UNI|BI}DIRECTIONAL_SEQUENCE_{RNN|LSTM}
Fix: 138443991
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I0a3af22826d438f6f38de1f64042a50f98265e2d
2020-02-11 11:05:48 +00:00
Dan Shi
6e48bde237 Revert "Remove VtsHalNeuralnetworksV1_2TargetTest from vts-core suite"
This reverts commit 07f4235b53.

Reason for revert: b/144527956

Change-Id: I70c3e99689901556e279200751a90e77fb4fd840
2020-02-11 01:04:07 +00:00
Miao Wang
78743e19b2 Merge "Update VTS tests for executeFenced" 2020-02-10 21:51:45 +00:00
Michael Butler
aba3fc08f2 Merge "NN 1.3 HAL: ANAPIC review follow up" 2020-02-07 02:16:13 +00:00
Miao Wang
15a25f6ec1 Update VTS tests for executeFenced
- Remove the DEVICE_UNAVAILABLE check
 - Pass deadline down to the driver.

Bug: 148979873
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: If90a0dce8c8907a2f8f806455074fa27e3f397ef
2020-02-06 16:10:54 -08:00
Miao Wang
e3966e907f Merge "Add a VTS test to validate NNAPI driver name string." 2020-02-06 23:09:55 +00:00
Michael Butler
68a868b2ac NNAPI HAL: Remove priority from prepareModelFromCache_1_3
prepareModelFromCache_1_3 uses model cache and data cache that
represent a prepared model. Any argument that contributes in a
meaningful way to the prepared model is implicitly included in
this model cache and data cache. For example, "model" and
"executionPreference" appear in prepareModel_1_3 but not in
prepareModelFromCache_1_3 because they are implicitly included
in the model cache and data cache. In a similar way, because
it could affect the resulting model, "priority" should be
removed from prepareModelFromCache_1_3.

Fixes: 148802784
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I518e493ead8aa97220b16370cce8523b425c378c
Merged-In: I518e493ead8aa97220b16370cce8523b425c378c
(cherry picked from commit c90250ff57)
2020-02-06 11:38:08 +00:00
Lev Proleev
124659e450 NNAPI: Add OptionalTimeoutDuration to 1.3/types.t
To sync 1.3/types.t with 1.3/types.hal

Test: generate_api.sh
Change-Id: I6a6e46ec82b4f25d77f7e1af18cc9d6f9478e5b7
Merged-In: I6a6e46ec82b4f25d77f7e1af18cc9d6f9478e5b7
(cherry picked from commit a9c097abec)
2020-02-06 11:38:06 +00:00
Miao Wang
2729d825cb Add a VTS test to validate NNAPI driver name string.
Bug: 134755158
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Iead93f0a251fdbbf94df6dfdf27919d3f6fd71a8
2020-02-05 17:24:02 -08:00
David Gross
0db1b54e9a redefine _Float16 as __fp16 for x86[_64] to allow removing workaround from inhouse clang
At present, the tests might not actually use _Float16 (the generated
tests that are incorporated into the functional tests are built in
frameworks/ml rather than in hardware/interfaces); but the makefiles
are changed anyway, in case _Float16 is added in the future.

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/neuralnetworks/1.0/vts/functional
        inspect build commands for tests as to whether or not
          expected options related to redefinition are present
        $ cd $ANDROID_BUILD_TOP/neuralnetworks/1.1/vts/functional
        inspect build commands for tests as to whether or not
          expected options related to redefinition are present

Change-Id: I9225b228947696d249771b3a35b1f82de9c26b6e
(cherry picked from commit 2452ee5a80)
2020-02-05 11:09:22 -08:00
David Gross
2ca858a491 Merge "redefine _Float16 as __fp16 for x86[_64] to allow removing workaround from inhouse clang" 2020-02-05 19:01:31 +00:00
Michael Butler
6a4172cd3d NN 1.3 HAL: ANAPIC review follow up
This CL makes the following three interface changes:
* Removes @1.3::Operand.ExtraParams, because it was the same as
  @1.2::Operand.ExtraParams
* Changes int32_t token to uint32_t for IDevice::allocate and for
  @1.3::Request.MemoryPool
* Renames OptionalTimePoint::nanoseconds to
  OptionalTimePoint::nanosecondsSinceEpoch

This CL also makes test changes in response to the interface changes,
and fixes a minor comment issue in @1.2::types.hal and @1.3::types.hal.

Bug: 148617339
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I95b49ab34b0b79f587dda035ede700b73dc44a38
2020-02-05 03:09:13 +00:00
Michael Butler
e8d82de36c Merge "NNAPI HAL: Remove priority from prepareModelFromCache_1_3" 2020-02-04 18:43:04 +00:00
Michael Butler
c90250ff57 NNAPI HAL: Remove priority from prepareModelFromCache_1_3
prepareModelFromCache_1_3 uses model cache and data cache that
represent a prepared model. Any argument that contributes in a
meaningful way to the prepared model is implicitly included in
this model cache and data cache. For example, "model" and
"executionPreference" appear in prepareModel_1_3 but not in
prepareModelFromCache_1_3 because they are implicitly included
in the model cache and data cache. In a similar way, because
it could affect the resulting model, "priority" should be
removed from prepareModelFromCache_1_3.

Fixes: 148802784
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I518e493ead8aa97220b16370cce8523b425c378c
2020-02-03 15:06:00 -08:00