blob: 8e2fa32e591001a57e28a3b9c4f1cb28c801aa60 [file] [log] [blame]
Anton Moberg456566d2021-03-17 10:19:26 +01001#
Kristofer Jonsson8f813b32022-11-23 13:05:47 +01002# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
Anton Moberg456566d2021-03-17 10:19:26 +01003#
4# SPDX-License-Identifier: Apache-2.0
5#
6# Licensed under the Apache License, Version 2.0 (the License); you may
7# not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an AS IS BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
Jonathan Strandbergd2afc512021-03-19 10:31:18 +010019set(BAREMETAL_PATH "" CACHE PATH "Path to input, output and network for baremetal")
20
21if (IS_DIRECTORY ${BAREMETAL_PATH})
22 ethosu_add_executable_test(baremetal_custom PRIVATE
Kristofer Jonsson5eb3dc32021-06-09 15:09:01 +020023 SOURCES main.cpp
Kristofer Jonsson8f813b32022-11-23 13:05:47 +010024 LIBRARIES inference_process $<$<TARGET_EXISTS:ethosu_monitor>:ethosu_monitor>)
Jonathan Strandbergd2afc512021-03-19 10:31:18 +010025 target_include_directories(baremetal_custom PRIVATE ${BAREMETAL_PATH})
26endif()
27
Kristofer Jonsson15625f12021-11-24 14:16:34 +010028if (TARGET ethosu_core_driver)
29 file(GLOB models LIST_DIRECTORIES true "${CMAKE_CURRENT_SOURCE_DIR}/models/${ETHOSU_TARGET_NPU_CONFIG}/*")
30endif()
Anton Mobergd1213562021-03-17 15:45:27 +010031
Lior Dekel52fddd02021-10-04 19:15:24 +030032foreach(model ${models})
33 get_filename_component(name ${model} NAME)
34 ethosu_add_executable_test(baremetal_${name} PRIVATE
Jens Elofsson74eefce2021-05-25 13:47:13 +020035 SOURCES main.cpp
Kristofer Jonsson8f813b32022-11-23 13:05:47 +010036 LIBRARIES inference_process $<$<TARGET_EXISTS:ethosu_monitor>:ethosu_monitor>)
Lior Dekel52fddd02021-10-04 19:15:24 +030037 target_include_directories(baremetal_${name} PRIVATE ${model})
38endforeach()