summaryrefslogtreecommitdiff
path: root/nn/runtime/test/TestGenerated.cpp
diff options
context:
space:
mode:
authorDavid Gross <dgross@google.com>2017-09-11 14:47:58 -0700
committerDavid Gross <dgross@google.com>2017-09-11 14:47:58 -0700
commit544739620cd7f37d40524d2407c92042e485c73f (patch)
tree68b05e7f08e82968104ef93035ec2e0ad86e4d28 /nn/runtime/test/TestGenerated.cpp
parent83e24dc4706a5b7089881a55daf05b3924fab3b7 (diff)
downloadml-544739620cd7f37d40524d2407c92042e485c73f.tar.gz
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
Diffstat (limited to 'nn/runtime/test/TestGenerated.cpp')
-rw-r--r--nn/runtime/test/TestGenerated.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/nn/runtime/test/TestGenerated.cpp b/nn/runtime/test/TestGenerated.cpp
index 8ebb622bd..667882efc 100644
--- a/nn/runtime/test/TestGenerated.cpp
+++ b/nn/runtime/test/TestGenerated.cpp
@@ -42,6 +42,7 @@ class Example {
std::function<bool(const T, const T)> compare) {
Model model;
create_model(&model);
+ model.finish();
int example_no = 1;
bool error = false;
@@ -98,6 +99,7 @@ class Example {
std::vector<MixedTypedExampleType>& examples) {
Model model;
create_model(&model);
+ model.finish();
int example_no = 1;
for (auto& example : examples) {