History log of /frameworks/ml/nn/common/include/HalInterfaces.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1e9666208595bc251a8958155b1e41eca90b69db 12-Apr-2018 Michael Butler <butlermichael@google.com> NNAPI: Add execution preference to prepareModel (runtime)

A model can be compiled 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: I93079b18224ea10cb0a23bfbdc1ed80e302071a8
/frameworks/ml/nn/common/include/HalInterfaces.h
47b5916d2c4c5d0e0d4f6b43075a23449c16345b 23-Feb-2018 David Gross <dgross@google.com> 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: I157641995e239777a0d3e56af1cf090e7309f35f
/frameworks/ml/nn/common/include/HalInterfaces.h
75886e77f9ca074173a49283b5c0a8c182d98977 23-Jan-2018 Michael Butler <butlermichael@google.com> Upgrade NeuralNetworks v1.0 to v1.1.

For Android P, the NNAPI is getting new operations. To support this
change, the NN runtime needs to handle both v1.0 and v1.1. This change
brings the NN runtime up to v1.1 and adds a VersionedIDevice class which
manages both v1.0 and v1.1 calls.

Test: mm
Test: cts and vts test binaries
Change-Id: Iaec1dcfe00c1712a0ac89954ae142d4ea126989d
/frameworks/ml/nn/common/include/HalInterfaces.h
033b8a6ce8ebd2a01ecccc6bae96d0fff8d4964e 23-Sep-2017 Michael Butler <butlermichael@google.com> NNAPI Runtime: 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: I5cd2734a9fc1377546d55a12955445b6ccdd47b3
/frameworks/ml/nn/common/include/HalInterfaces.h
7d6ac906f000f3afe418e92c0a4ae36b2ea1143e 23-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> 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, incl. vts.

Change-Id: I84433d1e0e5211ac2f77317f3752171d85a5ab04
/frameworks/ml/nn/common/include/HalInterfaces.h
5f916fc9a7ae95f172492bdfe5344c37beff3a6f 12-Sep-2017 Michael Butler <butlermichael@google.com> Neuralnetworks HAL cleanup -- frameworks/ml/nn

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

It makes the corresponding changes to the runtime.

Bug: 63905942
Test: mm, frameworks/ml/nn/runtime/test
Change-Id: I1545373dfa30780aaf9b61b3938be536cf122e74
/frameworks/ml/nn/common/include/HalInterfaces.h
a4e2ee81d015b5e26897d18b18dd50044faba62f 10-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> 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 and test.py

Change-Id: I8ce007c439ccc99b1e04cce412ba6c93453c7a02
/frameworks/ml/nn/common/include/HalInterfaces.h
55cef2193279a646292fdeb355399627dd8990c8 09-Sep-2017 Miao Wang <miaowang@google.com> Explicitly add "_2D" to applicable ops, and add fused activation
function enum.

- Add the fused activation enum to explicitly set the expectation that
only the included ones are supported for fused ops.
- Add "_2D" to CONV, DEPTHWISE_CONV, AVG_POOL, MAX_POOL, and L2_POOL,
since they are only supposed to do 2D computation.
- Updated the tests and the stack to plumbing the changes through.

Bug: 63905942
Test: mm
Test: NeuralNetworksTests pass for both CPU path and sample hidl driver.
Change-Id: I60aeabab1d193d26d938c0d1d3ffdd519740d222
/frameworks/ml/nn/common/include/HalInterfaces.h
a0002c726a8f41886469e2d83af918472b3a5bbc 07-Sep-2017 Miao Wang <miaowang@google.com> Increment HAL_NUM_OPERAND_TYPES to 12 after adding TENSOR_INT32.

- Fixes the quantized tests failures.

Bug: 63905942
Test: mm
Test: all unit test pass for both CPU and sample driver.
Change-Id: I9b0dd25cf3abc44f6cef3742f04e8957b30100bb
/frameworks/ml/nn/common/include/HalInterfaces.h
689d892203c06c66c7bb2e374462a8434e40b75f 01-Sep-2017 Michael Butler <butlermichael@google.com> NNAPI Concurrent Query Management -- Implementation

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.

The design document for NN API asynchronous behavior:
https://docs.google.com/a/google.com/document/d/1mO35KK3Mnr489ZftTDnKXXnXiYxk19jZ1C4DWOqaVB4/edit?usp=sharing

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: I97b1d4cbf189176fb3b21b2cc1af09dddaff18ab
/frameworks/ml/nn/common/include/HalInterfaces.h
a67d8a0e28baef2fab57a2a3255461869abed74d 30-Aug-2017 Miao Wang <miaowang@google.com> Add OEM_OPERATION enum.

Bug: 63905942
Test: mm
Test: All unit tests passing on sailfish
Change-Id: I391ca039620be6525d95ad581acdb6e11d091af2
/frameworks/ml/nn/common/include/HalInterfaces.h
15b59e721efe1a75b0e8cde8bd44bbb532446e13 12-Aug-2017 Yang Ni <yangni@google.com> Implement EMBEDDING_LOOKUP and HASHTABLE_LOOKUP

Bug: 63905942

Adapted previous TF Lite implementation and unit tests for NN API on
CPU.

Test: adb shell /data/nativetest64/embedding_lookup_test/embedding_lookup_test
Test: adb shell /data/nativetest64/hashtable_lookup_test/hashtable_lookup_test

Change-Id: I6e4a9d8c5d0d47e66e3fa771967da3526d19ac4b
/frameworks/ml/nn/common/include/HalInterfaces.h
8b99bb1d98a42b67ba1c00e12c7abb3708cf7c05 21-Aug-2017 Jean-Luc Brouillet <jeanluc@google.com> Add full support for Memory pools.

Weights can now be passed via memory pools.

Test: Compiled and ran the unit test.
Bug: 63905942
Change-Id: I997a10f6102dcae7c6876c96a4f6f913eaf54c74
/frameworks/ml/nn/common/include/HalInterfaces.h
27e9be3904b034e422ee9b6ab70b35ea994d2b39 03-Aug-2017 Miao Wang <miaowang@google.com> Initial implementation of the following quantized ops.

- CONV_QUANT8
- DEPTHWISE_CONV_QUANT8
- AVERAGE_POOL_QUANT8
- MAX_POOL_QUANT8
- LOGISTIC_QUANT8

Additionally, added functions to plumb through quantization
parameters.

Bug: 63905942
Test: mm
Test: end-to-end MobileNet quantized test pass

Change-Id: Ib2753c68bf2c51467ae1c158b45541bcfdf10789
/frameworks/ml/nn/common/include/HalInterfaces.h
707dbd2d55f5dacf78ffb3ad7c8b3f37c2e9d758 25-Jul-2017 Jean-Luc Brouillet <jeanluc@google.com> Pass the model as an HIDL component.

Major rework where instead of serializing the model and
passing it in a shared memory, we pass it via HIDL.

The runtime/test code does two run, one goes through the
default CPU path, the other through any available driver.

Note: The code in hardware/../sample was written by Michael Buttler.

Bug: 63905942
Test: Runs both the CPU path and through the sample driver.
Change-Id: Ie3ee975d33056ba299895b13193f4698a690dd04
/frameworks/ml/nn/common/include/HalInterfaces.h