Skip to content

Commit a758647

Browse files
committed
Adapt to location of rocprofiler.h in ROCm 2.1
1 parent 9d8c88b commit a758647

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

CMakeModules/GPA-HSA.cmake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ if(${GPA_ALL_OPEN_SOURCE})
1818
"/opt/rocm/hsa/include/hsa")
1919
endif()
2020

21-
# ROCm path
22-
find_file(ROCM_PATH "rocprofiler.h"
23-
HINTS "/opt/rocm/include"
21+
# ROCProfiler header
22+
find_file(ROCP_HEADER "rocprofiler.h"
23+
HINTS "/opt/rocm/include/rocprofiler" "/opt/rocm/include"
2424
NO_DEFAULT_PATH)
25-
if(${ROCM_PATH} STREQUAL "ROCM_PATH-NOTFOUND")
26-
message("CMake: ROCm Profiler not found")
25+
if(${ROCP_HEADER} STREQUAL "ROCP_HEADER-NOTFOUND")
26+
message("CMake: ROCm Profiler header not found")
2727
else()
28+
get_filename_component(ROCP_PATH ${ROCP_HEADER} DIRECTORY)
2829
set(ADDITIONAL_INCLUDE_DIRECTORIES ${ADDITIONAL_INCLUDE_DIRECTORIES}
29-
"/opt/rocm/include")
30+
${ROCP_PATH})
3031
endif()
3132
endif()
3233
else()
3334
include(${CMAKE_COMMON_LIB_GLOBAL_AMD_HSA_NO_LIB})
34-
endif()
35+
endif()

0 commit comments

Comments
 (0)