From 3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0 Mon Sep 17 00:00:00 2001 From: surmeh01 Date: Fri, 18 May 2018 16:31:43 +0100 Subject: Release 18.05 --- cmake/GlobalConfig.cmake | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index 0ce95a717a..2dbeadaadf 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -7,6 +7,9 @@ option(ARMCOMPUTENEON "Build with ARM Compute NEON support" OFF) option(ARMCOMPUTECL "Build with ARM Compute OpenCL support" OFF) option(PROFILING "Build with ArmNN built-in profiling support" OFF) option(PROFILING_BACKEND_STREAMLINE "Forward the armNN profiling events to DS-5/Streamline as annotations" OFF) +# options used for heap profiling +option(HEAP_PROFILING "Build with heap profiling enabled" OFF) +option(GPERFTOOLS_ROOT "Location where the gperftools 'include' and 'lib' folders to be found" Off) include(SelectLibraryConfigurations) @@ -146,7 +149,6 @@ if(BUILD_TF_PARSER) include_directories(SYSTEM "${TF_GENERATED_SOURCES}") endif() - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) # ARM Compute @@ -250,3 +252,34 @@ if(PROFILING_BACKEND_STREAMLINE) add_definitions(-DARMNN_STREAMLINE_ENABLED) endif() +if(HEAP_PROFILING) + # enable heap profiling for everything except for referencetests + if(NOT ${PROJECT_NAME} STREQUAL "referencetests") + find_path(HEAP_PROFILER_INCLUDE gperftools/heap-profiler.h + PATHS ${GPERFTOOLS_ROOT}/include + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + include_directories(SYSTEM "${HEAP_PROFILER_INCLUDE}") + find_library(GPERF_TOOLS_LIBRARY + NAMES tcmalloc_debug + HINTS ${GPERFTOOLS_ROOT}/lib) + link_directories(${GPERFTOOLS_ROOT}/lib) + + link_libraries(${GPERF_TOOLS_LIBRARY}) + add_definitions("-DARMNN_HEAP_PROFILING_ENABLED=1") + else() + message("Heap profiling is disabled for referencetests") + endif() +else() + # Valgrind only works with gperftools version number <= 2.4 + CHECK_INCLUDE_FILE(valgrind/memcheck.h VALGRIND_FOUND) +endif() + + +if(NOT BUILD_CAFFE_PARSER) + message(STATUS "Caffe parser support is disabled") +endif() + +if(NOT BUILD_TF_PARSER) + message(STATUS "Tensorflow parser support is disabled") +endif() + -- cgit v1.2.1