summaryrefslogtreecommitdiff
path: root/nn/runtime/test/fuzzing
diff options
context:
space:
mode:
authorXusong Wang <xusongw@google.com>2020-04-22 22:17:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-04-22 22:17:39 +0000
commitaf55ce116ec438bf73c250ba8b9f64631f209608 (patch)
tree5c3b801dd0b957391878ea8dea912efad216f0c6 /nn/runtime/test/fuzzing
parent4771108bc09751db04c64971473dd4f4d5cebbf7 (diff)
parent69db15d05d4f7a3c168185520cdcdb60f1d09fab (diff)
downloadml-af55ce116ec438bf73c250ba8b9f64631f209608.tar.gz
Merge "Add NNT_static internal tests for device memory allocation." into rvc-dev
Diffstat (limited to 'nn/runtime/test/fuzzing')
-rw-r--r--nn/runtime/test/fuzzing/TestRandomGraph.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/nn/runtime/test/fuzzing/TestRandomGraph.cpp b/nn/runtime/test/fuzzing/TestRandomGraph.cpp
index ada7fd223..979855922 100644
--- a/nn/runtime/test/fuzzing/TestRandomGraph.cpp
+++ b/nn/runtime/test/fuzzing/TestRandomGraph.cpp
@@ -243,8 +243,8 @@ class RandomGraphTest : public ::testing::TestWithParam<uint32_t> {
// Create compilation for nnapi-reference.
ASSERT_TRUE(mDevices.find(kRefDeviceName) != mDevices.end());
const auto refDevice = mDevices[kRefDeviceName];
- test_wrapper::Compilation compilation;
- ASSERT_EQ(compilation.createForDevice(&model, refDevice), Result::NO_ERROR);
+ auto [result, compilation] = test_wrapper::Compilation::createForDevice(&model, refDevice);
+ ASSERT_EQ(result, Result::NO_ERROR);
ASSERT_EQ(compilation.finish(), Result::NO_ERROR);
// Create request.
@@ -294,8 +294,8 @@ class RandomGraphTest : public ::testing::TestWithParam<uint32_t> {
if (shouldSkipTest(featureLevel)) return;
// Create compilation for device.
- test_wrapper::Compilation compilation;
- ASSERT_EQ(compilation.createForDevice(model, device), Result::NO_ERROR);
+ auto [result, compilation] = test_wrapper::Compilation::createForDevice(model, device);
+ ASSERT_EQ(result, Result::NO_ERROR);
Result compileReturn = compilation.finish();
// Even if the model is fully supported, the compilation may still fail, e.g. each operation
// is supported, but model is too big (too many operations and/or too-large constants) for