Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ROCM_PATH to look for roctracer/roctx. Fixes #637 #639

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ if (WITH_ROCTX OR WITH_ROCM)
list(APPEND CALIPER_EXTERNAL_LIBS ${ROCTX_LIBRARIES})
else()
message(WARNING "RocTX support requested but ROCm was not found!\n"
"Set ROCM_PREFIX to installation path and re-run cmake.")
"Set ROCM_PATH to installation path and re-run cmake.")
endif()
endif()

Expand All @@ -392,7 +392,7 @@ if (WITH_ROCTRACER OR WITH_ROCM)
list(APPEND CALIPER_EXTERNAL_LIBS ${ROCTRACER_LIBRARIES})
else()
message(WARNING "RocTracer support requested but ROCm was not found!\n"
"Set ROCM_PREFIX to installation path and re-run cmake.")
"Set ROCM_PATH to installation path and re-run cmake.")
endif()
endif()

Expand Down
6 changes: 3 additions & 3 deletions cmake/FindRocTX.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Find RocTX libraries/headers

find_path(ROCM_ROOT_DIR
find_path(ROCM_PATH
NAMES include/roctracer/roctx.h
)

find_library(ROCTX_LIBRARIES
NAMES roctx64
HINTS ${ROCM_ROOT_DIR}/lib
HINTS ${ROCM_PATH}/lib
)

find_path(ROCTX_INCLUDE_DIRS
NAMES roctx.h
HINTS ${ROCM_ROOT_DIR}/include/roctracer
HINTS ${ROCM_PATH}/include/roctracer
)

include(FindPackageHandleStandardArgs)
Expand Down
16 changes: 8 additions & 8 deletions cmake/FindRoctracer.cmake
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# Find ROCTracer libraries/headers

find_path(ROCM_ROOT_DIR
find_path(ROCM_PATH
NAMES include/roctracer/roctracer.h
)

find_library(ROCTRACER_LIBROCTRACER
NAMES roctracer64
HINTS ${ROCM_ROOT_DIR}/lib
HINTS ${ROCM_PATH}/lib
)
find_library(ROCTRACER_LIBHSARUNTIME
NAMES hsa-runtime64
HINTS ${ROCM_ROOT_DIR}/lib
HINTS ${ROCM_PATH}/lib
)
find_library(ROCTRACER_LIBHSAKMT
NAMES hsakmt
HINTS ${ROCM_ROOT_DIR}/lib
HINTS ${ROCM_PATH}/lib
)
find_library(ROCTRACER_LIBHSAKMT
NAMES hsakmt
HINTS ${ROCM_ROOT_DIR}/lib
HINTS ${ROCM_PATH}/lib
)
find_library(ROCTRACER_AMDHIP64
NAMES amdhip64
HINTS ${ROCM_ROOT_DIR}/lib
HINTS ${ROCM_PATH}/lib
)

find_path(ROCTRACER_INCLUDE_DIR
NAMES roctracer.h
HINTS ${ROCM_ROOT_DIR}/include/roctracer
HINTS ${ROCM_PATH}/include/roctracer
)

find_path(HIP_INCLUDE_DIR
NAMES hip/hip_runtime.h
HINTS ${ROCM_ROOT_DIR}/include)
HINTS ${ROCM_PATH}/include)

set(ROCTRACER_INCLUDE_DIRS
${ROCTRACER_INCLUDE_DIR}
Expand Down