blob: de45242ac73eafdddcc336dc203b95429bd5ee26 [file] [log] [blame]
Slava Shklyaev73ee79d2019-05-14 14:15:14 +01001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_2_GENERATED_TEST_HARNESS_H
18#define ANDROID_HARDWARE_NEURALNETWORKS_V1_2_GENERATED_TEST_HARNESS_H
19
20#include <android/hardware/neuralnetworks/1.2/IDevice.h>
21#include <android/hardware/neuralnetworks/1.2/IPreparedModel.h>
22#include <android/hardware/neuralnetworks/1.2/types.h>
23#include <functional>
24#include <vector>
25#include "TestHarness.h"
26
27namespace android {
28namespace hardware {
29namespace neuralnetworks {
Slava Shklyaeve8b24462019-07-17 15:50:57 +010030namespace V1_2 {
Slava Shklyaev73ee79d2019-05-14 14:15:14 +010031namespace generated_tests {
32
Xusong Wangead950d2019-08-09 16:45:24 -070033Model createModel(const ::test_helper::TestModel& testModel);
Slava Shklyaev73ee79d2019-05-14 14:15:14 +010034
35void PrepareModel(const sp<V1_2::IDevice>& device, const V1_2::Model& model,
36 sp<V1_2::IPreparedModel>* preparedModel);
37
Xusong Wangead950d2019-08-09 16:45:24 -070038void EvaluatePreparedModel(const sp<V1_2::IPreparedModel>& preparedModel,
39 const ::test_helper::TestModel& testModel, bool testDynamicOutputShape);
Slava Shklyaev73ee79d2019-05-14 14:15:14 +010040
Xusong Wangead950d2019-08-09 16:45:24 -070041void Execute(const sp<V1_2::IDevice>& device, const ::test_helper::TestModel& testModel,
Slava Shklyaev73ee79d2019-05-14 14:15:14 +010042 bool testDynamicOutputShape = false);
43
44} // namespace generated_tests
Slava Shklyaeve8b24462019-07-17 15:50:57 +010045} // namespace V1_2
Slava Shklyaev73ee79d2019-05-14 14:15:14 +010046} // namespace neuralnetworks
47} // namespace hardware
48} // namespace android
49
50#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_2_GENERATED_TEST_HARNESS_H