Repository navigation
feat(rocprofiler-sdk): Add delayed start options - #11736
Merged
Merged
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
ApoKalipse-V
force-pushed
the
users/gbaraldi/delaystart
branch
from
September 17, 2026 01:12
1c960bf to
55de296
Compare
ApoKalipse-V
force-pushed
the
users/gbaraldi/delaystart
branch
from
September 21, 2026 13:40
55de296 to
60ed5c9
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Enum-string metadata is incomplete, and the published ALL API name conflicts with the described NODELAY contract.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds configurable ATT resource initialization, defaulting to deferred allocation on the first code-object load while preserving eager HSA initialization.
Changes:
- Adds public API and
rocprofv3resource-mode options. - Implements deferred per-GPU resource creation and pending device-trace starts.
- Adds unit, launcher, integration, and documentation coverage.
| File | Description |
|---|---|
tests/rocprofv3/advanced-thread-trace/CMakeLists.txt |
Adds code-object-mode integration coverage. |
thread_trace/tests/att_packet_test.cpp |
Tests configuration and deferred lifecycle behavior. |
thread_trace/service.cpp |
Validates and maps resource modes. |
thread_trace/core.hpp |
Adds mode state and deferred-start helpers. |
thread_trace/core.cpp |
Implements lazy resource allocation. |
rocprofiler-sdk-tool/tool.cpp |
Passes the configured mode to the SDK. |
rocprofiler-sdk-tool/config.hpp |
Stores and serializes mode configuration. |
rocprofiler-sdk-tool/config.cpp |
Parses resource-mode environment values. |
experimental/thread-trace/core.h |
Defines the public resource-mode API. |
cxx/enum_string.hpp |
Adds resource-mode labels. |
docs/rocprofv3_input_schema.json |
Adds input-schema support. |
docs/how-to/using-thread-trace.rst |
Documents the CLI option. |
docs/api-reference/thread_trace.rst |
Documents API modes and semantics. |
bin/tests/test_att_resource_mode.py |
Tests CLI and input-file forwarding. |
bin/tests/CMakeLists.txt |
Registers launcher tests. |
bin/rocprofv3.py |
Adds CLI parsing and environment forwarding. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
venkat1361
reviewed
Sep 25, 2026
venkat1361
approved these changes
Sep 25, 2026
cursor Bot
pushed a commit
that referenced
this pull request
Sep 26, 2026
Resolves the conflict with #11736 (thread trace delayed start options) in thread_trace/core.cpp: keep develop's null check on the start packet, which is now absent until the agent's first code object loads, ahead of this branch's owner tagging.
cursor Bot
pushed a commit
that referenced
this pull request
Sep 26, 2026
…eue hook tests Since #11736 a dispatch thread-trace context defers its queue and packet factory until the agent's first code object loads. The queue hook tests dispatch on fake queues that never load one, so no start packet was injected and three of them failed. Request RESOURCE_MODE_HSA for the tests that expect a packet. Co-authored-by: Vivek Kale <vivek.kale@amd.com>
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
Thread trace creates hsa or kfd queues for every ROCR_VISIBLE_DEVICES.
For applications spanning dozens of processes, it results in too many queues being created.
This PR adds an API option, and accompanying rocprofv3 option, to define how to initialize thread trace resources. For example:
Delays queue creation until the first code object is uploaded, therefore not creating queues in GPUs never used, while
Keeps the old hsa-based initialization behavior.
A few more initializer options are added to the API for future proofing, but are not implemented yet. Particularly, 'ALL' initializer allocates all resources without waiting for any runtime specific callbacks, depending only on KFD.
JIRA ID : AIPROFSDK-1147
JIRA ID : ROCM-30915
Submission Checklist