History log of /frameworks/ml/nn/driver/sample/SampleDriver.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/driver/sample/SampleDriver.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/driver/sample/SampleDriver.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/driver/sample/SampleDriver.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/driver/sample/SampleDriver.h
6f71d7317aa4b048a8220e70a93cf6dc139936a5 11-Sep-2017 Michael Butler <butlermichael@google.com> Make prepareModel asynchronous -- runtime changes

Makes the prepareModel phase asynchronous. Current implementation
immediately synchronizes with the event object, but this will be changed
after the compilation phase is separated from the execution phase.

Bug: 63905942
Test: mm, frameworks/ml/nn/runtime/test
Change-Id: I49be85dbdc9564a614e37c8e9584911d34b8ae1b
/frameworks/ml/nn/driver/sample/SampleDriver.h
7350a72b798e3cf89cc968b578aae2eb3a56fc87 04-Sep-2017 Jean-Luc Brouillet <jeanluc@google.com> Create a nn/driver directory.

- Moved nn/sample_driver to nn/driver/sample.
- Moved nn/cache to nn/driver/cache.
- Upcoming code to handle various types of memory will be placed in this directory.

Bug: 63905942
Test: Compiled and ran the tests
Change-Id: I55618b7e5748bec6ebeeb0dbdff65ad331c583ca
/frameworks/ml/nn/driver/sample/SampleDriver.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/driver/sample/SampleDriver.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/driver/sample/SampleDriver.h