History log of /frameworks/ml/nn/common/CpuExecutor.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
877baf0d0b19e97bfc9a55c90c2d61df7ffb6025 04-Jun-2018 Mika Raento <mikie@google.com> Openmp blocktime 1->20ms to keep cores enabled

With 1ms blocktime the benchmark app shows 3x performance degradation on
Pixel 2 in float benchmarks (against no blocktime setting).

In testing, 10ms was enough to give results comparable to no setting.
20ms was chosen as to have a 2x margin of safety while not keeping the
threads busywaiting unnecessarily long.

Bug: 109645291
Test: NeuralNetworksTest_static/*Openmp*
Test: Run benchmark app multiple times
Merged-In: Id2a909f6aefdbe29dd746019c2c9541e31d8c754
(cherry picked from commit fed420cab2704afb2beb69577dbe75392954a57e)

Change-Id: Ie138b11c6713c10489c3aa7e946ac2bf47a3e87b
/frameworks/ml/nn/common/CpuExecutor.cpp
6a2a11dc1edaa61647c35650d7dbdd8893d6ce8b 03-May-2018 Mika Raento <mikie@google.com> Reduce OpenMP thread busywait time (200 to 1 ms)

Reduce the time OpenMP threads used by Eigen busywait for new work after
completing a piece. This is 200ms by default, which meant that we tried
to continuously run 8 threads for 200ms after completing operations
using Eigen - starving both our other work and the rest of the system.

Bug: 79159165
Test: mm
Test: cherry-picked to systrace branch and look at traces
Test: NeuralNetworksTest_static
Change-Id: I3f21aea6d96c785dd7c47493a739b76876420f7d
/frameworks/ml/nn/common/CpuExecutor.cpp
64031fa26110e6d57896bfdbe1cd58e69cde3dbb 11-Apr-2018 Miao Wang <miaowang@google.com> Remove pointer values from the log and hide certain verbose logging
unless building with NN_DEBUGGABLE.

Bug: 77605132
Test: mm
Test: NeuralNetworksTest_static on walleye-eng with "debug.nn.vlog 1"
All tests pass and complete verbose logging are seen in logcat.
Test: NeuralNetworksTest_static on walleye-user with "debug.nn.vlog 1"
All tests pass and *no* pointers showing in NNAPI verbose logging.
Change-Id: Icc7357cded3ec5c197e9a4418d327b10c2ac7178
/frameworks/ml/nn/common/CpuExecutor.cpp
aba8381570d7cc4b5431d741132d6f80519201eb 01-Feb-2018 Michael Butler <butlermichael@google.com> Upgrade NeuralNetworks v1.0 to v1.1 followup CL

This CL addresses some remaining comments from ag/3499102.

Specifically, this CL:
1) Overloads CpuExecutor::run to work with both V1_0::Model and V1_1::Model
2) Documents all VersionedIDevice methods
3) Captures specific variables by reference in lambdas (instead of the general [&])
4) Forward-declares VersionedIDevice instead of including the header.

Bug: 63911257
Test: mm
Test: cts and vts test binaries
Change-Id: I457150346638ea8a2be912046c2bc3c49e95b44e
(cherry picked from commit 8ea26fd92ff697734e5ba690b61f9b0aeda2abf2)
/frameworks/ml/nn/common/CpuExecutor.cpp
b66b5abcef40e88df6ac18ce7890372192102323 02-Apr-2018 Miao Wang <miaowang@google.com> Finalize STRIDED_SLICE

- Add documentation for begin_mask, end_mask, shrink_axis_mask.
- Add support for shrink_axis_mask, and corresponding tests.
- Add validation tests for STRIDED_SLICE.
- Updated existing tests and re-generated CTS and VTS tests.

Bug: 73661082
Test: NeuralNetworksTests_static
Change-Id: I49ad2ffcb3b7496ee1225618833ba324bb01c5b5
/frameworks/ml/nn/common/CpuExecutor.cpp
a9ce0001ca1df32fde3f322c385eef8ce7279329 23-Mar-2018 Miao Wang <miaowang@google.com> Remove unused / unimplemented parameter "crops" for BATCH_TO_SPACE

Bug: 73661175
Test: mm
Test: NeuralNetworksTests
Change-Id: If4b50c50e0847ce36016f6c257aac3b9d418c7b2
/frameworks/ml/nn/common/CpuExecutor.cpp
4d8c48b3cc55c0748ef87a0ba8bbbd3959680213 30-Jan-2018 Miao Wang <miaowang@google.com> Allow CpuExecutor to execute the new ops.

- Add basic tests for all the newly added operations.

Bug: 63911257
Test: mm
Test: NeuralNetworksTest (CTS) including new tests pass
Change-Id: I78124e5d5dac6824da678342a02792439d1c725e
/frameworks/ml/nn/common/CpuExecutor.cpp
4cb4fa2fe863a8f404c0448da160dd5bb4187db4 01-Dec-2017 David Gross <dgross@google.com> "Canonicalize" class RunTimePoolInfo.

This class manages an important resource (an mmap() memory) region.
Rather than treating the class as a bundle of state with methods to
explicitly manipulate that resource, give it the full C++ concrete data
type treatment: Constructors, destructor, and move assignment, with all
data private. Now the lifetime of the managed resource matches the
lifetime of the class instance that manages the resource: The resource
is freed when the instance is destroyed or assigned to.

Test: nn/runtime/test

Bug: 69685100
Bug: 69929024
Change-Id: Ib53a4c70d8db496d69a584d501f0aa6f74ddea99
/frameworks/ml/nn/common/CpuExecutor.cpp
06b5a0a85abe10b618a3a5ed023ac5c74678647e 30-Nov-2017 David Gross <dgross@google.com> Fix RunTimePoolInfo leak of shared memory regions.

SamplePreparedModel and StepExecutor call RunTimePoolInfo::set(), which
calls mmap(), but there is no corresponding call to munmap(). The fix
is to add a new method runTimePoolInfo::release(), and call it from the
appropriate points.

Without this fix, even if we don't run out of virtual address space,
we can still run up against a kernel limit in the number of mapped regions
("/proc/sys/vm/max_map_count").

ALSO: Add a missing check for HIDL transport error (isOk()).

Test: nn/runtime/test

Bug: 69685100
Change-Id: If6ac1396e89cd738738a6ae3397450bd1d80f506
/frameworks/ml/nn/common/CpuExecutor.cpp
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/common/CpuExecutor.cpp
915cca2dab8ee7a05fec2905f11ec3664be49c6e 06-Oct-2017 Yang Ni <yangni@google.com> NEON support for LSTM

Bug: 67716699

Pulled in the latest implementation of tensor utils from TF Lite,
which has enabled NEON for tensor maths.

Test: NeuralNetworksTest

Change-Id: Ic1abbb40c1a8f9c218ea20e58108c6f88e044369
/frameworks/ml/nn/common/CpuExecutor.cpp
bee07f73a5f998a2dd6dc581e7776557c21f9684 09-Oct-2017 Miao Wang <miaowang@google.com> Force CpuExecutor validating user-provided model output operands.

- For operands with OperandLifeTime::MODEL_OUTPUT, the dimensions,
type, and other meta-data must match the output Shape calculated
from the operation preparation step.
- Fix the ill-defined tests caught by the added validation.
- Incidental changes: generated more tests from tests specs.

Bug: 67390841
Test: NeuralNetworksTests pass
Change-Id: I40d35db0f7a868feae773dbf7e12cf4bf5f5e275
/frameworks/ml/nn/common/CpuExecutor.cpp
820215d28bed6c90f696cde0f282445d16da432e 05-Oct-2017 Miao Wang <miaowang@google.com> Allow fine grain verbose logging control through system property.

- Existing DEBUG and INFO change to the new mechanism, existing ERROR and
WARNING unchanged.
- By default, all verbose logging are disabled.
- setprop debug.nn.vlog 1 enables all verbose logging.
- setprop debug.nn.vlog "tag1 tag2 ..." only enable the selected tags.
- Available tags:
all: same as 1.
model: enable logging with tag MODEL.
compilation: enable logging with tag COMPILATION.
execution: enable logging with tag EXECUTION.
cpuexe: enable logging with tag CPUEXE.
manager: enable logging with tag MANAGER.
driver: enable logging with tag DRIVER.

Bug: 63905942
Test: mm
Test: NeuralNetworksTests pass
Test: manually set property to allow individual module to logging
verbosely
Test: tested with debug.nn.partition default -> 0 -> 1 to make
sure getProp still works fine

Change-Id: Iaa0ffa62176dabcdc35058748597df720fd6e47e
/frameworks/ml/nn/common/CpuExecutor.cpp
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/common/CpuExecutor.cpp
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/common/CpuExecutor.cpp
93e086fbc0f1577eabdffd0d3420589f2788bd95 02-Oct-2017 Miao Wang <miaowang@google.com> Remove activation parameter from CONCATENATION

Bug: 67185615
Test: mm
Change-Id: I3555259305761691ea65d2fff406d7fcd8ee8eb5
/frameworks/ml/nn/common/CpuExecutor.cpp
8c689bdfc391e47854ec27bad0f9d685135af253 27-Sep-2017 Yang Ni <yangni@google.com> Add preparation code missed in some OPs

Bug: 63905942

This updates speech model related OPs: Embedding Lookup,
Hashtable Lookup, LSH Projection, LSTM, RNN, and SVDF.

Deduce the shape of an output or intermediate tensor.
Allocate memory if needed (i.e., not set by user).
Validate inputs (dimensions, etc.)

Minor cleanups related to the utility functions shared by these ops.

Also made necessary fixes and implementations as discovered while
doing this.

Test: NeuralNetworksTest

Change-Id: I7c0b789edb4d3565526d58905609d2023c1a5351
/frameworks/ml/nn/common/CpuExecutor.cpp
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/common/CpuExecutor.cpp
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/common/CpuExecutor.cpp
93ea4104cfd9108b67bb0a641cee2b8cbbe01129 25-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove operationTuple." into oc-mr1-dev
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/CpuExecutor.cpp
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/common/CpuExecutor.cpp
feb29cb5007bd968e8850e51fab95ea24eccfd90 18-Sep-2017 Miao Wang <miaowang@google.com> Fix implementation bug in Dequantize

Bug: 65826935
Test: dequantize in CTS test and NeuralNetworkTests pass
Change-Id: I13d32f9f83c22b0ba342b46dfe466bbba4831d98
/frameworks/ml/nn/common/CpuExecutor.cpp
a5c16e4e73a34e6776a8f071ab884444c28b6893 14-Sep-2017 Miao Wang <miaowang@google.com> Rename ANeuralNetworksOperandType.offset to zeroPoint

Bug: 63905942
Test: NeuralNetworksTest
Change-Id: I15464657dc4eed9adbfc444df306cd0062993be3
/frameworks/ml/nn/common/CpuExecutor.cpp
05292dc440641a38fab6a07c1372ce6780816c1c 13-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update ANeuralNetworksMemory related API" into oc-mr1-dev
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/common/CpuExecutor.cpp
33cbb4260ee16456a9c698c87aabb0f048f9cd88 13-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add implicit padding support" into oc-mr1-dev
3cc685b32dee7f28504fb1bec633c3cead137538 12-Sep-2017 Miao Wang <miaowang@google.com> Add implicit padding support

- Transient change, will be removed.

Bug: 63905942
Test: mm
Test: Converting the test with implicit padding pass.
Change-Id: I888bf3daa42ec2394b0fed1522c0aa353f5ddbaa
/frameworks/ml/nn/common/CpuExecutor.cpp
24bb62867d702f8d4ea42ae794a96d7383c510ac 12-Sep-2017 Miao Wang <miaowang@google.com> Fix the bug caused by recent refactor that zeroPoint is not correctly
set.

Bug: 63905942
Test: mm
Test: NeuralNetworksTest pass
Change-Id: Ic5c49e8299c43dca8fe36754dd4c2dea517562d5
/frameworks/ml/nn/common/CpuExecutor.cpp
7c9cca3ae67378313c586e010f32fb29e648da95 12-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add documentation for ops" into oc-mr1-dev
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/common/CpuExecutor.cpp
b17915aedf050e189a6cfbed85529edf3cbdbd74 11-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Making padding explicit, instead of SAME / VALID" into oc-mr1-dev
6cd685f64bd82c003b8d0943fc6b7b8e0730b939 10-Sep-2017 Miao Wang <miaowang@google.com> Making padding explicit, instead of SAME / VALID

- Use explicit padding {padding_left, padding_right, padding_top,
padding_bottom} for applicable ops.
- Updated the corresponding tests.

Bug: 63905942
Test: mm
Test: updated NeuralNetworkTest pass
Change-Id: Ifb8ccf59fbe5766dffe1537aa5357192a7c88a70
/frameworks/ml/nn/common/CpuExecutor.cpp
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/CpuExecutor.cpp
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/CpuExecutor.cpp
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/common/CpuExecutor.cpp
0831219b2763e7906d0f42bd15351a8e05c6f0ab 01-Sep-2017 Yang Ni <yangni@google.com> Move operation files into subdirectory

Bug: 63905942

The convention seems to have all CPU implmentation of OPs in the
subdirectory nn/common/operations.
This CL moves recently added speech/text related OPs to that
directory.

Test: unit tests of all moved ops on marlin

Change-Id: I026aa94c58f6ee4e57e519781ee92d5792106de6
/frameworks/ml/nn/common/CpuExecutor.cpp
f23352521cb0834f33f3802b7b2626db64d0eea3 22-Aug-2017 Miao Wang <miaowang@google.com> Making Add and Mul able to handle broadcast Add/Mul.

Bug: 63905942
Test: mm
Test: BroadcastAddTwo, BroadcastMulTwo
Change-Id: I41460be25ab812069fff31abfbd1f6ab66b7aba2
/frameworks/ml/nn/common/CpuExecutor.cpp
9b8414da39fe772ec9d84c5bc5b101ceef001567 31-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add OEM_OPERATION enum." into oc-mr1-dev
681ee0e3a438d807f34e97bc5a49047d5b7463a0 31-Aug-2017 Yang Ni <yangni@google.com> Merge "Implement LSTM cell on CPU" into oc-mr1-dev
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/CpuExecutor.cpp
8dcf8b31f39001b8463f1512c1c7de568361b963 31-Aug-2017 Yang Ni <yangni@google.com> Merge "Implement SVDF on CPU" into oc-mr1-dev
3c35ae1db59fedf4b4be0ee6e9ac3ce586820d7c 29-Jul-2017 Yang Ni <yangni@google.com> Implement LSTM cell on CPU

Bug: 63905942

Adapted previous TF Lite implementation and unit tests.

Modified the API implmentation to allow input tensor to have a null
buffer pointer to indicate an optional input.

Test: adb shell /data/nativetest64/lstm_test/lstm_test

Change-Id: Iab89fe6c7731dc68c8460f30630174c55e3b24df
/frameworks/ml/nn/common/CpuExecutor.cpp
7a5429d307673470c2ee5940d5a3d8f483b5331e 11-Aug-2017 Yang Ni <yangni@google.com> Implement SVDF on CPU

Bug: 63905942

Adapted previous TF lite implementation and unit test for
implementation of NN API on CPU.

Test: adb shell /data/nativetest64/svdf_test/svdf_test

Change-Id: I86c39c228f1075686fd3e7303f472a3a4b1409ca
/frameworks/ml/nn/common/CpuExecutor.cpp
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/CpuExecutor.cpp
f1817c663af4f22bc089ef82cd50df4186422c42 23-Aug-2017 Yang Ni <yangni@google.com> Implement LSH Projection for NN API on CPU

Bug: 63905942

Adapted previous TF Lite implementation and unit tests.

Test: adb shell /data/nativetest/lsh_projection_test/lsh_projection_test

Change-Id: Id90192becfec11a658d57495831327dbb380fc0a
/frameworks/ml/nn/common/CpuExecutor.cpp
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/common/CpuExecutor.cpp
39ac3cd6199ba1abcacc5781a3c9f60eac321bc8 29-Aug-2017 Yang Ni <yangni@google.com> Merge "Implement RNN in NN API" into oc-mr1-dev
9f41362ea2d250b89e59c73cc0194c6a6720cc9d 21-Aug-2017 Miao Wang <miaowang@google.com> Implement quantized RELU, RELU1, RELU6 and SOFTMAX.

Bug: 63905942
Test: mm
Test: InceptionV3 quantized end to end test pass

Change-Id: Ibfdfa5d2476f6ee5f2f96aab78c522eeebcc5920
/frameworks/ml/nn/common/CpuExecutor.cpp
7743646307dbcdfc3ed5188b46f1dfe34b69272c 21-Aug-2017 Yang Ni <yangni@google.com> Implement RNN in NN API

Bug: 63905942

Adapted previous TF lite implementation and unit test for
implementation of NN API on CPU.

Test: adb shell /data/nativetest64/rnn_test/rnn_test

Change-Id: Iae724391f902c806e987a6dff50c2c4b24c993ce
/frameworks/ml/nn/common/CpuExecutor.cpp
f6e79096ad149a9557c6f5c7753ac75e05155a79 11-Aug-2017 Miao Wang <miaowang@google.com> Implement the following ops reshaping a tensor.

- RESHAPE, both FLOAT32 and QUANT8.
- DEPTH_TO_SPACE, both FLOAT32 and QUANT8.
- SPACE_TO_DEPTH, both FLOAT32 and QUANT8.
- RESIZE_BILINEAR, FLOAT32.

Bug: 63905942
Test: mm
Change-Id: Ie44e9e6877e511f4c28671161f8d5a7420a7a35d
/frameworks/ml/nn/common/CpuExecutor.cpp
15b1e5b3ef28dc43cfd68143119e3a2967d2c557 10-Aug-2017 Miao Wang <miaowang@google.com> Implement ADD, MUL, FLOOR and DEQUANTIZE.

Bug: 63905942
Test: mm
Change-Id: Idd40cee44b491a395e6cb417f3ae490e29017725
/frameworks/ml/nn/common/CpuExecutor.cpp
d9bef406eb022b143bb2fa7d98bc4b4cdc79de06 10-Aug-2017 Miao Wang <miaowang@google.com> Implement L2_NORMALIZATION and LOCAL_RESPONSE_NORMALIZATION.

Bug: 63905942
Test: mm
Change-Id: I2c3d41232279a64169519bf97e6d2bacb20fd2a0
/frameworks/ml/nn/common/CpuExecutor.cpp
bbfd239e43526ff969699d3fc6110395edd2108b 26-Jul-2017 Miao Wang <miaowang@google.com> Implement Softmax, FullyConnected, and Concatenation.

- FLOAT32 and QUANT8 versions of FullyConnected and Concatenation are
covered.
- This change only covers FLOAT32 version of Softmax

Bug: 63905942
Test: mm
Test: end-to-end test with Inception V3 pass.
Test: end-to-end test with StripOCR quantized pass.

Change-Id: I9e001265cc31df406fdb3d685d10a1c61216c700
/frameworks/ml/nn/common/CpuExecutor.cpp
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/CpuExecutor.cpp
eb1f88846f147d1d80ee0d688fe4635b89a40ffa 26-Jul-2017 Miao Wang <miaowang@google.com> Implement the following operations for Android NN runtime.

- CONV_FLOAT32
- DEPTHWISE_CONV_FLOAT32
- AVERAGE_POOL_FLOAT32
- L2_POOL_FLOAT32
- MAX_POOL_FLOAT32
- RELU_FLOAT32
- RELU6_FLOAT32
- TANH_FLOAT32
- LOGISTIC_FLOAT32

Bug: 63905942
Test: mm
Test: End-to-end test with MobileNet pass

Change-Id: I3eaa9794c7cdffd01792d26c5d6497c8d56d8605
/frameworks/ml/nn/common/CpuExecutor.cpp
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/CpuExecutor.cpp
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/common/CpuExecutor.cpp