blob: 9bff09cdb7acaeb1ca931a78192f50c413cf7ad2 [file] [log] [blame]
Slava Shklyaevfeb87a92018-09-12 14:52:02 +01001/*
2 * Copyright (C) 2018 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#define LOG_TAG "neuralnetworks_hidl_hal_test"
18
19#include "VtsHalNeuralnetworks.h"
20
21#include "Callbacks.h"
22#include "TestHarness.h"
23#include "Utils.h"
24
25#include <android-base/logging.h>
26#include <android/hidl/memory/1.0/IMemory.h>
27#include <hidlmemory/mapping.h>
28
29namespace android {
30namespace hardware {
31namespace neuralnetworks {
32
33namespace generated_tests {
Michael K. Sandersda3bdbc2018-10-19 14:39:09 +010034using ::test_helper::MixedTypedExample;
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010035extern void Execute(const sp<V1_2::IDevice>&, std::function<V1_2::Model(void)>,
Michael K. Sandersda3bdbc2018-10-19 14:39:09 +010036 std::function<bool(int)>, const std::vector<MixedTypedExample>&);
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010037} // namespace generated_tests
38
39namespace V1_2 {
40namespace vts {
41namespace functional {
42
Xusong Wang1a06e772018-10-31 08:43:12 -070043using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
44using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010045using ::android::nn::allocateSharedMemory;
Michael K. Sandersda3bdbc2018-10-19 14:39:09 +010046using ::test_helper::MixedTypedExample;
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010047
Michael K. Sandersa8efddc2018-11-09 12:10:09 +000048std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
49
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010050// in frameworks/ml/nn/runtime/tests/generated/
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010051#include "all_generated_V1_2_vts_tests.cpp"
52
53} // namespace functional
54} // namespace vts
55} // namespace V1_2
56} // namespace neuralnetworks
57} // namespace hardware
58} // namespace android