Repository navigation
feat(rocprofiler-sdk): enable ATT (Advanced Thread Trace) on WSL - #12634
Merged
Merged
Conversation
The thread_trace and kernel_replay samples and the advanced-thread-trace,
att-consecutive-kernels and roctx-pause-resume/att tests each carried a
copy of the same find_library + find_package_handle_standard_args block,
and every copy searched only ${ROCM_PATH}. A decoder that is not installed
under ROCm, such as a standalone decoder build used on WSL2, was therefore
never found and the thread trace tests were skipped.
Move the lookup into rocprofiler_sdk_find_trace_decoder() in
rocprofiler-sdk-utilities.cmake and use it from all five places. The macro
searches ROCPROFILER_SDK_TRACE_DECODER_ROOT ahead of ${ROCM_PATH}; with the
variable unset the search is the same as before.
…s unsupported --att-no-intercept programs multi-buffer thread trace, which aqlprofile implements only for MI3xx and gfx12 and rejects with "Not supported" elsewhere, so the test timed out on other architectures such as gfx11. Gate it and its validate test on rocprofiler_sdk_sqtt_triple_buffer_disabled, the check the triple-buffer thread trace tests already use.
--att works on WSL2: without /dev/kfd ROCprofiler-SDK takes the thread trace buffers, signals and copies from the HSA runtime. Describe how the decoder is located (--att-library-path, ROCPROF_ATT_LIBRARY_PATH, and ROCPROFILER_SDK_TRACE_DECODER_ROOT for the tests and samples), note that --selected-regions produced empty traces on WSL2, and narrow "Not covered on WSL2" to PC sampling and SPM.
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
ApoKalipse-V
approved these changes
Oct 2, 2026
bgopesh
approved these changes
Oct 5, 2026
Contributor
TheRock Submodule Bump ActivityNewest first
|
1 task done
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Enable rocprofv3 thread trace (
--att) support on WSL2, completing the ATT portion of the WSL2 enablement introduced in #7016.Previously, the ATT samples and tests only searched
${ROCM_PATH}forrocprof-trace-decoder. As a result, separately built decoders could not be detected, causing the corresponding ATT tests to be skipped.Technical Details
Shared decoder lookup: Added a new
rocprofiler_sdk_find_trace_decoder()macro torocprofiler-sdk-utilities.cmake, replacing five duplicatedfind_libraryblocks across the ATT samples and tests. The lookup now searchesROCPROFILER_SDK_TRACE_DECODER_ROOTbefore${ROCM_PATH}. IfROCPROFILER_SDK_TRACE_DECODER_ROOTis not set, the existing behavior remains unchanged.att-no-intercepttest gating: This test requires multi-buffer thread trace support, which is currently available only on MI3xx and gfx12. On unsupported platforms, the test could time out. It now uses the existingrocprofiler_sdk_sqtt_triple_buffer_disabled()check to skip the test where multi-buffer support is unavailable.WSL2 documentation: Added a Thread trace (ATT) section to the WSL2 how-to covering:
/dev/kfdis unavailable--selected-regionslimitation on WSL2ATT has also been removed from the Not covered on WSL2 section.
No C++ changes are included in this PR.
Validation
Validated
rocprofv3 --atton the following WSL2 platform:gfx1150(RDNA 3.5)ATT trace collection and decoding were verified successfully on this configuration.
No C++ changes are included in this PR.
Issue Tracking
JIRA ID: ROCM-23912
Test Plan
WSL2, gfx1150 (no
/dev/kfd), ROCr/librocdxg/SDK built from this branch, rocprof-trace-decoder 0.2.2 found viaROCPROFILER_SDK_TRACE_DECODER_ROOT.ctest -R 'att|thread-trace|thread_trace'rocprofv3 --att --kernel-trace -- simple-transposeTest Result
thread-trace-sampleand rocattach 12/12 pass;att-no-interceptis now Disabled on gfx1150.rocprofv3 --att: both dispatches captured and decoded.unit.thread_trace.*caused by the ctest-bakedLD_LIBRARY_PATH(they pass when run directly), and theatt-marker-tracevalidate (--selected-regionsgives an empty trace on WSL2, documented).Submission Checklist