Commit graph

832 commits

Author SHA1 Message Date
Slava Shklyaev
dc98cb0a6b Add TENSOR_BOOL8 support to generated tests
Bug: 119096815
Test: mma
Change-Id: I6a9c49d5c4312a37a91943c668ff8c8ed5ef38c5
Merged-In: I6a9c49d5c4312a37a91943c668ff8c8ed5ef38c5
(cherry picked from commit 9e3fad1801)
2018-12-13 09:18:53 +00:00
Slava Shklyaev
51e44f7090 Add new operand type TENSOR_BOOL8
Bug: 119096815
Test: mma
Change-Id: I2adc7e7a328d53a9dafba52a1f8dfaba63e234b2
Merged-In: I2adc7e7a328d53a9dafba52a1f8dfaba63e234b2
(cherry picked from commit 4aad16b684)
2018-12-13 09:18:53 +00:00
Przemyslaw Szczepaniak
f54f12634c mutateOperationOperandTypeSkip for new CONV_2D variant.
Bug: 119255406
Test: Vts NNAPI tests.
Change-Id: I265ae4968f5fe3589d79e5846a7d640a735a012f
2018-12-12 12:54:06 +00:00
Xusong Wang
b5cb8f7632 Add 1.2 NN HAL: IPreparedModel & callbacks.
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
2018-12-11 17:33:15 -08:00
Przemyslaw Szczepaniak
faa59b8a2c Add TENSOR_QUANT8_SYMM_PER_CHANNEL to operand types
Added ExtraParams union for extra Operand parameters.
It's a more sensible approach than adding more fields
to the Operand struct.

Bug: 119249581
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I59731134cf0ea34cf9e10342686d331da9e9c3b3
2018-12-10 13:08:03 +00:00
Slava Shklyaev
4fdb8b5727 Add REDUCE_* operations
Bug: 113564646
Test: mma
Change-Id: I6088e270c0167bcf8fc6c4002ed7f4e939b6d435
2018-12-10 10:31:15 +00:00
Xusong Wang
2256f080d4 Merge "Add new OperandType FLOAT16." 2018-12-08 02:49:25 +00:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
TreeHugger Robot
3ef664747e Merge "Adds float16 support for RANDOM_MULTINOMIAL." 2018-12-07 09:51:22 +00:00
Xusong Wang
7bca34bee7 Add new OperandType FLOAT16.
Bug: 120225191
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Iaabebe490303c9c93a34d319c8c594df13fb7899
2018-12-06 16:32:28 -08:00
Michael K. Sanders
5b2615be21 Adds float16 support for RANDOM_MULTINOMIAL.
Bug: 118607845
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: Iac8c0c23a8219702697a7a126e5e2e43ef0461f4
2018-12-06 12:35:10 +00:00
Lev Proleev
149f2b018b Add two missing comparison ops to HAL
Bug: 113561733
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Ied32f217f4e4ece3c082f6485f99cf8dee78e55f
2018-12-05 16:24:38 +00:00
Miao Wang
5a080f41a9 Merge changes from topics "replace_asymm", "fp16-op-add"
* changes:
  Replace TENSOR_QUANT16_ASYMM with TENSOR_QUANT16_SYMM
  Fix VTS ValidationTest for 1.2 ops.
  Adds float16 support to generated tests.
  Autogenerates VTS ValidationTest tests.
  Fix VTS ValidationTest for 1.2 ops.
  Separates VTS tests by HAL version.
2018-12-03 18:48:58 +00:00
Michael K. Sanders
bbdab2feee Fixes VTS test failures.
Moves comments for type range values into their enums to make it harder
to forget to update them.

Adds missing float16 types for ARGMAX/ARGMIN/CAST.

Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Test: [  PASSED  ] 2519 tests.

Change-Id: Ic7c3df8c8fbff45fe497f304b6b2c7a09e7dc5a6
2018-12-03 17:08:45 +00:00
Slava Shklyaev
61984d221b Merge changes from topic "nnapi-tensor-bool"
* changes:
  Add TENSOR_BOOL8 support to generated tests
  Add new operand type TENSOR_BOOL8
2018-12-03 14:44:38 +00:00
Slava Shklyaev
9e3fad1801 Add TENSOR_BOOL8 support to generated tests
Bug: 119096815
Test: mma
Change-Id: I6a9c49d5c4312a37a91943c668ff8c8ed5ef38c5
2018-11-30 17:55:12 +00:00
Slava Shklyaev
4aad16b684 Add new operand type TENSOR_BOOL8
Bug: 119096815
Test: mma
Change-Id: I2adc7e7a328d53a9dafba52a1f8dfaba63e234b2
2018-11-30 17:54:55 +00:00
Steven Moreland
4fb17ff880 Merge "Update makefiles." am: 2f3c139981 am: 464839dc43
am: a3beee1be9

Change-Id: I5ff7f3a71d3b2ae503f347ffd50b94797dc92a7e
2018-11-30 01:19:22 -08:00
Steven Moreland
6b110994d2 Update makefiles.
Bug: N/A
Test: N/A
Change-Id: Ie4ccc7f7638e9eca3bcd43c36c16f2f0053ac596
2018-11-29 18:05:35 -08:00
Lev Proleev
217c4071cc Replace TENSOR_QUANT16_ASYMM with TENSOR_QUANT16_SYMM
* Update doc string
* Update zero point mutation to check for symmetric quantization

Fix: 118671831
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Id1999c793c839b892cfe45cbb245611b12db2a72
Merged-In: Id1999c793c839b892cfe45cbb245611b12db2a72
(cherry picked from commit 48c8820bac)
2018-11-29 18:46:36 +00:00
Xusong Wang
1a2492f311 Fix VTS ValidationTest for 1.2 ops.
Fix VTS ValidationTest for 1.2 ops by skipping invalid tests.

Bug: 119425787

Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: I61e33d8ff3d9121d9ceb28e667ba6c00bb9951ac
Merged-In: I61e33d8ff3d9121d9ceb28e667ba6c00bb9951ac
(cherry picked from commit 5b747ae02b)
2018-11-29 18:46:36 +00:00
Michael K. Sanders
650fd186e4 Adds float16 support to generated tests.
Uses the _Float16 type (ISO/IEC TS 18661-3:2015) for storage.

Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Bug: 113563458
Change-Id: I1779b828d397b5354dc854c68d21c159cd5b582c
Merged-In: I1779b828d397b5354dc854c68d21c159cd5b582c
(cherry picked from commit efa4c814fb)
2018-11-29 18:46:36 +00:00
Michael K. Sanders
a8efddc558 Autogenerates VTS ValidationTest tests.
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)
2018-11-29 18:46:36 +00:00
Xusong Wang
a6b1dc7d9b Fix VTS ValidationTest for 1.2 ops.
Skip L2_NORMALIZATION,  LOCAL_RESPONSE_NORMALIZATION, and SOFTMAX for
addOperationInputTest.

Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: I16de09e2eef7610e564f1f49ff067af7efca3784
Merged-In: I16de09e2eef7610e564f1f49ff067af7efca3784
(cherry picked from commit 6433728e2c)
2018-11-29 18:46:36 +00:00
Michael K. Sanders
fc2b10ec86 Separates VTS tests by HAL version.
This prevents a fatal relocation error trying to link
VtsHalNeuralnetworksV1_2TargetTest if it exceeds 1GB.

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
Bug: 119135172

Change-Id: Id5cfdeddc2f0d810b4eb47084640ae1dbf297ea1
Merged-In: Id5cfdeddc2f0d810b4eb47084640ae1dbf297ea1
(cherry-pick from 0fb3892c93)
2018-11-29 18:46:31 +00:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
TreeHugger Robot
c3c3ebad33 Merge "Replace TENSOR_QUANT16_ASYMM with TENSOR_QUANT16_SYMM" 2018-11-16 00:42:40 +00:00
Xusong Wang
9319968f99 Merge "Add two operations to 1.2 nn hal." am: af32d47028 am: 0468984419
am: 1bdc688304

Change-Id: Id53736a0e002f05bdf654cf6478aaab40087a791
2018-11-15 06:42:43 -08:00
Lev Proleev
48c8820bac Replace TENSOR_QUANT16_ASYMM with TENSOR_QUANT16_SYMM
* Update doc string
* Update zero point mutation to check for symmetric quantization

Fix: 118671831
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: Id1999c793c839b892cfe45cbb245611b12db2a72
2018-11-15 10:22:50 +00:00
Michael K. Sanders
9233dbedcc Adds symbolic min/max values for type enums.
This abstracts the boundary values for OperandType and
OperationType to avoid the need to update them in the
model validation functions.

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

Change-Id: I39155148d67215e32b4eb1991b885f65d5eeaca8
Merged-In: I39155148d67215e32b4eb1991b885f65d5eeaca8
(cherry-pick from c785d46eb6)
2018-11-15 09:15:06 +00:00
Xusong Wang
5b747ae02b Fix VTS ValidationTest for 1.2 ops.
Fix VTS ValidationTest for 1.2 ops by skipping invalid tests.

Bug: 119425787

Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: I61e33d8ff3d9121d9ceb28e667ba6c00bb9951ac
2018-11-13 15:07:57 -08:00
Michael K. Sanders
32072766b8 Merge "Adds symbolic min/max values for type enums." 2018-11-13 10:02:31 +00:00
Michael K. Sanders
a4c85981fa Merge "Adds float16 support to generated tests." 2018-11-12 17:34:21 +00:00
Michael K. Sanders
efa4c814fb Adds float16 support to generated tests.
Uses the _Float16 type (ISO/IEC TS 18661-3:2015) for storage.

Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Bug: 113563458
Change-Id: I1779b828d397b5354dc854c68d21c159cd5b582c
2018-11-12 14:15:22 +00:00
Michael K. Sanders
c785d46eb6 Adds symbolic min/max values for type enums.
This abstracts the boundary values for OperandType and
OperationType to avoid the need to update them in the
model validation functions.

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
Change-Id: I39155148d67215e32b4eb1991b885f65d5eeaca8
2018-11-12 11:43:31 +00:00
Xusong Wang
35faff38a7 Add two operations to 1.2 nn hal.
Add ABS and ROI_POOLING to 1.2 nn types.hal

Test: mma
Change-Id: I367e5ea58bcc6bf373fd3a477fbf39c9892a2130
2018-11-09 21:00:56 -08:00
Lev Proleev
ed7ce7afdf Add int16_t to MixedTyped
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I223a36cd2106b54155e0a80ffabe4f7a1c1f23f9
Merged-In: I223a36cd2106b54155e0a80ffabe4f7a1c1f23f9
(cherry picked from commit ca80ff0840)
2018-11-09 20:57:12 -08:00
Lev Proleev
d36b7a8d52 Add static asserts to functions using MixedTyped
This makes it easier to find all the places that need to be changed
after adding a new type to MixedTyped.

Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I92867de6574ec6dc1a17e30d889c79501ea93063
Merged-In: I92867de6574ec6dc1a17e30d889c79501ea93063
(cherry picked from commit 9b490f4833)
2018-11-09 20:56:33 -08:00
Michael K. Sanders
b5fe58b95a Autogenerates VTS ValidationTest tests.
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
2018-11-09 12:30:55 +00:00
Michael K. Sanders
0fb3892c93 Separates VTS tests by HAL version.
This prevents a fatal relocation error trying to link
VtsHalNeuralnetworksV1_2TargetTest if it exceeds 1GB.

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
Bug: 119135172
Change-Id: Id5cfdeddc2f0d810b4eb47084640ae1dbf297ea1
2018-11-09 09:57:34 +00:00
Michael K. Sanders
da3bdbc918 Implements RANDOM_MULTINOMIAL CTS/VTS tests.
Bug: 113562775
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: I3d39d056bf5034e01ce9c5c5e3f416a63d7ec8eb
Merged-In: I3d39d056bf5034e01ce9c5c5e3f416a63d7ec8eb
(cherry picked from commit 941d61a62d)
2018-11-05 18:04:09 -08:00
Lev Proleev
ca80ff0840 Add int16_t to MixedTyped
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I223a36cd2106b54155e0a80ffabe4f7a1c1f23f9
2018-11-05 14:51:06 +00:00
Lev Proleev
9b490f4833 Add static asserts to functions using MixedTyped
This makes it easier to find all the places that need to be changed
after adding a new type to MixedTyped.

Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I92867de6574ec6dc1a17e30d889c79501ea93063
2018-11-02 14:00:25 +00:00
Michael K. Sanders
2b5f5eab59 Merge "Implements RANDOM_MULTINOMIAL CTS/VTS tests." 2018-10-24 15:03:49 +00:00
Michael K. Sanders
941d61a62d Implements RANDOM_MULTINOMIAL CTS/VTS tests.
Bug: 113562775
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: I3d39d056bf5034e01ce9c5c5e3f416a63d7ec8eb
2018-10-23 14:38:49 +01:00
Xusong Wang
6433728e2c Fix VTS ValidationTest for 1.2 ops.
Skip L2_NORMALIZATION,  LOCAL_RESPONSE_NORMALIZATION, and SOFTMAX for
addOperationInputTest.

Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: I16de09e2eef7610e564f1f49ff067af7efca3784
2018-10-22 13:53:31 -07:00
Michael K. Sanders
5dd841253d Adds TENSOR_FLOAT16 operand type.
Bug: 113563458
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: If12ceff428e1b1a90ef99b7353f0df60d4ef8010
Merged-In: If12ceff428e1b1a90ef99b7353f0df60d4ef8010
(cherry picked from commit 19d63453d4)
2018-10-19 09:29:09 +01:00
Lev Proleev
68c8c17467 Add TENSOR_QUANT16_ASYMM to operand types
Add new OperandType::TENSOR_QUANT16_ASYMM.
Add VTS validation for the new type.

Bug: 113561892
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I4f9ed6a33d5d3ec227e9f335df71954c73edf344
Merged-In: I4f9ed6a33d5d3ec227e9f335df71954c73edf344
(cherry picked from commit 5d7c99527e)
2018-10-19 09:29:09 +01:00
Lev Proleev
08662c6f66 Add new OperandType BOOL.
- Add new enum OperandType::BOOL.
- Add v1.2 Operand, OperandType.
- Add VTS validation tests for BOOL.

Bug: 117423393

Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest

Change-Id: I420e2afeb09b881a499eee6b138c1f26e9874f5a
Merged-In: I420e2afeb09b881a499eee6b138c1f26e9874f5a
(cherry picked from commit abad9eac44)
2018-10-19 09:29:09 +01:00
Miao Wang
618028b888 Add HAL entry to allow querying device impl version.
Bug: 111425781
Bug: 112661050
Test: mm
Test: NeuralNetworksTest_static
Change-Id: I32527fa09e45459bc9759f5b679646073cf96785
Merged-In: I32527fa09e45459bc9759f5b679646073cf96785
(cherry picked from commit 44b029b181)
2018-10-19 09:29:09 +01:00
Steven Moreland
2d01a56f97 Merge "Update makefiles." am: c202d17fa6 am: 70d20a497e
am: 4e9e47f47e

Change-Id: I1cce7dda484ddf85556db4c03518463edb29604f
2018-10-17 14:18:52 -07:00
Steven Moreland
1c15915098 Update makefiles.
Some of these were out of date.

Bug: N/A
Test: N/A
Change-Id: I25a2706b95e199f5728cda5a5e4e2b23c60a8d40
2018-10-16 16:36:45 -07:00
Michael K. Sanders
19d63453d4 Adds TENSOR_FLOAT16 operand type.
Bug: 113563458
Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all
Change-Id: If12ceff428e1b1a90ef99b7353f0df60d4ef8010
2018-10-16 12:59:42 +01:00
Lev Proleev
5d7c99527e Add TENSOR_QUANT16_ASYMM to operand types
Add new OperandType::TENSOR_QUANT16_ASYMM.
Add VTS validation for the new type.

Bug: 113561892
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_0TargetTest
Test: VtsHalNeuralnetworksV1_1TargetTest
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I4f9ed6a33d5d3ec227e9f335df71954c73edf344
2018-10-16 10:15:44 +01:00
Xusong Wang
ad43421811 Merge "Add new OperandType BOOL." 2018-10-11 00:45:09 +00:00
Xusong Wang
d4b00fc332 Divide BBOX_TRANSFORM into 2 ops.
Divide BBOX_TRANSFORM op into 2 ops
- AXIS_ALIGNED_BBOX_TRANSFORM
- ROTATED_BBOX_TRANSFORM

Rotated bounding boxes use different tensor format than axis-aligned
bounding boxes, and it would be less confusing if they were represented
by a separate operator code.

Bug: 113562630

Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_xTargetTest with sample driver
Change-Id: Ie08f2e0d0da77f6750766a394969653478d054d5
Merged-In: Ie08f2e0d0da77f6750766a394969653478d054d5
(cherry picked from commit d2bae1c268)
2018-10-10 17:00:48 +00:00
Miao Wang
7b52ab5bf1 Merge "Add HAL entry to allow querying device impl version." 2018-10-09 16:50:33 +00:00
Miao Wang
a57eb5bcd8 Update OWNERS
Test: none
Change-Id: I96db4de3f34837c9f3174fd01e7d06d3355617f3
Merged-In: I96db4de3f34837c9f3174fd01e7d06d3355617f3
(cherry picked from commit 6653e69dc6)
2018-10-09 13:10:11 +00:00
Slava Shklyaev
1079815872 Fix indexing bug in NNAPI
Bug: 114365802
Test: n/a
Change-Id: I87173528b58f66175c99e7c7e2e66daa307b04da
Merged-In: I87173528b58f66175c99e7c7e2e66daa307b04da
(cherry picked from commit 4a211d8364)
2018-10-09 13:10:02 +00:00
Slava Shklyaev
26204621d9 Attach a bug to syncing docs
Bug: 116445845
Test: none
Change-Id: I841b1dc503d70efddb8175b75d9d3efe8078eeb1
Merged-In: I841b1dc503d70efddb8175b75d9d3efe8078eeb1
(cherry picked from commit 7f9f461591)
2018-10-09 13:09:50 +00:00
Przemyslaw Szczepaniak
e9814a9890 Reserve enums for new NNAPI ops.
Test: NeuralNetworksTest_static
Bug: 114365802

Change-Id: I3b379fe3f0336b92ef602bbb12a4bd4a150c573c
Merged-In: I3b379fe3f0336b92ef602bbb12a4bd4a150c573c
(cherry picked from commit 5a9362eb2d)
2018-10-09 13:09:41 +00:00
Slava Shklyaev
48ac2fbc8a Add new op PAD_V2
Bug: 113561890
Test: NeuralNetworksTest_static
Change-Id: I34351d6ff5fae0a13e3e883ca42210c534418ff3
Merged-In: I34351d6ff5fae0a13e3e883ca42210c534418ff3
(cherry picked from commit ffe467e6d8)
2018-10-09 13:09:34 +00:00
Slava Shklyaev
1ba0f52432 Add new ops ARGMAX and ARGMIN
Bug: 113558658
Test: NeuralNetworksTest_static
Change-Id: I8862d4062181689ce69ab65aa07c1b6af07ba567
Merged-In: I8862d4062181689ce69ab65aa07c1b6af07ba567
(cherry picked from commit cc31bd6622)
2018-10-09 13:07:55 +00:00
Lev Proleev
abad9eac44 Add new OperandType BOOL.
- Add new enum OperandType::BOOL.
- Add v1.2 Operand, OperandType.
- Add VTS validation tests for BOOL.

Bug: 117423393

Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_2TargetTest

Change-Id: I420e2afeb09b881a499eee6b138c1f26e9874f5a
2018-10-08 17:21:45 -07:00
Xusong Wang
cf4db1e2d6 Merge "Divide BBOX_TRANSFORM into 2 ops." 2018-10-05 19:47:16 +00:00
Miao Wang
6653e69dc6 Update OWNERS
Test: none
Change-Id: I96db4de3f34837c9f3174fd01e7d06d3355617f3
2018-10-04 17:16:43 -07:00
Xusong Wang
d2bae1c268 Divide BBOX_TRANSFORM into 2 ops.
Divide BBOX_TRANSFORM op into 2 ops
- AXIS_ALIGNED_BBOX_TRANSFORM
- ROTATED_BBOX_TRANSFORM

Rotated bounding boxes use different tensor format than axis-aligned
bounding boxes, and it would be less confusing if they were represented
by a separate operator code.

Bug: 113562630

Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_xTargetTest with sample driver
Change-Id: Ie08f2e0d0da77f6750766a394969653478d054d5
2018-10-04 17:15:10 -07:00
Miao Wang
44b029b181 Add HAL entry to allow querying device impl version.
Bug: 111425781
Bug: 112661050
Test: mm
Test: NeuralNetworksTest_static
Change-Id: I32527fa09e45459bc9759f5b679646073cf96785
2018-09-28 10:47:08 -07:00
Slava Shklyaev
4a211d8364 Fix indexing bug in NNAPI
Bug: 114365802
Test: n/a
Change-Id: I87173528b58f66175c99e7c7e2e66daa307b04da
2018-09-27 16:19:38 +01:00
Slava Shklyaev
7f9f461591 Attach a bug to syncing docs
Bug: 116445845
Test: none
Change-Id: I841b1dc503d70efddb8175b75d9d3efe8078eeb1
2018-09-25 16:11:04 +01:00
Przemyslaw Szczepaniak
5a9362eb2d Reserve enums for new NNAPI ops.
Test: NeuralNetworksTest_static
Bug: 114365802

Change-Id: I3b379fe3f0336b92ef602bbb12a4bd4a150c573c
2018-09-25 12:25:13 +00:00
Slava Shklyaev
ffe467e6d8 Add new op PAD_V2
Bug: 113561890
Test: NeuralNetworksTest_static
Change-Id: I34351d6ff5fae0a13e3e883ca42210c534418ff3
2018-09-25 12:24:58 +00:00
Slava Shklyaev
cc31bd6622 Add new ops ARGMAX and ARGMIN
Bug: 113558658
Test: NeuralNetworksTest_static
Change-Id: I8862d4062181689ce69ab65aa07c1b6af07ba567
2018-09-25 10:44:42 +00:00
Slava Shklyaev
af528bc51c Sync docs with NeuralNetworks.h
Bug: 115855152
Test: none
Change-Id: I15b5207f3ffbea57a4c8313ce744a22ce72b402e
2018-09-24 12:31:03 +00:00
Slava Shklyaev
feb87a9cf8 Add VTS tests for NeuralNetworks v1.2
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)
2018-09-21 14:46:24 +01:00
Slava Shklyaev
8e139a7a11 Create NeuralNetworks HAL v1.2 for new OperationTypes
Bug: 114365802
Test: mm
Change-Id: I86b9261729a64d02ed30dc822a0226de11473ac8
Merged-In: I86b9261729a64d02ed30dc822a0226de11473ac8
(cherry-picked from 060a9acb3b)
2018-09-21 14:41:55 +01:00
Xusong Wang
f6235f8a09 Fix logics for floating-point comparision in VTS test.
Set the acceptable error range based on both absolute tolerance and
relative tolerance.

Currently, absolute tolerance is set to 1e-5 for FP32 and 5 epsilon
(~5e-3) for FP16 relaxed computation. The relative tolerance is set to
5ULP of the corresponding precision. Add a TODO mark for potential
future adjustment on error limit based on testing.

Bug: 111768023

Test: none
Change-Id: Idedcec3e09fd7de9696811b93c81d0f180e896ef
2018-09-06 13:20:12 -07:00
David Gross
c6625a71e4 resolve merge conflicts of ad2db12b3a to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I11175cd1624734e50adc30e63cb32f652c8f1380
2018-06-19 11:49:35 -07:00
David Gross
f839bbedd7 resolve merge conflicts of 2a970cb851 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I587517c463d2d334f1f16eb614923d06d2dcaaaf
2018-06-19 10:00:21 -07:00
David Gross
ad2db12b3a Documentation improvements.
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
2018-06-19 00:09:07 +00:00
David Gross
2a970cb851 Documentation improvements.
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
2018-06-19 00:08:17 +00:00
David Gross
baaf9ab2d2 Document unspecified dimensions.
Test: mm

Bug: 77234888
Bug: 109687058
Change-Id: Ia8928e494d8c712bc9cfb592d67476fde9753f45
(cherry picked from commit 8939b5df12)
Merged-In: Ia8928e494d8c712bc9cfb592d67476fde9753f45
2018-06-15 13:58:12 -07:00
David Gross
cced6284ba Merge "Document unspecified dimensions." into pi-dev
am: 0be954949d

Change-Id: Iac5a78a9a01732c22747929a4427161124cef158
2018-06-06 13:45:43 -07:00
David Gross
8939b5df12 Document unspecified dimensions.
Test: mm

Bug: 77234888
Bug: 109687058
Change-Id: Ia8928e494d8c712bc9cfb592d67476fde9753f45
2018-06-05 12:51:08 -07:00
Mika Raento
d534d32892 Update namespace to match framework/ml/nn
Bug: 72448000
Test: make vts
Change-Id: I3543913561b33e4d1e9d960ec1f81624fb0a1e6b
Merged-In: I3543913561b33e4d1e9d960ec1f81624fb0a1e6b
(cherry picked from commit de16694a60)
2018-05-09 17:53:20 +01:00
Michael Butler
89300b2553 NNAPI: sync NDK and HAL documentation
Bug: 72650109
Test: mma
Merged-In: I3e0a3680b89d80be500d8975f587f2d7c33fea10
Change-Id: I3e0a3680b89d80be500d8975f587f2d7c33fea10
(cherry picked from commit e98352806b)
2018-05-09 17:53:16 +01:00
Mika Raento
c5c7bfe156 Update neuralnetworks/*/types.hal to match impl
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)
2018-05-09 17:52:00 +01:00
Michael Butler
9351f1bc67 Merge "NNAPI: sync NDK and HAL documentation" into pi-dev
am: 89802f7423

Change-Id: I3c4734c05f627d727ff8de46b1b76656438acdd1
2018-04-27 16:19:53 -07:00
Michael Butler
e98352806b NNAPI: sync NDK and HAL documentation
Bug: 72650109
Test: mma
Change-Id: I3e0a3680b89d80be500d8975f587f2d7c33fea10
2018-04-27 14:45:32 -07:00
android-build-prod (mdb)
49336421f4 Merge "Replace hidl_enum_{iterator -> range}." am: 71d7d91ba8
am: 030935b4a0

Change-Id: I114e81425ba04519981121bb511732090fcdbd00
2018-04-27 11:22:45 -07:00
Mika Raento
95eef46fa2 Merge "Update namespace to match framework/ml/nn" into pi-dev 2018-04-26 09:20:41 +00:00
Steven Moreland
303afec451 Replace hidl_enum_{iterator -> range}.
This class is technically an iterable object, not a range.

Bug: 78573628
Test: N/A
Change-Id: Ibe307cb2e55e030ecd48e7cab09e5863f6a5e2f7
2018-04-25 12:49:05 -07:00
Mika Raento
7e64e7f924 Update neuralnetworks/*/types.hal to match impl
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
2018-04-25 12:46:33 +01:00
Michael Butler
3559309ace Merge "NNAPI: Create VTS _relaxed tests for newly added tests" into pi-dev 2018-04-23 22:35:00 +00:00
Michael Butler
f2036fd441 NNAPI: Create VTS _relaxed tests for newly added tests
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
2018-04-23 12:51:03 -07:00
Michael Butler
579ef36ee8 Merge "Update NNAPI OWNERS file -- VTS" into pi-dev 2018-04-20 19:52:48 +00:00
Michael Butler
d42a6d4ca8 Update NNAPI OWNERS file -- VTS
Bug: 78353126
Test: Not necessary
Change-Id: Ic7e14202454d81c7ad432c0aca6752be9f58f71f
2018-04-20 19:50:05 +00:00
Mika Raento
de16694a60 Update namespace to match framework/ml/nn
Bug: 72448000
Test: make vts
Change-Id: I3543913561b33e4d1e9d960ec1f81624fb0a1e6b
2018-04-19 14:38:52 +01:00
Michael Butler
23ee97e748 Update Android.bp via update-makefiles.sh
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.

Bug: 68112778
Test: mma
Change-Id: I22b76f3d5bcd084afd2f06e613d2f9f37c1a0c9c
2018-04-18 19:34:10 +00:00
Michael Butler
f02692d840 NNAPI: Add execution preference to prepareModel (HAL)
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)
2018-04-18 19:08:24 +00:00
Michael Butler
1e9f62d4f2 Sync NNAPI Operand and Operation documentation fixes
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)
2018-04-18 19:08:17 +00:00
Miao Wang
e12088cd64 Fix the spec for TENSOR_QUANT8_ASYMM to match our validation.
- Scale of 0.0 is invalid for quantized tensor.

Bug: 77236592
Test: mma
Merged-In: I3a53d6303d8c964d451e17a3b1671de82d0ff335
Change-Id: I3a53d6303d8c964d451e17a3b1671de82d0ff335
(cherry picked from commit a82d39102a)
2018-04-18 19:08:11 +00:00
Miao Wang
9237ae8889 Fix the NNAPI HAL documentation about ADD and MUL
- ADD and MUL supports QUANT8_ASYMM since OMR1. It was a bug missing
  them in the HAL documentation.
  - Added the updated hash to current.txt for this ABI preserving
  change.

Bug: 75459529
Test: mm
Merged-In: I492a7431c0dbb3dc5967c586d080eb134e380bf2
Change-Id: I492a7431c0dbb3dc5967c586d080eb134e380bf2
(cherry picked from commit f62984027c)
2018-04-18 19:07:59 +00:00
Michael Butler
7ed6135471 NN validation tests
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)
2018-04-18 19:07:52 +00:00
David Gross
fa89f009f9 Add validation tests for consistency of model inputs and outputs.
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all --gtest_filter=Flavor/NeuralnetworksInputsOutputsTest.*
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-float-fast --gtest_filter=Flavor/NeuralnetworksInputsOutputsTest.*
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-quant --gtest_filter=Flavor/NeuralnetworksInputsOutputsTest.*

Bug: 67828197
Merged-In: I245227dce095b9cbbb9b527ad99aa71d11f77c4f
Change-Id: I245227dce095b9cbbb9b527ad99aa71d11f77c4f
(cherry picked from commit 7a76d8a7a8)
2018-04-18 19:07:45 +00:00
Pirama Arumuga Nainar
0d8dbeecd6 Disable arm32 asan for VtsHalNeuralnetworksV1_1TargetTest
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)
2018-04-17 22:30:07 +00:00
Michael Butler
2504c2fe4f NNAPI: Add execution preference to prepareModel (HAL)
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
2018-04-12 19:56:14 -07:00
David Gross
f8ce2138cf Fix documentation.
1. Fix documentation for Operand::numberOfConsumers.
2. Fix typos.

Bug: 69055733
Bug: 76016141
Bug: 74111771

Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all

Merged-In: Ib3d5bbfa701070597731992c3867f72d7b0280bd

Change-Id: I9572b51fa5d3fef01554a5386bd4137215e52599
(cherry picked from commit 541e24311d)
2018-04-12 19:16:25 +00:00
Michael Butler
25f3ad328b Sync NNAPI Operand and Operation documentation fixes
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
2018-04-11 13:22:00 -07:00
David Gross
541e24311d Fix documentation.
1. Fix documentation for Operand::numberOfConsumers.
2. Fix typos.

Bug: 69055733
Bug: 76016141
Bug: 74111771

Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all

Change-Id: Ib3d5bbfa701070597731992c3867f72d7b0280bd
2018-04-10 14:31:54 -07:00
Miao Wang
a82d39102a Fix the spec for TENSOR_QUANT8_ASYMM to match our validation.
- Scale of 0.0 is invalid for quantized tensor.

Bug: 77236592
Test: mma
Change-Id: I3a53d6303d8c964d451e17a3b1671de82d0ff335
2018-04-09 18:31:47 +00:00
TreeHugger Robot
fcf9546ffe Merge "Fix the NNAPI HAL documentation about ADD and MUL" into pi-dev 2018-03-29 22:41:15 +00:00
Michael Butler
f76acd0312 NN validation tests
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
Change-Id: I8efcdbdccc77aaf78992e52c1eac5c940fc81a03
2018-03-28 11:48:13 -07:00
Miao Wang
f62984027c Fix the NNAPI HAL documentation about ADD and MUL
- ADD and MUL supports QUANT8_ASYMM since OMR1. It was a bug missing
  them in the HAL documentation.
  - Added the updated hash to current.txt for this ABI preserving
  change.

Bug: 75459529
Test: mm
Change-Id: I492a7431c0dbb3dc5967c586d080eb134e380bf2
2018-03-28 11:13:48 -07:00
David Gross
7a76d8a7a8 Add validation tests for consistency of model inputs and outputs.
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all --gtest_filter=Flavor/NeuralnetworksInputsOutputsTest.*
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-float-fast --gtest_filter=Flavor/NeuralnetworksInputsOutputsTest.*
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-quant --gtest_filter=Flavor/NeuralnetworksInputsOutputsTest.*

Bug: 67828197
Change-Id: I245227dce095b9cbbb9b527ad99aa71d11f77c4f
2018-03-23 10:12:47 -07:00
Nathan Harold
c893754c0d Update Makefiles Missed In Previous Commits
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.

Bug: 8675309
Test: compilation
Change-Id: I5bf67fbcc809de36bde1869ada7b835566a5198b
2018-03-19 16:37:46 -07:00
Pirama Arumuga Nainar
cca38c56f4 Disable arm32 asan for VtsHalNeuralnetworksV1_1TargetTest
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

Change-Id: I3ce5352a6c86c8dca257d35af06989e57f871749
2018-03-06 19:30:40 +00:00
Michael Butler
1ae02d63df Relax NeuralNetwork's VTS positive and negative base tests
There are some NN VTS tests that assume a service is able to generate a
model consisting only of a floating point add operation. However, some
drivers do not support floating point operations. This CL relaxes the
test requirements to allow a test to be skipped if the service does not
support floating point add.

Bug: 72764145
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest

Merged-In: I6b0644432680fc2f8098b5187795dc2953df03f9
Change-Id: I6b0644432680fc2f8098b5187795dc2953df03f9
(cherry picked from commit 4d5bb1097a)
2018-03-05 13:01:00 -08:00
David Gross
a8cd639dc0 Add Capabilities::relaxedFloat32toFloat16Performance for 1.1.
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/hvx
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all
Test: NeuralNetworksTest_static

Bug: 63911257

Merged-In: I040b68d84504180ba3039e4690d0cd43c2c2649f
Change-Id: I040b68d84504180ba3039e4690d0cd43c2c2649f
(cherry picked from commit 4b458caa4e)
2018-03-05 13:00:46 -08:00
Miao Wang
7578e51fda Minor modification to allow relaxed precision test
Bug: 63911257
Test: mm
Test: VTS test pass on walleye

Merged-In: I41d9ea782262a894e7dbd00b782803c40b31c430
Change-Id: I41d9ea782262a894e7dbd00b782803c40b31c430
(cherry picked from commit 842e1a0331)
2018-03-05 13:00:27 -08:00
Michael Butler
e0d9b167a6 NNAPI narrow evaluation for P -- HAL
We have determined that for Android P it is sufficient to have a
mechanism for a developer to specify on a per-model basis that it is
acceptable for FLOAT32 operations to be carried out as if they were
FLOAT16 operations. This CL extends the model to include information on
these precision requirements.

Bug: 63911257
Test: mm
Test: NeuralNetworksTest
Test: VtsHalNeuralnetworksV1_0TargetTest

Merged-In: I5331e69c05c20c588035897322a6c7dceca374a0
Change-Id: I5331e69c05c20c588035897322a6c7dceca374a0
(cherry picked from commit 7ffe78ba76)
2018-03-05 13:00:14 -08:00
Miao Wang
4862d612ad Refactor NN API VTS tests and add v1.1 tests
- Create VtsHalNeuralnetworksTest_utils module to be shared between
    v1.x tests.
  - Split the existing tests into two categories: basic, and generated.
  - Created v1.1 VTS tests ensuring no regression in existing ML models.

Bug: 63911257
Test: mm
Test: NNAPI VTS tests pass on v1.0 and v1.1 sample drivers

Merged-In: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
Change-Id: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
(cherry picked from commit a2d04c828e)
2018-03-05 12:59:55 -08:00
Michael Butler
5f57913184 Add README to NeuralNetworks HAL
Adds README explaining where to find the NeuralNetworks sample driver.

Test: N/A

Merged-In: Ifbbbbb3801176da27fb03bbed0b0d739031a195b
Change-Id: Ifbbbbb3801176da27fb03bbed0b0d739031a195b
(cherry picked from commit 3530f9ef0d)
2018-03-05 12:59:35 -08:00
Michael Butler
4d5bb1097a Relax NeuralNetwork's VTS positive and negative base tests
There are some NN VTS tests that assume a service is able to generate a
model consisting only of a floating point add operation. However, some
drivers do not support floating point operations. This CL relaxes the
test requirements to allow a test to be skipped if the service does not
support floating point add.

Bug: 72764145
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest
Change-Id: I6b0644432680fc2f8098b5187795dc2953df03f9
2018-02-26 15:24:46 -08:00
David Gross
fe606d5aee Merge "Add Capabilities::relaxedFloat32toFloat16Performance for 1.1." 2018-02-26 19:27:13 +00:00
David Gross
4b458caa4e Add Capabilities::relaxedFloat32toFloat16Performance for 1.1.
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/hvx
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all
Test: NeuralNetworksTest_static

Bug: 63911257

Change-Id: I040b68d84504180ba3039e4690d0cd43c2c2649f
2018-02-26 19:01:19 +00:00
Miao Wang
842e1a0331 Minor modification to allow relaxed precision test
Bug: 63911257
Test: mm
Test: VTS test pass on walleye
Change-Id: I41d9ea782262a894e7dbd00b782803c40b31c430
2018-02-22 13:40:26 -08:00
Michael Butler
7ffe78ba76 NNAPI narrow evaluation for P -- HAL
We have determined that for Android P it is sufficient to have a
mechanism for a developer to specify on a per-model basis that it is
acceptable for FLOAT32 operations to be carried out as if they were
FLOAT16 operations. This CL extends the model to include information on
these precision requirements.

Bug: 63911257
Test: mm
Test: NeuralNetworksTest
Test: VtsHalNeuralnetworksV1_0TargetTest
Change-Id: I5331e69c05c20c588035897322a6c7dceca374a0
2018-02-20 19:06:37 -08:00
Miao Wang
a2d04c828e Refactor NN API VTS tests and add v1.1 tests
- Create VtsHalNeuralnetworksTest_utils module to be shared between
    v1.x tests.
  - Split the existing tests into two categories: basic, and generated.
  - Created v1.1 VTS tests ensuring no regression in existing ML models.

Bug: 63911257
Test: mm
Test: NNAPI VTS tests pass on v1.0 and v1.1 sample drivers

Change-Id: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
2018-02-09 18:07:37 -08:00
Michael Butler
3530f9ef0d Add README to NeuralNetworks HAL
Adds README explaining where to find the NeuralNetworks sample driver.

Test: N/A
Change-Id: Ifbbbbb3801176da27fb03bbed0b0d739031a195b
2018-02-01 13:49:49 -08:00
Michael Butler
162aa583b8 Create NeuralNetworks HAL v1.1 for new OperationTypes
Test: mm
Change-Id: I08efaba79ec28a2f89e94a84ab88b0fa701b7d98
(cherry picked from commit 5c6ee9ecef)
2018-01-31 15:42:11 -08:00
Michael Butler
5c6ee9ecef Create NeuralNetworks HAL v1.1 for new OperationTypes
Test: mm
Change-Id: I08efaba79ec28a2f89e94a84ab88b0fa701b7d98
2018-01-29 22:24:13 -08:00
Steven Moreland
4e1e4081e4 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
(cherry-picked from commit c2f829a1d2)
2017-12-03 10:31:49 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
f390f03aa4 Update for Soong-only makefiles.
Test: pass
Bug: 33420795
Change-Id: Ibec6d1e38939b9e7566a96381439be2aac3bf8ca
2017-10-11 18:30:28 +00:00
I-Jui (Ray) Sung
5bf4edfb9f Refactor test harness for generated VTS tests
Address comments in ag/2926388

Test: VtsHalNeuralnetworksV1_0TargetTest on Angler with sample driver
Bug: 67597726
Change-Id: Ie3118dcbfb11c25dbc84d2becdefbbae868ff28f
2017-10-09 20:57:42 +00:00
Jean-Luc Brouillet
90379def76 Corrected performanceInfo documentation
We'll be using relative numbers, change the doc to reflect that.

Bug: 63905942
Test: Compiled
Change-Id: Iad67621cfc76490c2dc471865a3f82cebf175440
2017-10-05 12:06:36 -07:00
TreeHugger Robot
0c7d0a9d0d Merge "Fix VTS failures on tests with optional inputs" into oc-mr1-dev 2017-10-05 06:15:59 +00:00
I-Jui (Ray) Sung
959cd78e67 Fix VTS failures on tests with optional inputs
RequestArgument for optional inputs should have its .hasNoValue set
and other fields left empty. The test harness was incorrectly ignoring
the hasNoValue field and initializing the offset field even for missing
arguments. That inconsistency was caught by the sample driver and caused
an invalid argument error. With this CL the test harness now populates
requests correctly for tests with intentionally missing inputs, and that
fixes lstm* and lsh_projection.

Test: VtsHalNeuralnetworksV1_0TargetTest on Angler
Bug: 63905942
Change-Id: I8729124b720f0d4163f4b9efd452f82b825b0885
2017-10-04 20:49:57 -07:00
Michael Butler
13cbc53a65 Early test termination for unsupported models
Some service drivers won't be able to support all operations. In those
cases, try to prepare the model anyway. If it works, proceed with the
test; if it fails, terminate the test early.

For example, the hvx nn service does not support svdf, so it should
attempt to prepare the model, but the test should not fail if the hvx
driver reports an error.

Bug: 63905942
Test: mm, expected behavior when running on hvx service
Change-Id: I51aa1911145f0d17590906c21314d2bdc24cffea
2017-10-04 18:14:45 -07:00
Michael Butler
0897ab3aad Only verify output of models a vendor nn service fully supports
Some service drivers won't be able to support all operations. In those
cases, run the test as far as it can go, but ignore the output data.

For example, the hvx nn service does not support svdf, so it should
attempt to prepare and execute the model, but the test should not fail
if the hvx driver reports an error. However, hvx indicates it is able to
run MAX_POOL_2D, so the test should fail if that output is incorrect.

Bug: 63905942
Test: mm
Test: run vts binary on hvx service
Change-Id: I3ebc05836c8e070b66daa2e38b107f96637ca812
2017-10-04 19:31:08 +00:00
TreeHugger Robot
072811f5fb Merge "Fix problem passing null optional operands." into oc-mr1-dev 2017-10-04 01:40:37 +00:00
Jean-Luc Brouillet
578b61c67e Fix problem passing null optional operands.
Allow optional operands to be specified as having no value in the model.
Make sure that both these and model arguements that have no value can
be passed to through the HAL. Change the validation to ensure that all
required ops are there.

Bug: 63905942
Test: Compiled and ran runtime/test and VTS tests.

Change-Id: Ia20954b9712042f5c0571822967521aedb66150b
2017-10-03 23:30:40 +00:00
Michael Butler
cf22a57c1a NNAPI HAL: Change IEvent to explicit callbacks
IEvent was a synchronization primitive which caused some confusion
in the interface. Originally the event object was paired with an
asynchronous task, and the asynchronous task would signal this event
when the corresponding output was ready to be used.

In the case of IDevice::prepareModel, the function call would return an
IPreparedModel object that was not guaranteed to be prepared until the
runtime had returned from waiting on the corresponding event object.
The event object has been changed to two explicit callbacks--
IPreparedModelCallback and IExecutionCallback. Now,
IDevice::prepareModel no longer returns an unfinished IPreparedModel;
instead, it will pass the IPreparedModel object to the runtime through
IPreparedModelCallback::notify. When the runtime retreives the
IPreparedModel object, the asynchronous task has already finished
preparing the model.

The two callbacks are used for different purposes. Each has its own
version of notify to pass the data back to the runtime:
* IPreparedModelCallback::notify(ErrorStatus, IPreparedModel)
* IExecutionCallback::notify(ErrorStatus)

Bug: 63905942
Test: mm, vts, ml/nn/runtime/tests
Change-Id: I0c88cd262ba762e0af15e9da31ebe813a5d150b2
2017-10-03 18:01:29 +00:00
Jean-Luc Brouillet
39ac22e908 Remove operationTuple.
Removed operationTuple from Model in the HAL, as the data type was
redundant information.

Removed	supportedOperationTuples from Capabilities, as real drivers need
more complex restrictions than this provided.  For the OC-MR1, we'll just
rely on getSupportedNodes.

Also removed the unused	cachesCompilation.

Bug: 63905942
Test: Compiled and ran tests.
Change-Id: I15f33d14634f2e1c8d726b1bd01d5b9e123b47ea
2017-09-24 00:44:11 -07:00
Michael Butler
e9a134b868 Merge "Removed WIP tag from Neuralnetworks HAL" into oc-mr1-dev 2017-09-23 03:38:47 +00:00
Michael Butler
ee3906793c Merge "Add negative tests to the Neuralnetworks HAL" into oc-mr1-dev 2017-09-23 01:07:43 +00:00
Michael Butler
926df1e182 Removed WIP tag from Neuralnetworks HAL
Additionally cleaned up some comments and formatting.

Bug: 63905942
Test: not needed
Change-Id: I0306f6d37f3c9ce9b365b5f838c27e81fa001ccd
2017-09-22 15:53:03 -07:00
I-Jui (Ray) Sung
f6b85506fe Downgrade generated test harness for NDK libc++
NDK libc++ does not yet support full C++14. This CL replaced use of
std::get with type as well as auto lambda arguments with equivalent
C++11 constructs in the VTS test harness for NNAPI.

Test: VtsHalNeuralnetworksV1_0TargetTest
Bug: 63905942
Change-Id: If75e7c088e9221a70bcc47bc647e0dd7b045bfa1
2017-09-21 12:46:13 -07:00
Michael Butler
2f499a9ba8 Add negative tests to the Neuralnetworks HAL
This CL adds negative tests to:
* IDevice::getSupportedOperations
* IDevice::prepareModel
* IPreparedModel::execute

It does not make sense to have negative tests for the remaining HAL
entries:
* IDevice::getStatus (all returned values are valid)
* IDevice::getCapabilities (no input or state)
* IEvent::notify (synchronization callback primitive)

Bug: 63905942
Test: mm, running on sample driver has expected output
Change-Id: Ia3cf5ce05dd07ff3f688395b8d0e581851909028
2017-09-20 16:18:55 -07:00
I-Jui (Ray) Sung
7d765bdd0f Support ignored output in test harness
Filtered out outputs that are not needed for correctness verification
during result validation.

Bug: 63905942
Test: VtsHalNeuralnetworksV1_0TargetTest on Angler
Change-Id: Ic967a821c2a60194c9d9f386601a865f5c409a4f
2017-09-13 20:16:47 -07:00
Miao Wang
18622e620a Merge "Add documentation to the Neuralnetworks HIDL HAL." into oc-mr1-dev 2017-09-14 02:26:37 +00:00
Michael Butler
c782110765 Add documentation to the Neuralnetworks HIDL HAL.
Bug: 63905942
Test: not needed
Change-Id: I1582d20e66ef939581d82f21088f0db0bc0f5eb7
2017-09-13 17:56:05 -07:00
Ray Sung
4385047049 Merge "Relax tolerance for FP comparison in test harness" into oc-mr1-dev 2017-09-14 00:53:27 +00:00
I-Jui (Ray) Sung
773369a372 Relax tolerance for FP comparison in test harness
Tests like RNN needs slightly more relaxed tolerance than 4ULP.
Use 1e-5 from corresponding TFLite tests.

Bug: 63905942
Test: VtsHalNeuralnetworksV1_0TargetTest on Angler
Change-Id: I721711e13575f56e956d87e3ad537467f85e93f4
2017-09-13 17:51:45 -07:00
Miao Wang
5ea3ece7ca Make the enums signed int, remove unused info.
Bug: 63905942
Test: NeuralNetworksTest pass
Change-Id: I40ca1120d05ea8900f4f4e49409d3096f46ec0e1
2017-09-13 16:29:34 -07:00
David Gross
a7cdb30b19 Move OEM codes out of NeuralNetworks.h to new file NeuralNetworksOEM.h.
Also remove FAKE_QUANT operation.

Bug: 63905942
Test: nn/runtime/tests, vts

Change-Id: Icfb5e7dbb9c2cca6e719ec2ab6344dbe5d95c86b
2017-09-13 12:31:33 -07:00
I-Jui (Ray) Sung
2c4e1368e1 Test harness for generated tests
Created initial test harness for test models and examples from
NNAPI test generator in VtsHalNeuralnetworksV1_0TargetTest. As
an example, also added a test generated from test spec at
frameworks/ml/nn/tools/test_generator/tests/P_vts_full/.

Generated model setup code and examples are from:
frameworks/ml/nn/runtime/test/generated/examples and
frameworks/ml/nn/runtime/test/generated/vts_models respectively.

Bug: 63905942
Bug: 63525563
Test: VtsHalNeuralnetworksV1_0TargetTest with sample driver enabled
      by cherry-pick

Change-Id: Ief029eed9718c8724ef0b64fc6a7f6b9a7bc7b7b
2017-09-13 08:02:05 +00:00
Michael Butler
61ae6edbe6 Neuralnetworks HAL cleanup -- hardware/interfaces
Does three primary cleanups:
1) Removes unused OperandTypes, creates OEM types
2) Creates explicit ErrorStatus; functions return status
3) IDevice::initialize renamed to getCapabilities,
   IDevice::getSupportedSubgraph renamed to getSupportedOperations

Additionally fixes the corresponding VTS tests.

Bug: 63905942
Test: mm, vts
Change-Id: Ib4c61b9b13963ac2367f21dc3c20e5946eb955a9
2017-09-12 22:32:25 -07:00
Michael Butler
e9dc1674f0 Make prepareModel asynchronous.
Updated the corresponding VTS tests.

Bug: 63905942
Test: mm, vts
Change-Id: Ie520af845f491dbdd93ea66fd643d77cfb4703f7
2017-09-11 23:17:21 -07:00
David Gross
2b395216c3 Merge "Fix bug in the way an Event handles a bound thread." into oc-mr1-dev 2017-09-12 04:02:53 +00:00
David Gross
0380d7f60a Fix bug in the way an Event handles a bound thread.
This just keeps the (test) Event representation in sync with
the runtime Event representation, which is modified by

  https://googleplex-android-review.git.corp.google.com/#/c/platform/frameworks/ml/+/2880348/

Bug: 63905942
Test: vts
Change-Id: I2a6de4397c5e31e35cb3d02e241dd21452c21ca6
2017-09-11 16:23:17 -07:00
Jean-Luc Brouillet
62cc79bdf0 Refactor how arguments are tracked.
Use an explicit description of the lifetime of an operand
rather than relying on poolIndex to do the job.

Bug: 63905942
Test: Ran unit tests

Change-Id: I53c4c10b40fd3312232b0689b43d0f72a2818490
2017-09-10 14:39:19 -07:00
Miao Wang
199aa86411 Add FusedActivationFunc enum and renamed certain operations.
- Add "_2D" to CONV, DEPTHWISE_CONV, AVG_POOL, MAX_POOL, and L2_POOL,
    since they are only supposed to do 2D computation.
  - Remove CAST, GATHER, SPLIT.
  - Also update the tests to reflect the changes.

Bug: 63905942
Test: mm
Test: NeuralNetworksTests pass for both CPU path and sample hidl driver.
Change-Id: I5bcf219c4c6cd4f866c1023d1f35cdc83ca69a85
2017-09-08 23:00:23 -07:00
Michael Butler
0e2ac1bb88 NNAPI Concurrent Query Management -- HAL and VTS update
The NNAPI requires requests on a model to be asynchronously
processed. This CL implements a basic Event that can later
be used to block the runtime thread until the asynchronous
request has completed.

Bug: 63905942
Test: VtsHalNeuralnetworksV1_0TargetTest (32-bit, 64-bit) with sample driver enabled by cherry-pick
      frameworks/ml/nn/runtime/test with and without sample driver enabled
Change-Id: Ie27a574aaaac312e7cbb731750f9c06278357a1c
2017-09-01 11:07:56 -07:00
Jean-Luc Brouillet
5d143d2a0f Cleanup the constants.
- Alphabetize the operations.
- Remove N_GRAM operation.
- Add TENSOR_INT32.

Test: Compiled and ran the tests.
Bug: 63905942
Change-Id: Ie7d9dec671a409256b686ef4665171492d1ac16a
2017-08-31 23:25:57 -07:00
Miao Wang
df5dd34d65 Add OEM_OPERATION to NN HAL.
Bug: 63905942
Test: mm
Test: All unit tests pass on Sailfish
Change-Id: I8c8068b248d682fbf1db37de78666c9cbca376b4
2017-08-31 10:57:29 -07:00
Yang Ni
9e06ee8c54 Merge "Replace LOOKUP with EMBEDDING and HASHTABLE_LOOKUP" into oc-mr1-dev 2017-08-31 15:11:04 +00:00
Zhuoyao Zhang
6afb992759 Update vts test to use the updated test template.
* For registerTestService/getServiceName, no need to pass
  any hard coded string of HAL service FQName.
* Affect test: VtsHalCameraProviderV2_4TargetTest,
               VtsHalGraphicsComposerV2_1TargetTest,
               VtsHalNeuralnetworksV1_0TargetTest

Bug: 62946472
Bug: 64203181

Test: make vts
      vts-tradefed run vts -m VtsHalCameraProviderV2_4Target

Merged-In: If365ab2ed9a91eb4013d71769804b9d4bf089d66
Change-Id: Id0bddbc2949337147557f45cc60dbfaa114ce25e
(cherry picked from commit d71b654d6d)
2017-08-29 17:44:10 +00:00
David Gross
8454fcd4dc Fix test that broke when number of ADD inputs increased from 2 to 3.
Test: vts: nn32, nn64

Bug: 63905942

Change-Id: Ie4b237d0c16247d7774a13384a59453da94c5d91
2017-08-25 16:27:38 -07:00
Yang Ni
7d23580117 Replace LOOKUP with EMBEDDING and HASHTABLE_LOOKUP
Bug: 63905942

Test: adb shell /data/nativetest64/embedding_lookup_test/embedding_lookup_test
Change-Id: Ic9ac31f60ac8a6e2c59700a34909004f4b5dc9ff
2017-08-21 09:23:05 -07:00
Miao Wang
5a9c0c3186 Merge "Remove the data type from the OperationType enum." into oc-mr1-dev 2017-08-16 23:47:06 +00:00
Miao Wang
a5a663c6e5 Remove the data type from the OperationType enum.
- Now the driver needs to report a list of tuple
    {OperationType, OperandType} for capabilities.
  - Any time Operation information is passed across HIDL,
    it should be passed as the tuple {OperationType, OperandType}

Bug: 63905942
Test: mm
Change-Id: I909b5acf4936f65c242ee0925d3a1ac665f46131
2017-08-11 18:35:24 -07:00
Tri Vo
33687730ee Merge "Neural networks test static links to HAL def libs." into oc-mr1-dev 2017-08-10 20:43:07 +00:00
Tri Vo
0cd9782665 Neural networks test static links to HAL def libs.
Bug: 64040096
Test: compiles
Change-Id: I87d26a93fa28d7cd93176489a0d0556b7350f1ed
2017-08-04 10:55:31 -07:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Michael Butler
dfc529dfef Add OWNERS file to Neuralnetworks VTS test directory
Added all six Neuralnetworks team members and two VTS team members

Bug: 63905942
Bug: 63525563
Test: Not needed
Change-Id: I87a2968af5ceec656e8f392cc0291689e66fef5d
2017-08-02 00:21:06 -07:00
Michael Butler
bb4ff6557f Initial VTS tests for Neural Networks HAL.
This CL has the basic framework for the NNAPI VTS tests with one
positive function test for each HAL function. This CL is being uploaded
now because the NN API HAL files are being moved to hardware/interfaces.

Bug: 63905942
Bug: 63525563
Test: mm -j40
Test: vts-tradefed runs and passes
Change-Id: I8f3d606ec50a6a6d110c89132e6fb89f53f3bf48
2017-07-31 17:49:28 -07:00
Michael Butler
376ec0c0fd Move neuralnetworks HAL to hardware/interfaces
The neuralnetworks hal was placed in
frameworks/ml/nn/hardware/interfaces while VTS tests were being
developed.

This CL moves it to hardware/interfaces and another CL removes
it from frameworks/ml/nn/hardware/interfaces.

VTS tests included in a sibling CL in this topic.

Bug: 63905942
Test: mm -j40
Change-Id: I0e6c84de72a763edbaef3e9b3063c3ecca216337
2017-07-29 00:10:35 -07:00