SWDEV-412496 - treat USE_PROF_API to always be true

Change-Id: I77cfac409215a33d11228a0f2da9ffba63c3d73a
This commit is contained in:
Ioannis Assiouras
2023-07-18 22:57:40 +01:00
parent 295963fe7a
commit cb7776ef07
4 changed files with 8 additions and 37 deletions
+8 -7
View File
@@ -224,9 +224,9 @@ if(USE_PROF_API)
if(NOT ${CPP_HEADER_PARSER} EQUAL 0)
message(FATAL_ERROR "\
The \"CppHeaderParser\" Python3 package is not installed. \
Please install it using the following command: \"pip3 install CppHeaderParser\".\
")
The \"CppHeaderParser\" Python3 package is not installed. \
Please install it using the following command: \"pip3 install CppHeaderParser\".\
")
endif()
add_custom_command(OUTPUT ${PROF_API_STR}
@@ -242,16 +242,15 @@ Please install it using the following command: \"pip3 install CppHeaderParser\".
find_path(PROF_API_HEADER_DIR prof_protocol.h
HINTS
${PROF_API_HEADER_PATH}
${PROF_API_HEADER_PATH}
PATHS
${ROCM_PATH}/roctracer
${ROCM_PATH}/roctracer
PATH_SUFFIXES
include/ext)
include/ext)
if(NOT PROF_API_HEADER_DIR)
message(WARNING "Profiling API header not found. Disabling roctracer integration. Use -DPROF_API_HEADER_PATH=<path to prof_protocol.h header>")
else()
target_compile_definitions(amdhip64 PUBLIC USE_PROF_API=1)
target_include_directories(amdhip64 PUBLIC ${PROF_API_HEADER_DIR})
message(STATUS "Profiling API: ${PROF_API_HEADER_DIR}")
endif()
@@ -259,6 +258,8 @@ Please install it using the following command: \"pip3 install CppHeaderParser\".
add_dependencies(amdhip64 gen-prof-api-str-header)
endif()
target_compile_definitions(amdhip64 PUBLIC USE_PROF_API=1)
add_custom_command(TARGET amdhip64 POST_BUILD COMMAND
${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/.hipInfo ${PROJECT_BINARY_DIR}/lib/.hipInfo)
add_custom_command(TARGET amdhip64 POST_BUILD COMMAND