Commit graph

463 commits

Author SHA1 Message Date
Lev Proleev
7f0ee628b1 Create NNAPI HAL v1.3 and add TENSOR_QUANT8_ASYMM_SIGNED OperandType
Bug: 137828494
Bug: 139120468
Bug: 136735770
Test: mma
Change-Id: I28f74e4b364fec1d7431a96cf5687256b3106069
Merged-In: I28f74e4b364fec1d7431a96cf5687256b3106069
(cherry picked from commit 5a7b67ab8f)
2019-10-15 18:22:22 +01:00
Harpreet \"Eli\" Sangha
e0525f9572 Add Vibrator 1.4 Hashes to current.txt
Test: Build
Change-Id: I3cf9bcca7e6aab7125b7666c82ac493ee44eec8c
Merged-In: I3cf9bcca7e6aab7125b7666c82ac493ee44eec8c
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-10-15 02:09:58 +09:00
Lev Proleev
839ca3c428 Revert "Create NNAPI HAL v1.3 and add TENSOR_QUANT8_ASYMM_SIGNED OperandType"
This reverts commit bd2b4e78ac.

Reason for revert: the topic breaks git_qt-dev-plus-aosp

Change-Id: Ic72dcbb7ac4ef8e6ed597eb778289b39475f03f8
2019-10-10 14:01:05 +00:00
Lev Proleev
bd2b4e78ac Create NNAPI HAL v1.3 and add TENSOR_QUANT8_ASYMM_SIGNED OperandType
Bug: 137828494
Bug: 139120468
Bug: 136735770
Test: mma
Change-Id: I1f615047d1c0c208a90082ffb6ffc43f252f77b4
Merged-In: I1f615047d1c0c208a90082ffb6ffc43f252f77b4
(cherry picked from commit 5a7b67ab8f)
2019-10-09 14:18:49 +01:00
David Gross
8c0a48bceb Replace sync_enums_to_hal.py with generate_api.{py,sh} and regenerate */types.hal
There are certain pieces of NeuralNetworks.h and of our various *.hal
files that ought to be kept in sync -- most notably the operand type
and operation type definitions and descriptions in our
NeuralNetworks.h and types.hal files.  To avoid having to do this
manually, a tool can be employed.

The old solution to this problem is sync_enums_to_hal.py, which parses
the existing NeuralNetworks.h and types.hal files, and then rewrites
the types.hal files: It identifies the operand type and operation type
portions of the files, and in the types.hal files replaces them with
transformed versions of the portions from NeuralNetworks.h.  This
approach is brittle -- it is very sensitive to the structure of the
files, as was recognized when this tool was created.  Changes to those
files since the script was last updated essentially broke the script,
as noted in http://b/140132458.

The new solution employs a new tool generate_api.py to combine a
single "specification file" with one "template file" per API file
(NeuralNetworks.h or types.hal) to produce that API file.  The script
generate_api.sh invokes generate_api.py once per API file, passing
appropriate arguments.  See frameworks/ml/nn/tools/api/README.md for
more details.

In the process of combining information from NeuralNetworks.h and
*/types.hal, some formatting, syntactic, and semantic changes have
been made to those files.  For example:
- types.hal files no longer refer to API levels or (similarly)
  to HAL versions other than earlier HAL versions

Bug: 130169064
Bug: 140132458

Test: cd neuralnetworks ; mma

Change-Id: Iceb38effc2c7e6c32344e49225b85256144c0945
Merged-In: Iceb38effc2c7e6c32344e49225b85256144c0945
(cherry picked from commit 2cae5c8b01)
2019-10-09 14:18:06 +01:00
David Anderson
e8f1a7fdc8 Introduce IBootControl 1.1.
libsnapshot needs to communicate to the bootloader that a merge is in
progress. This can be used to prevent factory data resets, prevent
flashing or wiping userdata/metadata, and warning when the active slot
changes.

Bug: 138861550
Test: builds
Change-Id: I577877696b5ec6920b9520d518374931ce9ddfaa
Merged-In: I577877696b5ec6920b9520d518374931ce9ddfaa
2019-10-07 12:41:46 -07:00
Nathan Harold
3b685a8ac8 Clarify the start and end of scan intervals
Update the documentation of NetworkScanRequest to clarify
that the interval between scans is from the completion of
one scan to the start of another. This is the only possible
definition that doesn't possibly result in back-to-back
scans which never complete.

In the initial design of this API, the stated use case was
for scans where "interval" >> "scan duration". For that
use case, this clarification doesn't make a meaningful
difference; however, for the use case of long-duration
scans, the distinction prevents the issue stated above.

Bug: 139935383
Test: compilation (docstring-only change)
Change-Id: Ib8393110bfd3ea883045648ee7dac9c6e6a32d44
2019-09-30 16:11:22 -07:00
Michael Butler
b3c8032b12 Specify NNAPI Burst FMQ read/write requirements
This CL additionally adds missing documentation for timing
information when returning results on the resultChannel.

Bug: 133773876
Test: mma
Change-Id: I1eb1affbb4a912d5fdeab012e2be7e7005deb04d
Merged-In: I1eb1affbb4a912d5fdeab012e2be7e7005deb04d
(cherry picked from commit f99bffd08a)
2019-09-19 13:31:01 -07:00
David Gross
29d90d1455 "successful preparation means successful execution" guarantee neglects bad operation inputs
Under certain circumstances, we guarantee that a prepared model can be
executed successfully.  In describing those circumstances, we
neglected to specify that operation input operands must have legal
values for the guarantee to hold.  For example, the guarantee doesn't
hold if an ADD operation has an activation input that is not one of
the defined values; or if a RESHAPE operation has a shape input in
which two or more components are -1.

This change modifies the guarantee to apply only when operation input
operands have legal values.  It also documents this guarantee for
burst execution.

Note that if an operation has an input operand that can be proven to
have an illegal value at preparation time (e.g., a constant value that
is illegal), model preparation might (but is not required to) fail for
that reason.

Bug: 135933040

Test: $ cd neuralnetworks ; mma
Change-Id: I8b421550dd89e4bbbdae899e7cb5e9e88a46d2fb
(cherry picked from commit 48544cc38a)
2019-09-12 14:27:35 -07:00
David Gross
c9981f9592 Merge "Fix V1_2::IDevice::getType documentation: was @param instead of @return"
am: 15b826ad6a

Change-Id: I81b920f6c0edb6f1709af8d8b609e21d64e5755e
2019-08-29 11:14:21 -07:00
David Gross
9dedd439ab Fix V1_2::IDevice::getType documentation: was @param instead of @return
Bug: 124346013

Test: $ cd neuralnetworks/1.2 ; mma
Change-Id: I45d1320a9edae73cde7d9ccaca57b5b9519b0210
Merged-In: I45d1320a9edae73cde7d9ccaca57b5b9519b0210
(cherry picked from commit c7cdd550a0)
2019-08-28 11:40:01 -07:00
Les Lee
2ad166a35b Merge "WifiHal: Correct typo for code comment"
am: 12ca95ccc4

Change-Id: I97adbb5087c950df99af8962ff400978d5ad64af
2019-08-13 01:28:57 -07:00
lesl
83530c7fe9 WifiHal: Correct typo for code comment
Test: full build
Change-Id: Ia457f39d1d68527c2bdfaa700d45ead3d2064a52
2019-08-06 12:03:28 +08:00
David Gross
9c59f1d42b Merge "Improve documentation related to execution." am: b575cedd74
am: 3059c66d53

Change-Id: Ie1b4244f9267a96df67f8f64c42b91f3b455f416
2019-06-21 12:11:13 -07:00
David Gross
f406bf9b1e Improve documentation related to execution.
Bug: 121347610 document that NNAPI Execution inputs/outputs and HAL Request inputs/outputs must not be modified

Test: cd hardware/interfaces/neuralnetworks/1.0/vts/functional ; mma
Test: cd hardware/interfaces/neuralnetworks/1.2/vts/functional ; mma

Change-Id: Iac71d6d5ad92a90afd1b6babb7cfa128d7484c64
2019-06-21 11:28:19 -07:00
Brian Duddie
ffe139e47c Merge "Add guidance for avoiding race in Sensors HAL 2.0" into qt-dev
am: 5c654f3fc6

Change-Id: I4720ca0dd2ec1c30b234fdf61aa6a3430ddd7a3e
2019-06-18 17:23:24 -07:00
Brian Duddie
a69036fbfe Add guidance for avoiding race in Sensors HAL 2.0
Bug: 135216821
Test: n/a, comment change only
Change-Id: Iad491c5e221c86a2724d4074ac645b8ee6e9af6f
2019-06-15 00:49:05 +00:00
Shuzhen Wang
9d2ea958a6 Camera: Use original dataspace/format for 3.5 device
am: 22f6dcec7e

Change-Id: Iedb4e97abf10be30a257202f6d967b0e807dd0f8
2019-06-06 17:12:37 -07:00
Shuzhen Wang
22f6dcec7e Camera: Use original dataspace/format for 3.5 device
Starting from CameraDeviceSession 3.5, for IMPLEMENTATION_DEFINED pixel
format, configureStreams call uses original format and dataspace instead
of the overridden value.

This makes sure the HAL interface behavior is consistent between first
and subsequent processCaptureRequest() calls.

Test: Camera CTS and partner testing
Bug: 131864007
Change-Id: Id701141d2c11089ef063fd3f32444212855f84ab
2019-06-06 07:50:50 -07:00
Pierre Fite-Georgel
ba7ccb21f7 Clarify documentation for AINFO_SENSOR_PLACEMENT
am: 26c952bf61

Change-Id: Id3e7df67de64fb34f5139c4626760238d275efa7
2019-05-29 13:45:06 -07:00
Pierre Fite-Georgel
26c952bf61 Clarify documentation for AINFO_SENSOR_PLACEMENT
Specify units of location vector and define the direction of the
rotation matrix translation as Android device frame to local sensor
frame.

Fixes: 133264933
Test: n/a, comment update only
Change-Id: I76dae7a6fae3c8f44a4dcd1fcc6b790abff86420
2019-05-29 09:07:52 -07:00
Kevin Rocard
d123e015b2 Merge "Audio: Document channel order convention" into qt-dev
am: d05b62368b

Change-Id: Ic63ff46c6461aa2bec27c4ca1d562a348d3d0f53
2019-05-28 21:07:12 -07:00
Kevin Rocard
64a35d0d16 Audio: Document channel order convention
This patch restores the documentation on the channel order convention
that was present in the Audio HAL 2.0 but remove by mistake in 4.0.

This is a vendor feedback.

Test: mm
Bug: 133453897
Change-Id: I8eabd8883612d39ced21481fc44661b0808754bb
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-05-29 00:34:38 +00:00
Nathan Harold
1999cba432 Merge changes I94874f53,I90133555 into qt-dev
am: 1d957da30b

Change-Id: I64ca48b5863d454d9f623845344b081b32050b2f
2019-05-22 14:17:19 -07:00
Nathan Harold
beb15ccb08 Allow impls to ignore incremental scan interval
When incremental results are disabled for network scans,
update the API documentation to allow implementations to
ignore range checking for the incremental scan interval.

Bug: 112486807
Test: compilation - docstring-only change
Merged-In: I901335550b4b8c2cf75f91b39fd031f03ffae982
Change-Id: I901335550b4b8c2cf75f91b39fd031f03ffae982
(cherry picked from commit 944efca78d)
2019-05-22 11:31:33 -07:00
Nathan Harold
944efca78d Allow impls to ignore incremental scan interval
When incremental results are disabled for network scans,
update the API documentation to allow implementations to
ignore range checking for the incremental scan interval.

Bug: 112486807
Test: compilation - docstring-only change
Change-Id: I901335550b4b8c2cf75f91b39fd031f03ffae982
2019-05-22 10:07:11 -07:00
Treehugger Robot
c957851584 Merge "Add INVALID_STATE to list of errors for when there is only one modem available" 2019-05-21 15:27:12 +00:00
Nazanin Bakhshi
1e71c4b93a Merge "Add INVALID_STATE to list of errors for when there is only one modem available" into qt-dev
am: ef4abb83b3

Change-Id: I68db51926d33021bb942c235e8b09847a2c5a935
2019-05-20 21:20:28 -07:00
Nazanin Bakhshi
8aadb38c74 Add INVALID_STATE to list of errors for when there is only one modem
available

Bug: b/132818184
Test: VTS
Change-Id: I2b57ab99a376bcab26012d08f00284d65f915bc3
Merged-In: I2b57ab99a376bcab26012d08f00284d65f915bc3
(cherry picked from commit 52b3503064)
2019-05-20 20:34:38 -07:00
Nazanin Bakhshi
ef4abb83b3 Merge "Add INVALID_STATE to list of errors for when there is only one modem available" into qt-dev 2019-05-21 03:29:51 +00:00
Nazanin Bakhshi
52b3503064 Add INVALID_STATE to list of errors for when there is only one modem
available

Bug: b/132818184
Test: VTS
Change-Id: I2b57ab99a376bcab26012d08f00284d65f915bc3
2019-05-20 14:27:30 -07:00
Shuzhen Wang
9d4b457285 Merge "Camera: Allow out-of-order ZSL shutter notify" into qt-dev
am: e4be4c9765

Change-Id: I112efe45e7dcc7d3bb3dd880d1596cb09534a24e
2019-05-17 14:56:12 -07:00
TreeHugger Robot
e4be4c9765 Merge "Camera: Allow out-of-order ZSL shutter notify" into qt-dev 2019-05-17 21:20:43 +00:00
Lev Proleev
e61b7b98c9 Fix LSTM documentation
The documentation said that cell-to-input weights are required to be
present when input-to-input weights, recurrent-to-input weights and
input gate bias are present. This was incorrect since this weights can
be omitted if peephole connections are not used even if all the other
tensors are present.

Another bug that is fixed in this change is that for output #0 the docs
said "of shape [batch_size, num_units * 4] with CIFG, or [batch_size,
num_units * 3] without CIFG" when in fact it is the opposite, i.e.  "of
shape [batch_size, num_units * 3] with CIFG, or [batch_size, num_units *
4] without CIFG."

Existing CTS/VTS tests expect behaviour described in the fixed documentation.
Existing CPU implementation is also compliant with the fixed documentation.

Fix: 111842951
Test: mma
Change-Id: Id011783e33672ae65dc6fe3784cb26feb832acf9
Merged-In: Id011783e33672ae65dc6fe3784cb26feb832acf9
(cherry picked from commit e0537f09fb)
2019-05-15 14:57:34 +01:00
Anil Admal
de913c6979 Merge "Update @2.0::IGnss.hal setCallback() method documentation" into qt-dev
am: a12498abf8

Change-Id: I16d1c533066cc90c08d0ec8c61b98ccf54bd4a34
2019-05-10 09:11:43 -07:00
Anil Admal
bc5fcc4019 Merge "Clarify when IGnss.hal cleanup() and setCallback() methods are called" into qt-dev
am: 88d9d2570e

Change-Id: I775555a6e8394ca0954ab90fa0e08d50f73ab8cf
2019-05-10 09:05:47 -07:00
Anil Admal
a12498abf8 Merge "Update @2.0::IGnss.hal setCallback() method documentation" into qt-dev 2019-05-10 16:00:07 +00:00
Anil Admal
2f28bb0c19 Clarify when IGnss.hal cleanup() and setCallback() methods are called
Update IGnss.hal cleanup() and setCallback() method documentation to
clarify when the framework calls these methods so that the GNSS engine
knows when to shut down for power savings.

This CL updates @1.1::IGnss.hal and @1.0::IGnss.hal interfaces only.
@2.0::IGnss.hal is updated in another CL.

Bug: 124104175
Test: Existing tests pass
Change-Id: I8181251677dab78ce0619fa1e2a667b36e115f25
2019-05-09 16:32:06 -07:00
Anil Admal
a3afa5c65c Update @2.0::IGnss.hal setCallback() method documentation
The IGnss.hal setCallback() and cleanup() methods need to be updated
to clarify when the framework calls them so that that the GNSS engine
knows when to shut down for power savings.

This CL updates the @2.0::IGnss.hal setCallback() method documenation
only. The @1.1::IGnss.hal and @1.0::IGnss.hal setCallback() and cleanup()
method documentation is updated in another CL.

Bug: 124104175
Test: Existing tests pass
Change-Id: I6a2dd6f82becc0adef8b4b56fe83e7c004aefd7a
2019-05-09 15:58:00 -07:00
Lev Proleev
9201bd34ca Merge "Fix LSTM documentation" into qt-dev
am: 881e261f0e

Change-Id: Iaae38e885aa2f60d9d39030b2db06e7039cc0872
2019-05-08 13:49:14 -07:00
TreeHugger Robot
881e261f0e Merge "Fix LSTM documentation" into qt-dev 2019-05-08 20:17:28 +00:00
Jeff Tinker
97bf88fea2 Merge "Add status for license starting in the future" into qt-dev
am: a51399ef5f

Change-Id: I2178215a3cbb44a830690081f008c3053282fe65
2019-05-08 10:49:33 -07:00
Lev Proleev
e0537f09fb Fix LSTM documentation
The documentation said that cell-to-input weights are required to be
present when input-to-input weights, recurrent-to-input weights and
input gate bias are present. This was incorrect since this weights can
be omitted if peephole connections are not used even if all the other
tensors are present.

Another bug that is fixed in this change is that for output #0 the docs
said "of shape [batch_size, num_units * 4] with CIFG, or [batch_size,
num_units * 3] without CIFG" when in fact it is the opposite, i.e.  "of
shape [batch_size, num_units * 3] with CIFG, or [batch_size, num_units *
4] without CIFG."

Existing CTS/VTS tests expect behaviour described in the fixed documentation.
Existing CPU implementation is also compliant with the fixed documentation.

Fix: 111842951
Test: mma
Change-Id: Id011783e33672ae65dc6fe3784cb26feb832acf9
2019-05-08 17:28:53 +01:00
Slava Shklyaev
cc0b0d4509 Document that quantized PAD behavior is undefined before NNAPI 1.2
We had no tests for quantized PAD in NNAPI 1.1 and think that vendors might have implemented different behaviors.

Bug: 122243484
Test: N/A
Change-Id: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
Merged-In: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
(cherry picked from commit b01ce9644e)
2019-05-08 15:34:41 +01:00
Miao Wang
9bfecb5591 Fix the order of width and height for NNAPI RESIZE_BILINEAR and
RESIZE_NEAREST_NEIGHBOR

  - The CPU implementation always had the order of {width, height}.
  - In P, the documentation was incorrectly changed to {height, width}.

Bug: 131623949
Bug: 130035110
Test: mm
Change-Id: I6c79459fa73347fb51fc34a76ad78d5ac207f210
Merged-In: I6c79459fa73347fb51fc34a76ad78d5ac207f210
(cherry picked from commit 286339b4c8)
2019-05-08 15:33:55 +01:00
Robert Shih
31703179a5 Add status for license starting in the future
Bug:116738851
Test: vts-tradefed run commandAndExit -m VtsHalDrmV1_2Target
Change-Id: Id5017e3ffa1fcf5aaad1815b59a425ac63f2e53e
2019-05-08 00:52:01 +00:00
Slava Shklyaev
bb840a986a Merge "Document that quantized PAD behavior is undefined before NNAPI 1.2" into qt-dev
am: 7af01ada85

Change-Id: Ie720d5e1010d5dfc40f7b05c212fa1e56a028a96
2019-05-02 03:31:09 -07:00
Slava Shklyaev
b01ce9644e Document that quantized PAD behavior is undefined before NNAPI 1.2
We had no tests for quantized PAD in NNAPI 1.1 and think that vendors might have implemented different behaviors.

Bug: 122243484
Test: N/A
Change-Id: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
2019-04-30 15:27:53 +01:00
Miao Wang
0221549cfb Merge "Fix the order of width and height for NNAPI RESIZE_BILINEAR and RESIZE_NEAREST_NEIGHBOR" into qt-dev
am: e867be8b40

Change-Id: Ic98819efbddfba1be56fd4202806470aabdc29cf
2019-04-29 23:07:35 -07:00
Steven Moreland
a58718951a soundtrigger: remove '/*' in comment. am: 48f0efb302
am: 0ce1e109dd

Change-Id: If990c96c2f895c58fb13777daca170388abdd574
2019-04-29 17:18:43 -07:00