Commit graph

819 commits

Author SHA1 Message Date
Treehugger Robot
348df54c43 Merge "Clarify NNAPI control flow shape constraints RESTRICT AUTOMERGE" 2020-07-06 17:49:45 +00:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Matej Pfajfar
3468366623 Change 'blacklist' to 'disallow' am: 26f365b810 am: 2d0bac77ab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1351587

Change-Id: I4e7fec2b1823cbb7e974be59804cccc38d13614d
2020-06-29 23:05:00 +00:00
Slava Shklyaev
dfe1525859 Clarify NNAPI control flow shape constraints RESTRICT AUTOMERGE
This change also removes some non-NN hashes in current.txt that were
unintentionally introduced in https://r.android.com/1178665.

Bug: 156918813
Bug: 158557728
Test: m
Change-Id: I4c2b83e11b27b791b3aa624be68474011b92a269
Merged-In: I4c2b83e11b27b791b3aa624be68474011b92a269
(cherry picked from commit 709842ab98)
2020-06-29 15:31:22 +01:00
Matej Pfajfar
26f365b810 Change 'blacklist' to 'disallow'
Bug: None
Test: mma
Test: atest
Change-Id: I6d1bc4f1cd95a56287127918f4c8111cafd6e833
Merged-In: I6d1bc4f1cd95a56287127918f4c8111cafd6e833
(cherry picked from commit 1bdd58dcf6)
2020-06-29 13:24:11 +01:00
Xusong Wang
3dca799497 Revert "Allow compilations in TOCTOU tests to fail with GENERAL_FAILURE."
This reverts commit 362dfd64d5.

Bug: 157489048
Test: 1.2/1.3 VTS TOCTOU tests
Change-Id: Ifdf4a8fab129cd90a3be019c3c598d980b785aaa
Merged-In: Ifdf4a8fab129cd90a3be019c3c598d980b785aaa
(cherry picked from commit 81fa7605cf)
2020-06-26 15:26:47 +01:00
Miao Wang
29a1225561 Remove temporary test filters
Bug: 155577050
Test: mm
Change-Id: Ibe8a3ed79f640249ba54f94bdde9649f156383ea
Merged-In: Ibe8a3ed79f640249ba54f94bdde9649f156383ea
(cherry picked from commit eeb0068015)
2020-06-26 15:26:44 +01:00
Xusong Wang
0b617ae022 Allow compilations in TOCTOU tests to fail with GENERAL_FAILURE.
A compilation failure is not related to the security aspect of the
TOCTOU test, but it will skip one iteration of security testing. This CL
allows the compilation to fail with GENERAL_FAILURE in TOCTOU tests, and
issues a retry once it happens to ensure enough test coverage.

Bug: 157489048
Test: 1.2/1.3 VTS
Change-Id: Idc88e0365c5d2799187093b6fd7b4abf8f8b463d
Merged-In: Idc88e0365c5d2799187093b6fd7b4abf8f8b463d
(cherry picked from commit 362dfd64d5)
2020-06-26 15:26:40 +01:00
TreeHugger Robot
36e9e40436 Merge "Clarify NNAPI control flow shape constraints" into rvc-dev 2020-06-26 12:07:06 +00:00
Slava Shklyaev
709842ab98 Clarify NNAPI control flow shape constraints
Bug: 156918813
Bug: 158557728
Test: m
Change-Id: I4c2b83e11b27b791b3aa624be68474011b92a269
2020-06-23 13:08:05 +01:00
Xusong Wang
12f483fdfd Merge "Revert "Allow compilations in TOCTOU tests to fail with GENERAL_FAILURE."" into rvc-dev 2020-06-23 00:53:05 +00:00
Xusong Wang
81fa7605cf Revert "Allow compilations in TOCTOU tests to fail with GENERAL_FAILURE."
This reverts commit 362dfd64d5.

Bug: 157489048
Test: 1.2/1.3 VTS TOCTOU tests
Change-Id: Ifdf4a8fab129cd90a3be019c3c598d980b785aaa
2020-06-22 18:36:07 +00:00
Slava Shklyaev
3722d6dcfa Log NNAPI VTS test case to logcat
Sample output:

    I VtsHalNeuralnetworksV1_2TargetTest: [Test Case] TestGenerated/GeneratedTest.Test/nnapi_sample_all_add BEGIN
    ...
    I VtsHalNeuralnetworksV1_2TargetTest: [Test Case] TestGenerated/GeneratedTest.Test/nnapi_sample_all_add END

Bug: 159060565
Test: VtsHalNeuralnetworksV1_0TargetTest (inspected logcat output)
Test: VtsHalNeuralnetworksV1_1TargetTest (inspected logcat output)
Test: VtsHalNeuralnetworksV1_2TargetTest (inspected logcat output)
Test: VtsHalNeuralnetworksV1_3TargetTest (inspected logcat output)
Change-Id: Ic1a0c90e0853ca84dd925d0f7df65e159bb284aa
Merged-In: Ic1a0c90e0853ca84dd925d0f7df65e159bb284aa
(cherry picked from commit 8c8efd68e8)
2020-06-17 13:48:25 +01:00
Slava Shklyaev
a6d65ad073 Merge "Log NNAPI VTS test case to logcat" into rvc-dev 2020-06-17 12:08:45 +00:00
Slava Shklyaev
8c8efd68e8 Log NNAPI VTS test case to logcat
Sample output:

    I VtsHalNeuralnetworksV1_2TargetTest: [Test Case] TestGenerated/GeneratedTest.Test/nnapi_sample_all_add BEGIN
    ...
    I VtsHalNeuralnetworksV1_2TargetTest: [Test Case] TestGenerated/GeneratedTest.Test/nnapi_sample_all_add END

Bug: 159060565
Test: VtsHalNeuralnetworksV1_0TargetTest (inspected logcat output)
Test: VtsHalNeuralnetworksV1_1TargetTest (inspected logcat output)
Test: VtsHalNeuralnetworksV1_2TargetTest (inspected logcat output)
Test: VtsHalNeuralnetworksV1_3TargetTest (inspected logcat output)
Change-Id: Ic1a0c90e0853ca84dd925d0f7df65e159bb284aa
2020-06-17 12:10:00 +01:00
TreeHugger Robot
c55a62bc79 Merge "Remove temporary test filters" into rvc-dev 2020-06-16 23:15:47 +00:00
Miao Wang
eeb0068015 Remove temporary test filters
Bug: 155577050
Test: mm
Change-Id: Ibe8a3ed79f640249ba54f94bdde9649f156383ea
2020-06-16 15:31:24 +00:00
Xusong Wang
362dfd64d5 Allow compilations in TOCTOU tests to fail with GENERAL_FAILURE.
A compilation failure is not related to the security aspect of the
TOCTOU test, but it will skip one iteration of security testing. This CL
allows the compilation to fail with GENERAL_FAILURE in TOCTOU tests, and
issues a retry once it happens to ensure enough test coverage.

Bug: 157489048
Test: 1.2/1.3 VTS
Change-Id: Idc88e0365c5d2799187093b6fd7b4abf8f8b463d
2020-06-15 13:22:27 -07:00
Xusong Wang
91521ab86b Add checks of output shapes when OUTPUT_INSUFFICIENT_SIZE.
Add checks that all returned output dimensions must be at
least as fully specified as the union of the information about the
corresponding operand in the model and in the request.

Bug: 154054474
Test: VTS
Change-Id: I934d084c7665160a98da9828604ce8297fef73b8
Merged-In: I934d084c7665160a98da9828604ce8297fef73b8
(cherry picked from commit d454751e00)
2020-06-02 16:52:56 -07:00
Xusong Wang
d454751e00 Add checks of output shapes when OUTPUT_INSUFFICIENT_SIZE.
Add checks that all returned output dimensions must be at
least as fully specified as the union of the information about the
corresponding operand in the model and in the request.

Bug: 154054474
Test: VTS
Change-Id: I934d084c7665160a98da9828604ce8297fef73b8
2020-05-26 15:08:12 -07:00
Lev Proleev
d90a5de791 NNAPI: Clarify behaviour of ops that reduce dimensions
Clarify behaviour of the following ops in the case when inputs would
cause an output to have an empty shape:
* MEAN
* ARGMIN/ARGMAX
* STRIDED_SLICE

Bug: 155508675
Bug: 155660285
Bug: 155508675
Bug: 155238914
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I92d1c3866a462a99b4eed7782b72f62bb6a076c6
Merged-In: I92d1c3866a462a99b4eed7782b72f62bb6a076c6
(cherry picked from commit d4bba83f6a)
2020-05-19 13:39:26 -07:00
Miao Wang
4749010554 Add AndroidTest.xml for NNAPI 1.3 VTS and temporarily blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.
  - There may still be failing tests, but should not cause OOM in test harness.

Bug: 156691406
Test: mm
Test: atest VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ie05350d71dede04967d94dad4147bd3ed3435f7d
Merged-In: Ie05350d71dede04967d94dad4147bd3ed3435f7d
(cherry picked from commit 338acf5c15)
2020-05-19 13:38:28 -07:00
Lev Proleev
4b2917a5ed NNAPI: Clarify behaviour of REDUCE_* ops
Add a clarification on the behaviour of REDUCE_* ops when all dimensions
of an input tensor are reduced.

Bug: 155508675
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I3a67225c3af80af40a11362ca5d0f55350cbfa05
Merged-In: I3a67225c3af80af40a11362ca5d0f55350cbfa05
(cherry picked from commit eec7d86b44)
2020-05-19 13:38:00 -07:00
Miao Wang
e1c1e7e2f6 Filter out failing NNAPI validation tests
Bug: 155577050
Test: atest VtsHalNeuralnetworksV1_*TargetTest
Change-Id: Id8d497dddd5521670689ff2ea08610c3aaeaf748
Merged-In: Id8d497dddd5521670689ff2ea08610c3aaeaf748
(cherry picked from commit 4429d856cd)
2020-05-19 13:35:55 -07:00
Miao Wang
f904bb11d2 Add AndroidTest.xml for NNAPI 1.0 VTS and blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.

Bug: 155577050
Test: mm
Test: atest VtsHalNeuralnetworksV1_0TargetTest
Change-Id: Ic8f556a957e6af340d500e2c4696b41b2a6e8516
Merged-In: Ic8f556a957e6af340d500e2c4696b41b2a6e8516
(cherry picked from commit 8ebe2a04c5)
2020-05-19 13:35:42 -07:00
Miao Wang
398adea8b6 Add AndroidTest.xml for NNAPI 1.2 VTS and blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.

Bug: 155674368
Test: mm
Test: atest VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I5f5d272742d4cdd6a8cc87ec035b5e2508eaa98f
Merged-In: I5f5d272742d4cdd6a8cc87ec035b5e2508eaa98f
(cherry picked from commit f7c55d5f9b)
2020-05-19 13:35:29 -07:00
Lev Proleev
614ba3ef2e Merge "NNAPI: Clarify behaviour of ops that reduce dimensions" into rvc-dev 2020-05-18 15:31:13 +00:00
Miao Wang
f118c86ba2 Merge "Add AndroidTest.xml for NNAPI 1.3 VTS and temporarily blacklist failing tests" into rvc-dev 2020-05-15 22:33:33 +00:00
Miao Wang
338acf5c15 Add AndroidTest.xml for NNAPI 1.3 VTS and temporarily blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.
  - There may still be failing tests, but should not cause OOM in test harness.

Bug: 156691406
Test: mm
Test: atest VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ie05350d71dede04967d94dad4147bd3ed3435f7d
2020-05-15 13:46:13 -07:00
Lev Proleev
74b04e9649 Merge "NNAPI: Clarify behaviour of REDUCE_* ops" into rvc-dev 2020-05-15 10:28:39 +00:00
Lev Proleev
d4bba83f6a NNAPI: Clarify behaviour of ops that reduce dimensions
Clarify behaviour of the following ops in the case when inputs would
cause an output to have an empty shape:
* MEAN
* ARGMIN/ARGMAX
* STRIDED_SLICE

Bug: 155508675
Bug: 155660285
Bug: 155508675
Bug: 155238914
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I92d1c3866a462a99b4eed7782b72f62bb6a076c6
2020-05-13 21:57:58 +01:00
Lev Proleev
eec7d86b44 NNAPI: Clarify behaviour of REDUCE_* ops
Add a clarification on the behaviour of REDUCE_* ops when all dimensions
of an input tensor are reduced.

Bug: 155508675
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I3a67225c3af80af40a11362ca5d0f55350cbfa05
2020-05-13 15:00:32 +01:00
Miao Wang
4429d856cd Filter out failing NNAPI validation tests
Bug: 155577050
Test: atest VtsHalNeuralnetworksV1_*TargetTest
Change-Id: Id8d497dddd5521670689ff2ea08610c3aaeaf748
2020-05-10 19:38:17 -07:00
Miao Wang
8ebe2a04c5 Add AndroidTest.xml for NNAPI 1.0 VTS and blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.

Bug: 155577050
Test: mm
Test: atest VtsHalNeuralnetworksV1_0TargetTest
Change-Id: Ic8f556a957e6af340d500e2c4696b41b2a6e8516
2020-05-05 15:28:57 -07:00
Miao Wang
f7c55d5f9b Add AndroidTest.xml for NNAPI 1.2 VTS and blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.

Bug: 155674368
Test: mm
Test: atest VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I5f5d272742d4cdd6a8cc87ec035b5e2508eaa98f
2020-05-04 20:10:48 -07:00
David Gross
6174f00cc6 More tests for graph validation.
- detect cycle (CycleTest)
- detect bad execution order (mutateExecutionOrderTest)
- detect lifetime inconsistent with whether operand is written (mutateOperandLifeTimeTest)
- detect lifetime inconsistent with Model inputIndexes/outputIndexes (mutateOperandInputOutputTest)
- detect incorrect number of consumers (mutateOperandNumberOfConsumersTest)
- detect operand written multiple times (mutateOperandAddWriterTest)
- detect operand never written (mutateOperationRemoveWriteTest)

Bug: 66478689
Test: VtsHalNeuralnetworksV1_*TargetTest

Change-Id: Id4ba19660bbd31a16f8a675f7b6437f4d779e8da
Merged-In: Id4ba19660bbd31a16f8a675f7b6437f4d779e8da
(cherry picked from commit af51663e99)
2020-05-04 17:29:52 -07:00
David Gross
12ab6c57cc More tests for graph validation.
- detect cycle (CycleTest)
- detect bad execution order (mutateExecutionOrderTest)
- detect lifetime inconsistent with whether operand is written (mutateOperandLifeTimeTest)
- detect lifetime inconsistent with Model inputIndexes/outputIndexes (mutateOperandInputOutputTest)
- detect incorrect number of consumers (mutateOperandNumberOfConsumersTest)
- detect operand written multiple times (mutateOperandAddWriterTest)
- detect operand never written (mutateOperationRemoveWriteTest)

Bug: 66478689
Test: VtsHalNeuralnetworksV1_*TargetTest

Change-Id: Id4ba19660bbd31a16f8a675f7b6437f4d779e8da
Merged-In: Id4ba19660bbd31a16f8a675f7b6437f4d779e8da
(cherry picked from commit af51663e99)
2020-05-02 02:34:30 +00:00
Slava Shklyaev
af1c77d74f Exclude unused operands from removeOperandTest
Bug: 148208229
Test: TestGenerated/ValidationTest.Test/nnapi_sample*_while*_unused_output*
Change-Id: I39bebefd0e40d370882d614d4beb97ab36c9da8f
Merged-In: I39bebefd0e40d370882d614d4beb97ab36c9da8f
(cherry picked from commit baa4cf02f2)
2020-04-20 13:19:00 +01:00
Slava Shklyaev
baa4cf02f2 Exclude unused operands from removeOperandTest
Bug: 148208229
Test: TestGenerated/ValidationTest.Test/nnapi_sample*_while*_unused_output*
Change-Id: I39bebefd0e40d370882d614d4beb97ab36c9da8f
2020-04-16 15:03:26 +01:00
Slava Shklyaev
17a0b4fcdc Merge changes I866fe138,I0096a2fc
* changes:
  Remove BLOB AHWB tests from 1.2 VTS.
  Update loopTimeoutDuration documentation in NNAPI
2020-04-16 12:45:32 +00:00
Miao Wang
6048fd9dd5 Update the specification for the following operations
- RANDOM_MULTINOMIAL
 - L2_NORMALIZATION

Bug: 136279892
Bug: 140177375
Test: mm
Change-Id: Iab38ef29ebf6d1f5c0a408436b3d564e45e537a0
Merged-In: Iab38ef29ebf6d1f5c0a408436b3d564e45e537a0
(cherry picked from commit 077c0339d4)
2020-04-14 19:29:51 +01:00
Lev Proleev
f0401fe0b0 Clarify supported ranks for new ops in R
Fix: 151108533
Test: mma
Change-Id: I85b66ab5940d09b2786ecb14bff5bc1c1dee894a
Merged-In: I85b66ab5940d09b2786ecb14bff5bc1c1dee894a
(cherry picked from commit f161cc74a1)
2020-04-14 19:29:43 +01:00
Xusong Wang
b79c31aba8 Remove BLOB AHWB tests from 1.2 VTS.
Bug: 153282844
Test: 1.2 VTS
Change-Id: I866fe1388a64a36372f90c60fef340d2fe4c8682
Merged-In: I866fe1388a64a36372f90c60fef340d2fe4c8682
(cherry picked from commit b642700c7f)
2020-04-14 16:30:01 +01:00
Slava Shklyaev
6cf5f3e2a6 Update loopTimeoutDuration documentation in NNAPI
Bug: 149686804
Test: m
Change-Id: I0096a2fc2e579d39a2d59a605a4217d53a381691
Merged-In: I0096a2fc2e579d39a2d59a605a4217d53a381691
(cherry picked from commit 6a222a3eec)
2020-04-14 16:29:57 +01:00
Xusong Wang
d923a3f06f Merge "Remove BLOB AHWB tests from 1.2 VTS." into rvc-dev 2020-04-10 17:44:43 +00:00
Xusong Wang
b642700c7f Remove BLOB AHWB tests from 1.2 VTS.
Bug: 153282844
Test: 1.2 VTS
Change-Id: I866fe1388a64a36372f90c60fef340d2fe4c8682
2020-04-09 14:26:54 -07:00
TreeHugger Robot
cb141698c1 Merge "Update loopTimeoutDuration documentation in NNAPI" into rvc-dev 2020-04-09 20:30:43 +00:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Dan Shi
ba894f81db Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 15:17:02 -07:00
Slava Shklyaev
6a222a3eec Update loopTimeoutDuration documentation in NNAPI
Bug: 149686804
Test: m
Change-Id: I0096a2fc2e579d39a2d59a605a4217d53a381691
2020-04-07 13:24:15 +01:00
Steven Moreland
6ca8276e8b Add VtsHalNeuralnetworksV1_3TargetTest to vts.
Bug: 139438327
Test: N/A
Change-Id: I48342f6e242735e3ee693a7f2bdbe3334a072f81
2020-04-02 14:43:49 -07:00
Michael Butler
b1865b6593 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
Merged-In: I0699ed6703e48b6c4bc0e7a392b79c12770f04c9
(cherry picked from commit 678a10600c)
2020-03-27 11:44:10 +00:00
Miao Wang
702a91acf5 Fix the timing initialization error for failed executeFenced case
Fixes: 152075771
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I5829397346354ee3fc4a58b0a418197a1eee47cc
Merged-In: I5829397346354ee3fc4a58b0a418197a1eee47cc
(cherry picked from commit ad7678c8cb)
2020-03-27 11:44:08 +00:00
Xusong Wang
75e63ad743 Add BLOB AHWB tests in VTS.
Bug: 149847930
Test: 1.3 VTS
Change-Id: I9c795dcb7696c843afd12551927463c5529a4b60
Merged-In: I9c795dcb7696c843afd12551927463c5529a4b60
(cherry picked from commit 41adc5bc11)
2020-03-27 11:44:06 +00:00
Xusong Wang
2844165bf3 Add fenced compute path to memory domain validation test.
Bug: 147777318
Test: 1.3 VTS
Change-Id: I0b731d10384ef2024241af1d908acf3ba760d73f
Merged-In: I0b731d10384ef2024241af1d908acf3ba760d73f
(cherry picked from commit 9c415917e0)
2020-03-27 11:44:04 +00:00
Xusong Wang
5b0c58d1fb Add memory domain VTS validation tests.
Bug: 147777318
Test: 1.3 VTS with sample driver
Change-Id: Ia2097345924726d8fb627845fd7438cc3eb35eb6
Merged-In: Ia2097345924726d8fb627845fd7438cc3eb35eb6
(cherry picked from commit fed2f5213f)
2020-03-27 11:44:00 +00: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
Xusong Wang
3e64ecc347 Exclude invalid test models from QuantizationCouplingTest.
Bug: 151674996
Test: 1.3 VTS
Change-Id: I381eb6d39926054279f1791bd71d28a963acc0b9
Merged-In: I381eb6d39926054279f1791bd71d28a963acc0b9
(cherry picked from commit 962fdb26ca)
2020-03-20 12:29:16 -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
f07a957ce2 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-16 11:08:06 +00:00
Michael Butler
68a6de7abe 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
Merged-In: I84661fb2b8204148788d10425ca0ac986158b15f
(cherry picked from commit da1a692880)
2020-03-16 11:05:59 +00:00
Michael Butler
d09c0eef0b NNAPI VTS: decouple 1.2 tests from 1.3 types
Bug: 141718368
Test: mma
Test: VtsHalNeuralnetworksV1_*TargetTest
Change-Id: Ied7b95e146e4d2d95622642bfbb959cf134b5a7a
Merged-In: Ied7b95e146e4d2d95622642bfbb959cf134b5a7a
(cherry picked from commit 4876af1ba1)
2020-03-16 11:05:57 +00:00
Miao Wang
406890769a Add tests to make sure executeFenced validate unspecified output shapes
Bug: 148979873
Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ib4960c71ca46ca034777cc7b02d7d2885a98691d
Merged-In: Ib4960c71ca46ca034777cc7b02d7d2885a98691d
(cherry picked from commit fa161c7a0a)
2020-03-16 11:01:09 +00:00
Miao Wang
2d74d7dfae 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
Merged-In: I772c5c85f75cee56e2af06470c2de5b810f8078d
(cherry picked from commit 34dfa2f74c)
2020-03-16 11:01:08 +00: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
e3080db4e8 Add align_corners and half_pixel_centers parameters to resize ops
Fix: 135147454
Test: NNTest_static
Change-Id: I4115120c8b6261c5518d561c043cda913d47dd45
Merged-In: I4115120c8b6261c5518d561c043cda913d47dd45
(cherry picked from commit 3ab17d6b02)
2020-02-26 10:36:15 +00:00
Michael Butler
5c40bcc475 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
Merged-In: I1068fe70e74a12006dea3cdf4ae9da50004ad24b
(cherry picked from commit c7327c57f9)
2020-02-26 10:36:13 +00:00
Michael Butler
ff7d6c5493 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
Merged-In: Ib9937b5bb95646c2fd82e1aa17f2b0b639e2c420
(cherry picked from commit 9b9a804fe4)
2020-02-26 10:36:09 +00:00
Slava Shklyaev
a37c2c84aa Add NNAPI loop timeout VTS test
Fix: 149554639
Bug: 145906499
Bug: 136735929
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I642772d3c00c12d72380598d9d86743706179d72
Merged-In: I642772d3c00c12d72380598d9d86743706179d72
(cherry picked from commit cc873aee8f)
2020-02-26 10:36:07 +00:00
Lev Proleev
6be8f3ea67 Add parallel linking support for BIDIRECTIONAL_SEQUENCE_{LSTM|RNN}
Change-Id: I51396f82de8dd7282db85a26b0a1be84b236b8c1
Merged-In: I51396f82de8dd7282db85a26b0a1be84b236b8c1
Fix: 138653129
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
(cherry picked from commit 13c43c0059)
2020-02-26 10:35:43 +00: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
a96ab7407d Add NNAPI loop timeout API
Bug: 145906499
Bug: 136735929
Test: NNT_static
Change-Id: Ie40c248b174964676985403f9f1a5127b408a00a
Merged-In: Ie40c248b174964676985403f9f1a5127b408a00a
(cherry picked from commit f034bf9c92)
2020-02-19 11:58:35 +00:00
Slava Shklyaev
0fff59b961 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
Merged-In: I1e436cdba404b68026a45797ac4fb3a34f8be76a
(cherry picked from commit 1f98e2e929)
2020-02-19 11:58:34 +00:00
Slava Shklyaev
315e9b8924 Add control flow performance to NNAPI Capabilities
Bug: 139181916
Test: m
Change-Id: I62696a6519191e33568c9664c0047fb57426b99f
Merged-In: I62696a6519191e33568c9664c0047fb57426b99f
(cherry picked from commit 8a9b306571)
2020-02-19 11:58:32 +00:00
Michael Butler
36902cbc2f NNAPI VTS: use max time point instead of uint64_t max
Bug: 149441015
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ic74f83242cbe04a4cec47adbfc51002fdf8bb47d
Merged-In: Ic74f83242cbe04a4cec47adbfc51002fdf8bb47d
(cherry picked from commit 79d6bb1ad2)
2020-02-19 11:58:30 +00:00
Lev Proleev
17689aa67d NNAPI: Add state outputs for {UNI|BI}DIRECTIONAL_SEQUENCE_{RNN|LSTM}
Fix: 138443991
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I0a3af22826d438f6f38de1f64042a50f98265e2d
Merged-In: I0a3af22826d438f6f38de1f64042a50f98265e2d
(cherry picked from commit 188a8f90f0)
2020-02-19 11:58:27 +00: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
Michael Butler
c3e1a29a60 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
Merged-In: I95b49ab34b0b79f587dda035ede700b73dc44a38
(cherry picked from commit 6a4172cd3d)
2020-02-12 17:52:34 -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
Miao Wang
aaa3c24f10 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
Merged-In: If90a0dce8c8907a2f8f806455074fa27e3f397ef
(cherry picked from commit 15a25f6ec1)
2020-02-11 12:37:36 -08:00
Miao Wang
cc18d3fede Add a VTS test to validate NNAPI driver name string.
Bug: 134755158
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Iead93f0a251fdbbf94df6dfdf27919d3f6fd71a8
Merged-In: Iead93f0a251fdbbf94df6dfdf27919d3f6fd71a8
(cherry picked from commit 2729d825cb)
2020-02-11 12:37:20 -08: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
David Gross
2452ee5a80 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
2020-02-03 11:55:38 -08:00
Lev Proleev
a9c097abec 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
2020-01-31 14:20:43 +00:00
Miao Wang
99753d9e90 Update sync fence related API for NNAPI
- Allow IPreparedModel::executeFenced to measure gated durations.
 - Allow IPreparedModel::executeFenced to specify an optional deadline
 and aa optional post-gate-release maximum duration.

Bug: 142778241
Bug: 141363565
Test: mm
Change-Id: I1687ec5543f93ed9bb5d7fcf14dbe15ed5b5cd0d
Merged-In: I1687ec5543f93ed9bb5d7fcf14dbe15ed5b5cd0d
(cherry picked from commit 3fd70b020e)
2020-01-30 15:23:23 -08:00
Miao Wang
3fd70b020e Update sync fence related API for NNAPI
- Allow IPreparedModel::executeFenced to measure gated durations.
 - Allow IPreparedModel::executeFenced to specify an optional deadline
 and aa optional post-gate-release maximum duration.

Bug: 142778241
Bug: 141363565
Test: mm
Change-Id: I1687ec5543f93ed9bb5d7fcf14dbe15ed5b5cd0d
2020-01-28 14:31:57 -08:00
Miao Wang
e51e4a9f26 Fix the NNAPI vts tests about validateExecuteFenced
- Skip the test if the driver reject executeFenced.
  - remove the -1 fd for hidl_handle as it causes error before reaching
  the driver.

Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Idc3f815040efccbbfa95b70d5d437441d0bd8682
Merged-In: Idc3f815040efccbbfa95b70d5d437441d0bd8682
(cherry picked from commit 33173a3e68)
2020-01-27 12:59:07 -08:00
Miao Wang
2b5c4cda77 Add VTS tests for NNAPI IPreparedModel::executeFenced
- Validation tests
  - Generated tests to exercise executeFenced path

Bug: 142778241
Test: mm
Change-Id: I509f0b5713fc86885d597940aae5ade0502c97ad
Merged-In: I509f0b5713fc86885d597940aae5ade0502c97ad
(cherry picked from commit 2c4e02329b)
2020-01-27 12:58:50 -08:00
Miao Wang
12ea0d4ed6 Support sync fence in NNAPI
- Add IPreparedModel::dispatchRequest to NNAPI 1.3 HAL
  - Add IDispatchExecutionCallback to allow clients query information
  related to the actual evaluation.

Bug: 142778241
Test: mm
Change-Id: I87cbb7f2aee87342b0418fce04eb4050e2bc1920
Merged-In: I87cbb7f2aee87342b0418fce04eb4050e2bc1920
(cherry picked from commit 90cf3dd37c)
2020-01-27 12:58:31 -08:00
Lev Proleev
53a51cb352 Add FILL and RANK ops
Bug: 148050168
Bug: 148049333
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Iebdfa600d84e31532807740c21d95cae41c76ad5
Merged-In: Iebdfa600d84e31532807740c21d95cae41c76ad5
(cherry picked from commit 8b3f240ea3)
2020-01-27 12:58:14 -08:00
Lev Proleev
503d850369 Add ELU and HARD_SWISH
Bug: 147482068
Bug: 147481241
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Iab8da2a666ad9775dfb53d9297e94962fb651353
Merged-In: Iab8da2a666ad9775dfb53d9297e94962fb651353
(cherry picked from commit aee67f83f9)
2020-01-27 12:57:58 -08:00
Lev Proleev
e4f1583337 NNAPI: Regenerate types.hal to sync with types.spec
Bug: 147765446
Test: mma
Change-Id: I2b41bd959b7084ecb89674c659c66ebb158ac77d
Merged-In: I2b41bd959b7084ecb89674c659c66ebb158ac77d
(cherry picked from commit 2d7c489f67)
2020-01-27 12:57:05 -08:00
Michael Butler
95899b3d39 Create VTS tests for QoS in NNAPI
Bug: 136739795
Bug: 142902514
Bug: 145300530
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: If3ab91cfb3158e4c33e809ff3b149dff47cda76f
Merged-In: If3ab91cfb3158e4c33e809ff3b149dff47cda76f
(cherry picked from commit 616701d3cd)
2020-01-27 12:51:42 -08:00
Michael Butler
79a41d77c0 Update NNAPI 1.3 VTS tests with new types
Bug: 136739795
Bug: 142902514
Bug: 145300530
Test: mma
Test: atest VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ie76da9dc9d6993a56bf644cfe20c5f5b421672c9
Merged-In: Ie76da9dc9d6993a56bf644cfe20c5f5b421672c9
(cherry picked from commit 9449a28b2f)
2020-01-27 12:51:34 -08:00
Michael Butler
ed8e77bf12 Add Quality of Service to NNAPI HAL
This CL makes the following changes:
* introduces a new Priority enum
* extends ErrorStatus with new error codes
* adds "supportsDeadline" method to IDevice
* adds priority and deadline arguments to IDevice::prepareModel*
* adds deadline argument to IPreparedModel::execute*
* updates IExecutionCallback with new ErrorStatus
* updates current.txt accordingly

Bug: 136739795
Bug: 142902514
Bug: 145300530
Test: mma
Change-Id: Iaa7877bde1f463635b8bbdb4e8a001d7b79b9c65
Merged-In: Iaa7877bde1f463635b8bbdb4e8a001d7b79b9c65
(cherry picked from commit c2499ecda1)
2020-01-27 12:51:25 -08:00
Slava Shklyaev
f8124a861f Add NNAPI control flow
Bug: 136735929
Bug: 139181916
Test: m
Change-Id: I7a75175f00fc98df626c40ea669021ccd40130e0
Merged-In: I7a75175f00fc98df626c40ea669021ccd40130e0
(cherry picked from commit a785a3faac)
2020-01-27 12:51:09 -08:00
Slava Shklyaev
351ca59582 Remove neuralnetworks@1.3::Model.Extension* in favor of 1.2 counterparts
The types are the same as in 1.2. No changes are expected.

Bug: 136735929
Test: m
Change-Id: I7431d2e9263fafa0e63b8b1b40f6715e3832d17c
Merged-In: I7431d2e9263fafa0e63b8b1b40f6715e3832d17c
(cherry picked from commit 8a179f3499)
2020-01-27 12:50:50 -08:00
Xusong Wang
e9da9852a5 Add memory domain VTS generated tests.
Bug: 141353602
Bug: 141363565
Test: 1.3 VTS
Change-Id: Ifc7eb3fd6f15e28ba403f02bdf66b4568bddcb64
Merged-In: Ifc7eb3fd6f15e28ba403f02bdf66b4568bddcb64
(cherry picked from commit 1f50e54cf8)
2020-01-24 14:25:32 -08:00
Miao Wang
33173a3e68 Fix the NNAPI vts tests about validateExecuteFenced
- Skip the test if the driver reject executeFenced.
  - remove the -1 fd for hidl_handle as it causes error before reaching
  the driver.

Test: mm
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Idc3f815040efccbbfa95b70d5d437441d0bd8682
2020-01-23 15:08:15 -08:00
Miao Wang
6604e51458 Merge changes from topic "nn_sync_fence"
* changes:
  Add VTS tests for NNAPI IPreparedModel::executeFenced
  Support sync fence in NNAPI
2020-01-23 08:01:42 +00:00
Miao Wang
2c4e02329b Add VTS tests for NNAPI IPreparedModel::executeFenced
- Validation tests
  - Generated tests to exercise executeFenced path

Bug: 142778241
Test: mm
Change-Id: I509f0b5713fc86885d597940aae5ade0502c97ad
2020-01-22 18:01:58 -08:00
Miao Wang
90cf3dd37c Support sync fence in NNAPI
- Add IPreparedModel::dispatchRequest to NNAPI 1.3 HAL
  - Add IDispatchExecutionCallback to allow clients query information
  related to the actual evaluation.

Bug: 142778241
Test: mm
Change-Id: I87cbb7f2aee87342b0418fce04eb4050e2bc1920
2020-01-22 09:45:47 -08:00
Lev Proleev
8b3f240ea3 Add FILL and RANK ops
Bug: 148050168
Bug: 148049333
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Iebdfa600d84e31532807740c21d95cae41c76ad5
2020-01-22 17:16:43 +00:00
Lev Proleev
aee67f83f9 Add ELU and HARD_SWISH
Bug: 147482068
Bug: 147481241
Test: NNTest_static and VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Iab8da2a666ad9775dfb53d9297e94962fb651353
2020-01-22 17:16:41 +00:00
Lev Proleev
2d7c489f67 NNAPI: Regenerate types.hal to sync with types.spec
Bug: 147765446
Test: mma
Change-Id: I2b41bd959b7084ecb89674c659c66ebb158ac77d
2020-01-22 17:16:07 +00:00
Michael Butler
616701d3cd Create VTS tests for QoS in NNAPI
Bug: 136739795
Bug: 142902514
Bug: 145300530
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: If3ab91cfb3158e4c33e809ff3b149dff47cda76f
2020-01-21 16:02:05 -08:00
Michael Butler
9449a28b2f Update NNAPI 1.3 VTS tests with new types
Bug: 136739795
Bug: 142902514
Bug: 145300530
Test: mma
Test: atest VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ie76da9dc9d6993a56bf644cfe20c5f5b421672c9
2020-01-21 16:02:05 -08:00
Michael Butler
c2499ecda1 Add Quality of Service to NNAPI HAL
This CL makes the following changes:
* introduces a new Priority enum
* extends ErrorStatus with new error codes
* adds "supportsDeadline" method to IDevice
* adds priority and deadline arguments to IDevice::prepareModel*
* adds deadline argument to IPreparedModel::execute*
* updates IExecutionCallback with new ErrorStatus
* updates current.txt accordingly

Bug: 136739795
Bug: 142902514
Bug: 145300530
Test: mma
Change-Id: Iaa7877bde1f463635b8bbdb4e8a001d7b79b9c65
2020-01-21 15:55:49 -08:00