diff options
author | Slava Shklyaev <slavash@google.com> | 2018-09-14 13:34:22 +0100 |
---|---|---|
committer | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2018-09-21 14:24:34 +0100 |
commit | ec7da3d3ff0d8fcec583eef97af45d4a216bd14f (patch) | |
tree | f5590d4bab366cada9c37930a1f501abe20fbdef /nn/runtime/test/TestPartitioningRandom.cpp | |
parent | 5e4ecd250883e47835d8d7a6a970abceff00f630 (diff) | |
download | ml-ec7da3d3ff0d8fcec583eef97af45d4a216bd14f.tar.gz |
Upgrade runtime tests to v1.2
Bug: 114365802
Test: mm
Test: VTS
Change-Id: I01aef7f03b8089e5e54c0c305f4e360d1ec9a221
Merged-In: I01aef7f03b8089e5e54c0c305f4e360d1ec9a221
(cherry picked from commit 0836b5f052d83e5f5b450e0ca9cab47b60aed58b)
Diffstat (limited to 'nn/runtime/test/TestPartitioningRandom.cpp')
-rw-r--r-- | nn/runtime/test/TestPartitioningRandom.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nn/runtime/test/TestPartitioningRandom.cpp b/nn/runtime/test/TestPartitioningRandom.cpp index 6f6cfee52..1c0007cae 100644 --- a/nn/runtime/test/TestPartitioningRandom.cpp +++ b/nn/runtime/test/TestPartitioningRandom.cpp @@ -92,7 +92,7 @@ using CompilationBuilder = nn::CompilationBuilder; using Device = nn::Device; using DeviceManager = nn::DeviceManager; using ExecutionPlan = nn::ExecutionPlan; -using HidlModel = hardware::neuralnetworks::V1_1::Model; +using HidlModel = hardware::neuralnetworks::V1_2::Model; using MemoryBuilder = nn::Memory; using ModelBuilder = nn::ModelBuilder; using Result = nn::wrapper::Result; @@ -477,7 +477,7 @@ public: return Void(); } - Return<void> getSupportedOperations_1_1(const HidlModel& model, + Return<void> getSupportedOperations_1_2(const HidlModel& model, getSupportedOperations_cb cb) override { if (nn::validateModel(model)) { const size_t count = model.operations.size(); @@ -497,11 +497,11 @@ public: return Void(); } - Return<ErrorStatus> prepareModel_1_1(const HidlModel& model, ExecutionPreference preference, + Return<ErrorStatus> prepareModel_1_2(const HidlModel& model, ExecutionPreference preference, const sp<IPreparedModelCallback>& callback) override { // NOTE: We verify that all operations in the model are supported. ErrorStatus outStatus = ErrorStatus::INVALID_ARGUMENT; - auto ret = getSupportedOperations_1_1( + auto ret = getSupportedOperations_1_2( model, [&outStatus](ErrorStatus inStatus, const hidl_vec<bool>& supportedOperations) { if (inStatus == ErrorStatus::NONE) { @@ -512,7 +512,7 @@ public: } }); if (ret.isOk() && (outStatus == ErrorStatus::NONE)) { - return SampleDriver::prepareModel_1_1(model, preference, callback); + return SampleDriver::prepareModel_1_2(model, preference, callback); } else { callback->notify(ErrorStatus::INVALID_ARGUMENT, nullptr); return ErrorStatus::INVALID_ARGUMENT; |