diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2022-01-21 15:27:13 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2022-02-02 13:51:27 +0000 |
commit | c64f506a848ed15d8fb041e4d818a3f92ebe0df8 (patch) | |
tree | cf582e3e3b9e06899b972a69a8d6ff27eb8d869f | |
parent | 06fcf7502b5c9b0e30ac06acfa25aa914d936500 (diff) | |
download | ml-embedded-evaluation-kit-c64f506a848ed15d8fb041e4d818a3f92ebe0df8.tar.gz |
MLECO-2855: Move profiling outside application/main
Change-Id: I182bfa55b5ae743d6f0b9f5c766b746202a7968d
Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com>
-rw-r--r-- | CMakeLists.txt | 23 | ||||
-rw-r--r-- | scripts/cmake/toolchains/bare-metal-armclang.cmake | 2 | ||||
-rw-r--r-- | scripts/cmake/toolchains/bare-metal-gcc.cmake | 2 | ||||
-rw-r--r-- | scripts/py/gen_test_data_cpp.py | 2 | ||||
-rw-r--r-- | source/application/profiler/Profiler.cc (renamed from source/application/main/Profiler.cc) | 2 | ||||
-rw-r--r-- | source/application/profiler/include/Profiler.hpp (renamed from source/application/main/include/Profiler.hpp) | 2 | ||||
-rw-r--r-- | tests/common/PlatformMathTests.cpp | 2 |
7 files changed, 23 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d6ed7c..2743066 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Copyright (c) 2021 Arm Limited. All rights reserved. +# Copyright (c) 2021 - 2022 Arm Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -170,12 +170,18 @@ file(GLOB_RECURSE SRC_HAL # by each platform's cmake include file list(APPEND SRC_HAL ${SRC_PLAT_HAL}) +# Profiler +if (NOT DEFINED PROFILER_DIR) + set(PROFILER_DIR ${SRC_PATH}/application/profiler) +endif () + # Include directories: -set(APPLICATION_INCLUDE_DIRS +list(APPEND APPLICATION_INCLUDE_DIRS ${HAL_DIR}/include ${SRC_PATH}/application/tensorflow-lite-micro/include ${SRC_PATH}/application/main/include ${PLAT_INCLUDE_DIRS} + ${PROFILER_DIR}/include ) file(GLOB_RECURSE SRC_APPLICATION @@ -185,6 +191,9 @@ file(GLOB_RECURSE SRC_APPLICATION "${SRC_PATH}/application/main/**/*.cc" "${SRC_PATH}/application/main/**/*.cpp" "${SRC_PATH}/application/main/**/*.c" + "${PROFILER_DIR}/*.cc" + "${PROFILER_DIR}/*.cpp" + "${PROFILER_DIR}/*.c" ) list(FILTER SRC_APPLICATION EXCLUDE REGEX ".*main\\.c.*$") @@ -219,6 +228,11 @@ if (NOT ${CMAKE_CROSSCOMPILING}) ) endif () +list(APPEND APPLICATION_LIBS + ${TENSORFLOW_LIBRARY} + $<$<BOOL:${ETHOS_U_NPU_ENABLED}>:${ETHOS_U_NPU_LIBS}> + $<$<BOOL:${CMSIS_DSP_LIB}>:${CMSIS_DSP_LIB}>) + message(STATUS "Building use-cases: ${USE_CASES}.") foreach(use_case ${USE_CASES}) @@ -322,10 +336,7 @@ foreach(use_case ${USE_CASES}) endif() endif() - target_link_libraries(${UC_LIB_NAME} PUBLIC - ${TENSORFLOW_LIBRARY} - $<$<BOOL:${ETHOS_U_NPU_ENABLED}>:${ETHOS_U_NPU_LIBS}> - $<$<BOOL:${CMSIS_DSP_LIB}>:${CMSIS_DSP_LIB}>) + target_link_libraries(${UC_LIB_NAME} PUBLIC ${APPLICATION_LIBS}) add_executable(${TARGET_NAME} ${SRC_MAIN} ${PLAT_RETARGET_SOURCE}) diff --git a/scripts/cmake/toolchains/bare-metal-armclang.cmake b/scripts/cmake/toolchains/bare-metal-armclang.cmake index 4852db1..afe6e66 100644 --- a/scripts/cmake/toolchains/bare-metal-armclang.cmake +++ b/scripts/cmake/toolchains/bare-metal-armclang.cmake @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Copyright (c) 2021 Arm Limited. All rights reserved. +# Copyright (c) 2021 - 2022 Arm Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/scripts/cmake/toolchains/bare-metal-gcc.cmake b/scripts/cmake/toolchains/bare-metal-gcc.cmake index f111746..1ddfb44 100644 --- a/scripts/cmake/toolchains/bare-metal-gcc.cmake +++ b/scripts/cmake/toolchains/bare-metal-gcc.cmake @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Copyright (c) 2021 Arm Limited. All rights reserved. +# Copyright (c) 2021 - 2022 Arm Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/scripts/py/gen_test_data_cpp.py b/scripts/py/gen_test_data_cpp.py index 3ead8bf..dae181d 100644 --- a/scripts/py/gen_test_data_cpp.py +++ b/scripts/py/gen_test_data_cpp.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Arm Limited. All rights reserved. +# Copyright (c) 2021 - 2022 Arm Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/source/application/main/Profiler.cc b/source/application/profiler/Profiler.cc index fe3aeaf..c2b8f2a 100644 --- a/source/application/main/Profiler.cc +++ b/source/application/profiler/Profiler.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/source/application/main/include/Profiler.hpp b/source/application/profiler/include/Profiler.hpp index d1b6d91..503d805 100644 --- a/source/application/main/include/Profiler.hpp +++ b/source/application/profiler/include/Profiler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/common/PlatformMathTests.cpp b/tests/common/PlatformMathTests.cpp index 2155886..ab1153f 100644 --- a/tests/common/PlatformMathTests.cpp +++ b/tests/common/PlatformMathTests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2021 - 2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); |