History log of /frameworks/ml/nn/runtime/include/NeuralNetworks.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1af33897ebdc15c41c94f93535df8904065d211b 14-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add documentation for PaddingCode in NeuralNetworks.h Bug: 67331808 Test: ran NeuralNetworksTest on marlin" into oc-mr1-dev
d1da6261af7d54c5f8343a18479ab77fe2449f8a 11-Oct-2017 gfan <gfan@google.com> Add documentation for PaddingCode in NeuralNetworks.h
Bug: 67331808
Test: ran NeuralNetworksTest on marlin

Change-Id: I4b879f8a67bc366bffb12601dba7f021659a6921
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
1da8fed77c5c296afa18f754ec3616e7f02a4cfd 12-Oct-2017 Jean-Luc Brouillet <jeanluc@google.com> Pass large model operand values in shared memory.

Because of a limitation in HIDL, large tensor values (e.g. weights)
need to pass in shared memory rather than as HIDL arguments. This
prevented large models from running on a driver.

Separated the handling of memory pools so that request and model
pools are not comingled.

Also improve logging so we see more details about the models when
logging.

Bug: 67603060
Test: Ran system tests and VTS tests.

Change-Id: I760e31275699f9306c4b21945935dc3a4ca68754
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
3a9b7c8eb10692fc746a954bfbc4b53b774d267b 10-Oct-2017 Yang Ni <yangni@google.com> Made embedding lookup take int lookups

Bug: 67459279

NN API only supported float tensors when this op was first added.
Now int tensors are allowed in the API and we have updated the
documentation saying the lookup indices are integers, we need
update the implementaion and tests of this op to match the
documentation.

Also reverted the input order to match TF Lite.

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

Change-Id: Ie0db884ca772e8fb388876c3cef609016e753bf1
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
a86baa03c7756a3a3cd9207ef38a23025dd27ad4 10-Oct-2017 Gerry Fan <gfan@google.com> Merge "Minor clarification for NeuralNetworks.h for EMBEDDING_LOOKUP and HASHTABLE_LOOKUP Bug: 67459279 Test: locally run cts NeuralNetworksTests on marlin" into oc-mr1-dev
a6ec3b4ac8a993214406235cfabc71f9c10b29b4 05-Oct-2017 gfan <gfan@google.com> Minor clarification for NeuralNetworks.h for EMBEDDING_LOOKUP and HASHTABLE_LOOKUP
Bug: 67459279
Test: locally run cts NeuralNetworksTests on marlin

Change-Id: Ib0bc48b3d0a2403820989d8c7d517081f5a9b647
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
3a664717ca18db7941130e16538f75e10513a41d 09-Oct-2017 Miao Wang <miaowang@google.com> Fix RESIZE_BILINEAR documenation.

Bug: 67503562
Test: none needed
Change-Id: Ib59ce8d8dbe814b835c400081a286a0514b5f1be
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
7faa4d8a5301bc64e89a0228037a373bc21259c5 05-Oct-2017 Gerry Fan <gfan@google.com> Merge "Fix test spec in depthwise_conv_2d and depthwise_conv_2d_quant8 Bug: 67381597 Test: locally run cts NeuralNetworksTests on marlin" into oc-mr1-dev
c96b526122230f552e5bbb96d4bd0497f50c5c91 05-Oct-2017 gfan <gfan@google.com> Fix test spec in depthwise_conv_2d and depthwise_conv_2d_quant8
Bug: 67381597
Test: locally run cts NeuralNetworksTests on marlin

Change-Id: Iba23f8d024e87d563b0020b6c02e30b2e65
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
66d5cb6e3a90aefc8d545f6369080ab88de9d667 05-Oct-2017 Jean-Luc Brouillet <jeanluc@google.com> Rename setInputsAndOutputs

To avoid confusion with other set* functions, rename setInputsAndOutputs
to identifyInputsAndOutputs.

Also added a few new generated tests when I reran generate_test.sh.

Bug: 63905942
Test: local & VTS tests
Change-Id: Ie947044bee1a97426c847b9d66e60f0c25395bbc
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
a5e146a1efaf31028e2eeef53dd3264fd6d95563 05-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Change stateful Ops to stateless ones" into oc-mr1-dev
35d33fbbbda5d379d26a1d414a8e3e016e026938 05-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Fix a typo in documentation to FULLY_CONNECTED"" into oc-mr1-dev
ce38590c9b8e3f8b90c283472b54b47ad7a1f2b9 04-Oct-2017 Yang Ni <yangni@google.com> Revert "Fix a typo in documentation to FULLY_CONNECTED"

Bug: 63905942

The apostrophe to the matrix indicates a transpose.

This reverts commit 76354c87e4c1aad5da714828a633fe37404920a8.

Change-Id: I8e84a2e39e826c8bfe25366cc6d8d1fd64252b4f
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
eefb1e60444afd08a4350e11f281ac7064ebba63 04-Oct-2017 Yang Ni <yangni@google.com> Change stateful Ops to stateless ones

Bug: 63905942

Updated Ops RNN, LSTM, and SVDF.
Split outputs used for states into inputs and outputs.

Test: NeuralNetworksTest
Change-Id: Ia3d11f640cba4cab1b94d0b9746c46d347c024a4
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
2a2b3842abe8bad7cde8a1c1ef5645291fd587b5 04-Oct-2017 Miao Wang <miaowang@google.com> Fix documentation of CONCATENATION.

Bug: 67185615
Test: none needed
Change-Id: I7100a0f67a80d83c47346d420c97ac83ff31613b
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
a3bed7887a65e0662080d2630e228954ca578ca3 04-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix problem passing null optional operands." into oc-mr1-dev
76354c87e4c1aad5da714828a633fe37404920a8 03-Oct-2017 Yang Ni <yangni@google.com> Fix a typo in documentation to FULLY_CONNECTED

Bug: 63905942

Test: none. Not a code change.

Change-Id: I5e03e63a6599355ba970330ca1ad744e6999f695
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
62cc2758c1c2d303861e209f26bddcf4d7564b73 28-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Fix problem passing null optional operands.

Allow optional operands to be specified in the model as having no value.
Modify the HAL to allow passing missing operands. Change the validation
of most operations to verify that none of their operands are missing.

Bug: 63905942
Test: Compiled and ran runtime/test.
Change-Id: I378bc51847a8fb30cb2d36c9bf707ebadc79289b
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
35647da7af1f99b6abb48c4eeaec042ea9edfb4d 03-Oct-2017 Miao Wang <miaowang@google.com> Fix documentation of FULLY_CONNECTED, and add checks for input rank.

Bug: 67319070
Bug: 63905942

Test: mm
Test: NeuralNetworksTests pass
Change-Id: Ia19c643598c48682b65d4de984fb22d9c3bb05f9
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
93e086fbc0f1577eabdffd0d3420589f2788bd95 02-Oct-2017 Miao Wang <miaowang@google.com> Remove activation parameter from CONCATENATION

Bug: 67185615
Test: mm
Change-Id: I3555259305761691ea65d2fff406d7fcd8ee8eb5
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
8e86dabb2a154ba15f519138be46bffc0d30b20c 30-Sep-2017 Yang Ni <yangni@google.com> Merge "Updated data type for keys in Hashtable Lookup" into oc-mr1-dev
850d1eb131d62b07438ff5869bdb80e09fada766 30-Sep-2017 Miao Wang <miaowang@google.com> Allow implicit padding

- Upadte the documentation to support implicit padding.
- Removed error logging for implicit padding input.

Bug: 63905942
Test: mm
Test: NeuralNetworksTest pass
Change-Id: I5149433ccb393ed390ad9e24013249ef37c6aba8
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
7da2c9a54b25fd15546d6f99eba06dff1ac9a862 29-Sep-2017 Yang Ni <yangni@google.com> Updated data type for keys in Hashtable Lookup

Bug: 63905942

This OP was initially added when the NN API only allowed floating-
point tensors.

Now since integer tensors are allowed in NN API, update the Hashtable
Lookup with the better suited data types.

Test: NeuralNetworksTest
Change-Id: I3dafb2f60bd428700a5a6de393b86dbd75f285dd
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
25f0f2dcd7049cd9f8a60133697dff114bbbf00e 28-Sep-2017 Miao Wang <miaowang@google.com> Allow ADD and MUL taking quantized input.

- Implement the quant8 path for ADD and MUL.
- Add tests for quant8 ADD and MUL, both normal and broadcast version.
- Add validation for quantization parameters, forcing scale >= 0 and
zeroPoint in range [0, 255] for QUANT8_ASYMM type operands.

Bug: 63905942
Test: mm
Test: NeuralNetworksTest pass
Change-Id: Ib643217737af9624a079369e0aea792025223fbb
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
c7e8396248b9f42a5cec48b4e7c1c03f3ba081b4 28-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix documentation for CONV_2D, DEPTHWISE_CONV_2D, FULLY_CONNECTED." into oc-mr1-dev
c6973dfadcfef42729c5e379b149bc332715819f 28-Sep-2017 Miao Wang <miaowang@google.com> Fix documentation for CONV_2D, DEPTHWISE_CONV_2D, FULLY_CONNECTED.

Bug: 63905942
Test: mm
Change-Id: I9d5d47691c0f233d617a1bd4b2dde804a95de343
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
ef22aa5727b96e9a0863ef71cfbe3dbdac339408 16-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Create mutiple sample test drivers

Create multiple sample test drivers to better test partitioning.

Bug: 63905942
Test: Compiled, ran runtimte/tests and VTS tests.

Change-Id: I037aeb82a849592f3a931bcdc558f32010aa1146
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
45bf79e5b9fee354fde7c1f64417d9ca4a1da7da 25-Sep-2017 Miao Wang <miaowang@google.com> Clarify the expectation of scale and zeroPoint for affected ops.

- Remove the OperandType constructor taking f_min and f_max as
quantization parameters as it causes confusions for ops like
LOGISTIC and SOFTMAX.
- Update the documenation to clearly state the expected scale and
zeroPoint for LOGISTIC, SOFTMAX and CONCATENATION.
- Update the tests to directly input scale and zeroPoint.

Bug: 63905942
Test: mm
Test: NeuralNetworksTest pass
Change-Id: Ia450d6ce9509205d22e6383bd7e454afa0568cbb
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
3309c4645147c763b3437f7d9d69a8725dc7cd38 24-Sep-2017 Miao Wang <miaowang@google.com> Fix documentation to use zeroPoint instead of offset or zero_value

Bug: 63905942
Test: mm
Change-Id: I29350d80b7fff597601837870cded41788037cf3
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
874d039215516aebdaba2e242609199897fe80c0 23-Sep-2017 Miao Wang <miaowang@google.com> Fix sigmoid and softmax tests and implementation.

- CPU executor now checks both the scale and offset for the
output Shape.
- The golden references and output range for the tests are updated.

Bug: 63905942
Test: mm
Test: NeuralNetworksTest pass
Change-Id: I9e892ae0de8ea17298dbb7edb96036e1d30c84fb
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
6dd108cb66fa0f79d416428fccd5bc74c4360f1a 22-Sep-2017 Quddus Chong <quddusc@google.com> Fixed small typos in header comments.

Test: none

Bug: 63905942
Change-Id: I879ec3cb5a7b4d62851e286997cdce6dac6924b1
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
dec08deb44c829eca478214972170606323b66cf 18-Sep-2017 Miao Wang <miaowang@google.com> Fix documentation of depthwise convolution

Bug: 63905942
Test: mm
Change-Id: Ied08b698b1c10e4fc0f31445ae50a22c9e3dc8f5
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
67573d1086d40fb50e6fe1dbcb84be43d9f05ac2 16-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix RNN documentation" into oc-mr1-dev
80e4de129633e61d116ddef412beb7e4db93106d 15-Sep-2017 Yang Ni <yangni@google.com> Fix RNN documentation

Bug: 63905942

The last two inputs were in the wrong order for the RNN operator.

Test: ran NeuralNetworksTest on marlin

Change-Id: I3e045eddb40409f4beb9f21d266c84d18c5406cb
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
fbc04728deedbbf1a119460f5d3c950328b1aeae 14-Sep-2017 Quddus Chong <quddusc@google.com> Clean up docs.

Replace these references:
1) ANeuralNetworksExecution_wait
with:
ANeuralNetworksEvent_wait

2) ANeuralNetworksExecution_start
with:
ANeuralNetworksExecution_startCompute

3) ANeuralNetworksRequest_free
with:
ANeuralNetworksExecution_free

Test: none

Bug: 63905942

Change-Id: Ic8f0631f6e8be894c49d18448538583225a0ddec
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
39dcb0f2cc87b0eba06b314a91d55e50efea5abe 14-Sep-2017 David Gross <dgross@google.com> Merge changes I5922f13a,I7194e277 into oc-mr1-dev

* changes:
Bring back Event, and wait on Event rather than on Execution.
Make Compilation API synchronous.
425b2594c76e934dfdbc93209253e3c189571149 14-Sep-2017 David Gross <dgross@google.com> Bring back Event, and wait on Event rather than on Execution.

This is at the recommendation of the API council.

This undoes change I50b8e155d9589210e14920237878a4f295e7755f

Bug: 63905942
Test: nn/runtime/test

Change-Id: I5922f13ae7070f7ec0af035557a9921c88ca9221
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
65aa556323f4a054f80a75b6c4c721b2a7ed3298 14-Sep-2017 David Gross <dgross@google.com> Make Compilation API synchronous.

Per advice from the API council, the Compilation API no longer exposes
asynchronous behavior to the user -- rather than start() and wait()
APIs, we now have a finish() API.

Also:
- Track whether or not Compilation::finish() has been invoked, for
the sake of API usage checking.
- Changed Model::finish() to return Result not int, for consistency.
- Made Model and Compilation documentation more similar to one another.
- Fixed typos in documentation.

NOTE: It's possible to implement compilation asynchronously behind the
synchronous API -- e.g., Compilation_finish() starts compilation
asynchronously, and we implicitly wait for it to complete at the point of
Request_startCompute(). However, this would defeat one of the purposes of
an explicit Compilation API -- giving the application control over when
to spend the time compiling, to keep it off a critical timing path, such
as repeatedly applying a model to a sequence of frames in real time.

Bug: 63905942
Test: nn/runtime/tests
Change-Id: I7194e277aa6211af66794d917dcc5254c7d81af4
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
a5c16e4e73a34e6776a8f071ab884444c28b6893 14-Sep-2017 Miao Wang <miaowang@google.com> Rename ANeuralNetworksOperandType.offset to zeroPoint

Bug: 63905942
Test: NeuralNetworksTest
Change-Id: I15464657dc4eed9adbfc444df306cd0062993be3
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
7612f29b31f97f3b15769264131566b36dea9a25 12-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Remove the initialization and shutdown APIs.

Initialize the list of drivers as needed rather than
requiring an API call. This initialization will be
triggered when compiling the first model.

Bug: 63905942
Test: Compiled and ran the unit tests.

Change-Id: I1893a9f9d96d9d241916de3a7dd3cb7a54e33b06
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
d2d0c031c43e8e5aafc75e8a652d79bcc2aaca99 12-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Update documentation. Remove IntList.

As NDK council request, updated some documentation and removed
IntList. Other issues will be addressed in other CLs.

Bug: 63905942
Test: Compiled and ran the unit tests.

Change-Id: Iff6898737696daa6bbf41643b07d0a4508af4c0d
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
66d56404cdfab9ab8aa79d4bda83be3832a3aff9 14-Sep-2017 Miao Wang <miaowang@google.com> Make the enums pass as int32_t, and make offset and length size_t.

- Also removes fp16 perf and bootup time info.

Bug: 63905942
Test: NeuralNetworksTest
Change-Id: I1f722fed06a4227eb5f204eb51f7728fe749f5ec
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
01df5047f2661fd8428d5fc966bc3b7984ec1857 14-Sep-2017 David Gross <dgross@google.com> Merge "Rename Request to Execution at the API level." into oc-mr1-dev
5e7827e7bdc7ee6b6fc9b1989070c98fa10e9797 13-Sep-2017 David Gross <dgross@google.com> 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: Ia9262ec727f93dfe1b0ccade4ed76347c55ba163
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
3ced3cfd5b8f22b632c35f24e585c4847383b195 13-Sep-2017 David Gross <dgross@google.com> Rename Request to Execution at the API level.

There's a separate notion of Request at the HIDL level;
this is not renamed.

Bug: 63905942
Test: nn/runtime/tests

Change-Id: I671e3b387d735a9091dc5a2d14afbea6b45f444c
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
05292dc440641a38fab6a07c1372ce6780816c1c 13-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update ANeuralNetworksMemory related API" into oc-mr1-dev
aca6ab57e0e07367724934dd372e0bf4e8bc6b3c 13-Sep-2017 Michael Butler <butlermichael@google.com> Merge "Neuralnetworks HAL cleanup -- frameworks/ml/nn" into oc-mr1-dev
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/runtime/include/NeuralNetworks.h
42dc6a6cd68877cd85e3bc475b41bda0fd946c41 13-Sep-2017 Miao Wang <miaowang@google.com> Update ANeuralNetworksMemory related API

- Remove ANeuralNetworksMemory_createShared.
- Remove ANeuralNetworksMemory_getPointer.
- Allow a offset specified for
ANeuralNetworksMemory_createFromFd.
- Update the tests.

Bug: 63905942
Test: mm
Test: updated NeuralNetworksTests pass.
Change-Id: I1fd7362ec379f5f855c71c6758e0b647be9aaa76
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
b5474e8bbbf5bca2cf93d6c2bda1b56981428bad 13-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Documentation on speech/text OPs" into oc-mr1-dev
0408f166b02c866f141034615370f503b428c71a 11-Sep-2017 Yang Ni <yangni@google.com> Documentation on speech/text OPs

Bug: 63905942

Operations documented in this CL include:
Embedding Lookup;
Hashtable Lookup;
LSH Projection;
LSTM;
RNN;
SVDF.

Test: mm

Change-Id: I312a5164f63f5f646d7baddb3870e230e008b28a
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
4ffc65b9cb9c9d04c694f0948117554526a46b17 12-Sep-2017 David Gross <dgross@google.com> Remove Event and wait on Request instead.

Bug: 63905942
Test: nn/runtime/tests
Change-Id: I50b8e155d9589210e14920237878a4f295e7755f
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
133ad4f3efd94aefc47d137e12b16e0b41cd6c4a 11-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Cleaned up the documentation.

- Fixed many formatting issues that would give Doxygen trouble.
- Corrected information on multithreading.
- Corrected misc. errors.
- Removed remaining TODOs.

Bug: 63905942
Test: Compiled & ran the unit tests.

Change-Id: I9c3f62b27fec372ee17d99323a129cbb9c3acbe1
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
d756f33874dccaedd99eef78942eaf4ae2389ed9 12-Sep-2017 David Gross <dgross@google.com> Merge "More discipline for models and requests." into oc-mr1-dev
7c9cca3ae67378313c586e010f32fb29e648da95 12-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add documentation for ops" into oc-mr1-dev
544739620cd7f37d40524d2407c92042e485c73f 11-Sep-2017 David Gross <dgross@google.com> More discipline for models and requests.

- Must explicitly call new finish() API on model before compiling
or freeing.

- Must not modify a request once start() has been called on it.

Bug: 63905942
Test: nn/runtime/tests, nn/common/operations tests
Change-Id: Ifc6e614bda647d729e8702023a02613e629ca6a0
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
85e34644847dfc0c210520a21217aeb6269f3d3d 10-Sep-2017 Miao Wang <miaowang@google.com> Add documentation for ops

This CL adds/updates documentation for the following ops:
ADD
AVERAGE_POOL
CONCATENATION
CONV_2D
DEPTHWISE_CONV_2D
DEPTH_TO_SPACE
DEQUANTIZE
FLOOR
FULLY_CONNECTED
L2_NORMALIZATION
L2_POOL_2D
LOCAL_RESPONSE_NORMALIZATION
LOGISTIC
MAX_POOL_2D
MUL
RELU
RELU1
RELU6
RESHAPE
RESIZE_BILINEAR
SOFTMAX
SPACE_TO_DEPTH
TANH

Bug: 63905942
Test: mm

Change-Id: I23818067bebd1c510ed08b9ac466b7cfb28de039
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
83e24dc4706a5b7089881a55daf05b3924fab3b7 10-Sep-2017 David Gross <dgross@google.com> Add compilation APIs.

For now, compilation is implemented as a synchronous no-op.

Bug: 63905942
Test: nn/runtime/tests, nn/common/operations tests

Change-Id: I1cb96a7e800671d0c70c9cc1b7eab6f8244232cb
/frameworks/ml/nn/runtime/include/NeuralNetworks.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/runtime/include/NeuralNetworks.h
fce2d202e5dd6f4b2193d84d8726ff4ba86e2fc8 09-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add support for mmaped file descriptor" into oc-mr1-dev
105807d963d969197fe78185ed588bfad3dc0ea5 05-Sep-2017 Miao Wang <miaowang@google.com> Add support for mmaped file descriptor

- create new API to create ANeuralNetworks_Memory from a mmaped fd.
- add the corresponding Memory constructor to NeuralNetworksWrapper.h
- Add unit test TestFd for the new API.

Bug: 63905942
Test: mm
Test: TestFd pass with CPU path.
Test: TestFd pass on sample HIDL driver, with ag/2588539

Change-Id: I1fcb0f0bd01e58bd592e18eff11c27034ee4a4c3
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
cc7f99f85cf9ee7df37e22ed5c957c76713b227d 07-Sep-2017 David Gross <dgross@google.com> Remove stray uses of "shared" from comments.

Bug: 63905942
Test: mm
Change-Id: I1e56bc8b95566c849b80982fa8a7c7ae95030d04
/frameworks/ml/nn/runtime/include/NeuralNetworks.h
04244491820e2e3c3bbe228948aee7baa11b65bd 04-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Improvements to the Memory code." into oc-mr1-dev
2150f1d186b2854fb5aa609594be12a667f845f0 01-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Improvements to the Memory code.

Addresses the comments of a previous CL that arrived after
submission. Change_Id of that CL was I997a10f6102dcae7c6876c96a4f6f913eaf54c74.

- Improved documentation.
- getPointer is now getPointerAndSize. It returns a status code, as
not all Memory will be able to return a pointer.

Test: Compiled and ran the unit test.
Bug: 63905942
Change-Id: I8aade863212dd7e95856d7c3d583c1b5f00eda48
/frameworks/ml/nn/runtime/include/NeuralNetworks.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/runtime/include/NeuralNetworks.h
c1ab6fc5e953a61811e9f25d2afff06bfa571f0e 01-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Cleanup the constants in NeuralNetworks.h

- Alphabetize the operations.
- Move the constants that count operation and types
out of the public header file.
- Remove N_GRAM operation.
- Add TENSOR_INT32.
- Add static assert verifications.
- Add documentation.

Test: Compiled and ran the tests.
Bug: 63905942

Change-Id: Ifafdcb3fd00efabd2b1972b035cc5d43f7dbec51
/frameworks/ml/nn/runtime/include/NeuralNetworks.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/runtime/include/NeuralNetworks.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/runtime/include/NeuralNetworks.h
b8810af67d4efbd966d6788c56cd01c5aa06a71e 30-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add full support for Memory pools." into oc-mr1-dev
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/runtime/include/NeuralNetworks.h
ca0ae89800ff957f76345c94eeb06d8c5643974b 29-Aug-2017 Jean-Luc Brouillet <jeanluc@google.com> Remove baseline models

Also remove submodels, which were to be used with baseline models.

Bug: 63905942
Test: Compiled and ran the tests on Marlin.
Change-Id: I54495e4e0dfbd6dabf049c8bdc2997600451b047
/frameworks/ml/nn/runtime/include/NeuralNetworks.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/runtime/include/NeuralNetworks.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/runtime/include/NeuralNetworks.h
96775128e3bcfdc5be51b62edc50309c83861fe8 12-Jul-2017 Jean-Luc Brouillet <jeanluc@google.com> First implementation of the Neural Networks API.

This first version can run a simple query on the CPU either
via the fallback path or through a simulated driver.

This code has many deficiencies: single threaded, not all
validation are done, not going through HIDL, and not
enough unit tests. Expect more changes!

Test: Compiled and ran the unit tests

Change-Id: I9f6a485a2e7207aeb5f91a2904dcb4b7fd8a6f65
/frameworks/ml/nn/runtime/include/NeuralNetworks.h