History log of /frameworks/ml/nn/runtime/test/TestValidation.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2627442c6aa4c694d01500391c1c84ed6beec717 14-May-2018 Miao Wang <miaowang@google.com> Fix setOperandValue validation for optional operands.

- Also added a test to make sure optional operands can be set.

Bug: 79605402
Test: mm
Test: NeuralNetworksTest_static
Change-Id: I4fe60575f94606c05e2e39c800797a0c765285e8
/frameworks/ml/nn/runtime/test/TestValidation.cpp
f0efd0b6ca988f31323c2bf80dec74336fcaa835 23-Mar-2018 Miao Wang <miaowang@google.com> Fix the validation tests which were using ADD incorrectly.

- ADD expects 3 inputs: tensor1, tensor2, activation.

Bug: 76171792
Test: mm
Test: NeuralNetworksTest
Change-Id: I44359dc429657e0eb8fcc6a3890538757335ecc3
/frameworks/ml/nn/runtime/test/TestValidation.cpp
a161b4b9dceb53a74c6f629f5e2a44b89e26d9b4 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add basic validation for ANeuralNetworksModel_addOperation" into pi-dev
137d278a0b2e3f2b518ab30b24755838d807759a 07-Mar-2018 Miao Wang <miaowang@google.com> Add basic validation for ANeuralNetworksModel_addOperation

- This change tries to catch errors during
ANeuralNetworksModel_addOperation.
- It checks the expected number of arguments and their types.
- Add tests for most of the operations.
- Fix a bug in another test caught by this change.

Bug: 67828197
Test: mm
Test: NeuralNetworksTest
Change-Id: I565a8a08f96dd9f2b15a8e413360df0bedc57f37
/frameworks/ml/nn/runtime/test/TestValidation.cpp
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/test/TestValidation.cpp
5c2e9d7348bf6b3f75572e814a399686222331a9 14-Mar-2018 David Gross <dgross@google.com> Add tests for ANeuralNetworksModel_identifyInputsAndOutputs.

Test: NeuralNetworksTest_static --gtest_filter=ValidationTestIdentify.*

Bug: 67828197
Change-Id: Iee1294d461e3b66140cc3c6a11edb3e2f404d9a3
/frameworks/ml/nn/runtime/test/TestValidation.cpp
0deadd8c690b5a131d66e4bc03667315f28df321 14-Mar-2018 David Gross <dgross@google.com> Call validation from ModelBuilder::finish().

Also:
- Make incompletely-initialized large operand values recognizable
as incompletely-initialized (for easier validation and manual
debugging).
- Fix typos.

Test: nn/runtime/test/NeuralNetworksTest_static

Bug: 74784979

Change-Id: I4753ca137228d733b10097e68a3ef3e2fb6f46c7
/frameworks/ml/nn/runtime/test/TestValidation.cpp
ee8da78f88aebeddcde85544cc126c0858badbc2 28-Feb-2018 Miao Wang <miaowang@google.com> Add a bunch of validation tests.

Tests added for the following APIs:
- ANeuralNetworksModel_addOperand;
- ANeuralNetworksModel_setOperandValue;
- ANeuralNetworksModel_setOperandValueFromMemory;
- ANeuralNetworksModel_addOperation;
- ANeuralNetworksModel_relaxComputationFloat32toFloat16;
- ANeuralNetworksExecution_setInput;
- ANeuralNetworksExecution_setInputFromMemory;
- ANeuralNetworksExecution_setOutput;
- ANeuralNetworksExecution_setOutputFromMemory;
- ANeuralNetworksExecution_startCompute;
- ANeuralNetworksEvent_wait;

Test: mm
Test: NeuralNetworks
Change-Id: I4e706b1a719e7b513a3bf155d993dbc342ba8322
/frameworks/ml/nn/runtime/test/TestValidation.cpp
d90fdc99fe2bb7585ae8a3eb20c6feeb407cbbbd 02-Feb-2018 Miao Wang <miaowang@google.com> Fix setOperandValue for OEM_SCALAR operands

- Added unit test adding and setting OEM scalar and tensor operands.

Bug: 67869090
Test: mm
Test: NeuralNetworksTest
Change-Id: I6cd91840c3fd0a72755c7e391db08758b28a7342
/frameworks/ml/nn/runtime/test/TestValidation.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/runtime/test/TestValidation.cpp
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/test/TestValidation.cpp
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/test/TestValidation.cpp
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/test/TestValidation.cpp
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/test/TestValidation.cpp
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/test/TestValidation.cpp
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/test/TestValidation.cpp
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/test/TestValidation.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/runtime/test/TestValidation.cpp
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/test/TestValidation.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/runtime/test/TestValidation.cpp
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/test/TestValidation.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/runtime/test/TestValidation.cpp