-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from uliegecsm/rocprofiler-sdk-roctx
feat(roctxconnector): link `rocprofiler-sdk-roctx` as of `ROCm` 6.2
- Loading branch information
Showing
3 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
find_library(ROCM_ROCTX_LIB roctx64 REQUIRED HINTS $ENV{ROCM_PATH}/lib) | ||
find_path(ROCM_ROCTX_INCLUDE roctx.h REQUIRED HINTS $ENV{ROCM_PATH}/include/roctracer) | ||
|
||
kp_add_library(kp_roctx_connector kp_roctx_connector.cpp) | ||
|
||
target_include_directories(kp_roctx_connector PRIVATE ${ROCM_ROCTX_INCLUDE}) | ||
target_link_libraries(kp_roctx_connector PRIVATE ${ROCM_ROCTX_LIB}) | ||
# As of ROCm 6.2, it is recommended to use ROCtx provided by rocprofiler-sdk-roctx | ||
# instead of the "old" one provided by roctracer. | ||
# | ||
# See also: https://rocm.docs.amd.com/projects/rocprofiler-sdk/en/amd-mainline/how-to/using-rocprofv3.html | ||
find_package(rocprofiler-sdk-roctx CONFIG PATHS $ENV{ROCM_PATH}) | ||
if(rocprofiler-sdk-roctx_FOUND) | ||
target_link_libraries(kp_roctx_connector PRIVATE rocprofiler-sdk-roctx::rocprofiler-sdk-roctx) | ||
else() | ||
find_library(ROCM_ROCTX_LIB roctx64 REQUIRED HINTS $ENV{ROCM_PATH}/lib) | ||
find_path(ROCM_ROCTX_INCLUDE roctx.h REQUIRED HINTS $ENV{ROCM_PATH}/include/roctracer) | ||
|
||
target_include_directories(kp_roctx_connector PRIVATE ${ROCM_ROCTX_INCLUDE}) | ||
target_link_libraries(kp_roctx_connector PRIVATE ${ROCM_ROCTX_LIB}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters