[Samples] Remove thread trace sample dependency on rocprofiler-sdk-amd-comgr. (#555)
* remove samples dependency on rocprofiler-sdk-amd-comgr. * add find package for amd_comgr. --------- Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
This commit is contained in:
committed by
GitHub
parent
fbe0f65beb
commit
e0901eba28
@@ -21,6 +21,16 @@ project(rocprofiler-sdk-samples-thread-trace LANGUAGES CXX HIP)
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
find_package(rocprofiler-sdk-roctx REQUIRED)
|
||||
find_package(
|
||||
amd_comgr
|
||||
REQUIRED
|
||||
CONFIG
|
||||
HINTS
|
||||
${rocm_version_DIR}
|
||||
${ROCM_PATH}
|
||||
PATHS
|
||||
${rocm_version_DIR}
|
||||
${ROCM_PATH})
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
@@ -44,11 +54,8 @@ target_sources(thread-trace-sample PRIVATE main.cpp agent.cpp)
|
||||
target_link_libraries(
|
||||
thread-trace-sample
|
||||
PUBLIC rocprofiler-sdk::samples-build-flags
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk
|
||||
rocprofiler-sdk::samples-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-dw
|
||||
rocprofiler-sdk-roctx::rocprofiler-sdk-roctx
|
||||
rocprofiler-sdk::rocprofiler-sdk-amd-comgr)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk rocprofiler-sdk::samples-common-library
|
||||
rocprofiler-sdk-roctx::rocprofiler-sdk-roctx amd_comgr)
|
||||
|
||||
add_test(NAME thread-trace-sample COMMAND $<TARGET_FILE:thread-trace-sample>)
|
||||
|
||||
|
||||
@@ -1021,8 +1021,7 @@ write_rocpd(
|
||||
dispatch_evt_ids.at(dispatch_id) = evt_id;
|
||||
|
||||
auto region_name =
|
||||
(corr_id.external.value > 0 &&
|
||||
(enable_duplicate_check || kernel_id > 0))
|
||||
(corr_id.external.value > 0 && (enable_duplicate_check || kernel_id > 0))
|
||||
? tool_metadata.get_kernel_name(kernel_id, corr_id.external.value)
|
||||
: std::string_view{};
|
||||
|
||||
@@ -1088,7 +1087,7 @@ write_rocpd(
|
||||
dispatch_data.end_timestamp, // end_timestamp
|
||||
info.grid_size, // grid
|
||||
info.workgroup_size, // workgroup
|
||||
false // enable_duplicate_check
|
||||
false // enable_duplicate_check
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user