Allow events to be grouped by HIP stream ID (#274)

- Corelate memory_copy and kernel_dispatch events with their HIP stream_id and add stream_id as an annotation in Perfetto.
- By default, group memory_copy and kernel_dispatch events in Perfetto output by their stream_id.
- Add option, with the configuration setting ROCPROFSYS_ROCM_GROUP_BY_QUEUE, to group by HSA queue instead.

---------

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Co-authored-by: David Galiffi <David.Galiffi@amd.com>

[ROCm/rocprofiler-systems commit: 4b4a846b58]
This commit is contained in:
ajanicijamd
2025-07-23 21:28:26 -04:00
committed by GitHub
parent 0b57805e20
commit e2fc692ee0
11 changed files with 416 additions and 120 deletions
@@ -532,7 +532,7 @@ function(ROCPROFILER_SYSTEMS_ADD_TEST)
cmake_parse_arguments(
TEST
"SKIP_BASELINE;SKIP_SAMPLING;SKIP_REWRITE;SKIP_RUNTIME"
"NAME;TARGET;MPI;GPU;NUM_PROCS;SAMPLING_TIMEOUT;REWRITE_TIMEOUT;RUNTIME_TIMEOUT"
"NAME;TARGET;MPI;GPU;NUM_PROCS;SAMPLING_TIMEOUT;REWRITE_TIMEOUT;RUNTIME_TIMEOUT;WILL_FAIL;DISABLED"
"${_KWARGS}"
${ARGN}
)
@@ -584,6 +584,14 @@ function(ROCPROFILER_SYSTEMS_ADD_TEST)
set(TEST_SAMPLING_TIMEOUT 120)
endif()
if(NOT TEST_DISABLED)
set(TEST_DISABLED OFF)
endif()
if(NOT TEST_WILL_FAIL)
set(TEST_WILL_FAIL OFF)
endif()
if(NOT DEFINED TEST_ENVIRONMENT OR "${TEST_ENVIRONMENT}" STREQUAL "")
set(TEST_ENVIRONMENT "${_test_environment}")
endif()
@@ -777,6 +785,8 @@ function(ROCPROFILER_SYSTEMS_ADD_TEST)
PASS_REGULAR_EXPRESSION "${${_PASS_REGEX}}"
FAIL_REGULAR_EXPRESSION "${${_FAIL_REGEX}}"
SKIP_REGULAR_EXPRESSION "${${_SKIP_REGEX}}"
WILL_FAIL ${TEST_WILL_FAIL}
DISABLED ${TEST_DISABLED}
${_props}
)
endif()