Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
Michael Butler | f76acd0 | 2018-03-22 16:37:57 -0700 | [diff] [blame^] | 19 | #include "VtsHalNeuralnetworks.h" |
Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 20 | |
| 21 | #include "Callbacks.h" |
| 22 | #include "TestHarness.h" |
Michael Butler | f76acd0 | 2018-03-22 16:37:57 -0700 | [diff] [blame^] | 23 | #include "Utils.h" |
Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 24 | |
| 25 | #include <android-base/logging.h> |
| 26 | #include <android/hidl/memory/1.0/IMemory.h> |
| 27 | #include <hidlmemory/mapping.h> |
| 28 | |
Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 29 | namespace android { |
| 30 | namespace hardware { |
| 31 | namespace neuralnetworks { |
| 32 | |
| 33 | namespace generated_tests { |
| 34 | using ::generated_tests::MixedTypedExampleType; |
Michael Butler | f76acd0 | 2018-03-22 16:37:57 -0700 | [diff] [blame^] | 35 | extern void Execute(const sp<V1_0::IDevice>&, std::function<V1_0::Model(void)>, |
| 36 | std::function<bool(int)>, const std::vector<MixedTypedExampleType>&); |
Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 37 | } // namespace generated_tests |
| 38 | |
| 39 | namespace V1_0 { |
| 40 | namespace vts { |
| 41 | namespace functional { |
Michael Butler | f76acd0 | 2018-03-22 16:37:57 -0700 | [diff] [blame^] | 42 | |
Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 43 | using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback; |
| 44 | using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback; |
Michael Butler | f76acd0 | 2018-03-22 16:37:57 -0700 | [diff] [blame^] | 45 | using ::android::nn::allocateSharedMemory; |
Miao Wang | a2d04c8 | 2018-02-05 17:26:54 -0800 | [diff] [blame] | 46 | |
| 47 | // Mixed-typed examples |
| 48 | typedef generated_tests::MixedTypedExampleType MixedTypedExample; |
| 49 | |
| 50 | // in frameworks/ml/nn/runtime/tests/generated/ |
| 51 | #include "all_generated_V1_0_vts_tests.cpp" |
| 52 | |
| 53 | } // namespace functional |
| 54 | } // namespace vts |
| 55 | } // namespace V1_0 |
| 56 | } // namespace neuralnetworks |
| 57 | } // namespace hardware |
| 58 | } // namespace android |