853931ff8e4df815699c30c2948b5a51aa4a206d |
|
20-Mar-2018 |
Miao Wang <miaowang@google.com> |
Add a field in ModelBuilder to indicate whether the model is invalid or not. - Mutating an invalid model is disallowed, and will return BAD_STATE. - Currently only validation failures caught during finish() will flip this flag to true. - Slightly modify the validation cases to not expect finish() to always succeed. Bug: 75980486 Test: mm Test: ValidationTestModel.SetOperandValueFromMemory Test: NeuralNetworkTests (no new test failures) Change-Id: If9289b65501266baf9048d8cdc621b64064e90ec
/frameworks/ml/nn/runtime/ModelBuilder.h
|
57167f7ec8bfe682139a9a4d60cd8aa913899441 |
|
16-Feb-2018 |
Michael Butler <butlermichael@google.com> |
Simplify lifetime management of ModelBuilder ExecutionStep fully owns the ModelBuilder it contains, and only provides references to the subModel. This change simplifies the lifetime management to reflect the ownership, removing the unnecessary strong pointer behavior. Additionally, this CL removes the unnecessary virtual destructor in the ModelBuilder class, which was likely an artifact of a previous implementation. Test: mm Test: NeuralNetworksTest Test: VtsHalNeuralnetworksV1_0TargetTest Change-Id: I62571d9a61fd8bbc193586756267ad4ec8888e27
/frameworks/ml/nn/runtime/ModelBuilder.h
|
084401d6215dca122999261c5ac3718ebf61b29e |
|
14-Feb-2018 |
Michael Butler <butlermichael@google.com> |
NNAPI narrow evaluation for P -- runtime 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 manages the versioning differences between 1.0 and 1.1. Bug: 63911257 Test: mm Test: NeuralNetworksTest Test: VtsHalNeuralnetworksV1_0TargetTest Change-Id: If6f31536eedc92c4795056fdf3ff8818db1bc988
/frameworks/ml/nn/runtime/ModelBuilder.h
|
fc67d170972e9178f4c9bcec6c6d1b8e2c3161fa |
|
13-Oct-2017 |
Jean-Luc Brouillet <jeanluc@google.com> |
Ensure that the selected device is better than the CPU. Change the selection criteria to make sure we don't select a device that's worse than the CPU. Also added a check to make the compilation fail if there's an OEM op in the model but no driver can do the work. Bug: 67643728 Test: Ran system tests and VTS tests. Verified by changing sample drivers that the CPU was chosen when appropriate. Change-Id: I31577ea72620d0179f6652b3a0496b01674a7b7c
/frameworks/ml/nn/runtime/ModelBuilder.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/ModelBuilder.h
|
def0a14aa77689f12120cfb4f136eea659038cc0 |
|
05-Oct-2017 |
David Gross <dgross@google.com> |
Partitioning interface changes to enable unit testing. Bug: 63905942 Test: mma (userdebug) ml/nn/runtime/tests (userdebug) (no failures, logcat looks plausible) Change-Id: Ib9a5eb75b9e4e2c3534f392d5fb0e5ba3555197d
/frameworks/ml/nn/runtime/ModelBuilder.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/ModelBuilder.h
|
891b10f7048c62a37a74c4b570be220089dfd55e |
|
02-Oct-2017 |
David Gross <dgross@google.com> |
Add ExecutionPlan::Controller support for Compound plans. This includes proper handling of ExecutionBuilder inputs and outputs, but not of inter-partition temporaries that need to become inputs and outputs. When debug.nn.partitioning.test > 0, always use Controller, instead of the prior behavior of only using it when debug.nn.partitioning.test > 1 and the plan is "in scope" for execution. If a combination of the partitioning property value and the plan's shouldBeExecutable() say the plan shouldn't be given control, then we do simulated execution under control of the plan before real execution without using the plan. This allows us to test StepExecutors. ("Simulated execution" means iterating through the StepExecutors without using them to perform any computation.) Bug: 63905942 Test: mma (user) mma (userdebug) ml/nn/runtime/tests (userdebug) (with debug.nn.partition.test 0, 1, and 2; no new failures, logcat looks plausible) Change-Id: I3a05f5479e906eb13f65e27b17e7129bfcceac0d
/frameworks/ml/nn/runtime/ModelBuilder.h
|
0b9453e41a544f9c780eaa15ad65136ad4662ccb |
|
23-Sep-2017 |
David Gross <dgross@google.com> |
More debugging tools for graph partitioning. 1) Under property debug.nn.partition.test, run partitioning algorithm fropm CompilationBuilder::finish(). We don't use the results -- this is to produce log output and to verify that we don't crash. 2) Add a little more LOG(DEBUG) output. Bug: 63905942 Test: mm (userdebug and user) Change-Id: I8f0f4477cb9a564dcd55536677687c7914a9b86e
/frameworks/ml/nn/runtime/ModelBuilder.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/runtime/ModelBuilder.h
|
91e8417c4c395e3922d12abfd956b93b71121976 |
|
14-Sep-2017 |
Jean-Luc Brouillet <jeanluc@google.com> |
Partition the requests to run on multiple devices. Partition the request so that subgraphs can run on the best device. Also respects the capabilities of a device so that we don't try to run a device incapable to run a graph. Bug: 63905942 Test: Compiled and ran unit tests. We'll want more advance tests. Change-Id: I8662fa719661e5b68c47cd75703edb5937fc8f0a
/frameworks/ml/nn/runtime/ModelBuilder.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/ModelBuilder.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/ModelBuilder.h
|
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/ModelBuilder.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/ModelBuilder.h
|
389f26c7c442c37994db9f43d013fe3953c9353c |
|
03-Sep-2017 |
Jean-Luc Brouillet <jeanluc@google.com> |
Refactor of ModelArgumentInfo. Reduced duplicated code. Bug: 63905942 Test: Compile and ran tests. Change-Id: I696b39c4c1460d1da464ed30f2922a073bebe28b
/frameworks/ml/nn/runtime/ModelBuilder.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/ModelBuilder.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/ModelBuilder.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/ModelBuilder.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/ModelBuilder.h
|