Manage inter-partition temporaries.
This means: Allocate a Memory object for each TEMPORARY in the original
model that is live across partition boundaries; and tell each
StepExecutor about the mapping from a submodel input or output to the
appropriate Memory object.
With these changes, we can now fully execute multiple-partition plans.
Limitations:
- Still under control of debug.nn.partition.test property.
- Cannot handle operands of unknown size, except for model (not
submodel) inputs and outputs.
- Execution is synchronous.
Also: Teach sizeOfData() to work on scalars.
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,
confirmed that GeneratedTests.mobilenet
runs on multiple partitions)
Change-Id: I58b763bc68bf8fe2e0306610c775b854e9292f76
6 files changed