Add function args serialization to RCCL buffer records #184
Closed
systems-assistant[bot] wants to merge 8 commits into
Closed
Add function args serialization to RCCL buffer records #184systems-assistant[bot] wants to merge 8 commits into
systems-assistant[bot] wants to merge 8 commits into
Conversation
systems-assistant
Bot
requested review from
MythreyaK,
SrirakshaNag,
ammarwa,
bgopesh,
bwelton,
jrmadsen and
t-tye
as code owners
August 7, 2025 22:43
abchoudh-amd
pushed a commit
that referenced
this pull request
Aug 8, 2025
* Initialize extremes to max and min values * Address review comment * Adding clang format [ROCm/rocprofiler-sdk commit: 90ae424]
MythreyaK
force-pushed
the
import/develop/ROCm_rocprofiler-sdk/mkuriche_rccl-api-args
branch
10 times, most recently
from
September 8, 2025 20:45
a942283 to
6e78ba0
Compare
MythreyaK
force-pushed
the
import/develop/ROCm_rocprofiler-sdk/mkuriche_rccl-api-args
branch
from
September 9, 2025 20:05
6e78ba0 to
67fdb0c
Compare
Member
|
PR waiting for IOMMU support on CI. |
ammallya
pushed a commit
that referenced
this pull request
Jan 21, 2026
ammallya
pushed a commit
that referenced
this pull request
Jan 21, 2026
[ROCm/rocshmem commit: 96336da]
Contributor
|
@MythreyaK Can we update this PR? |
MythreyaK
removed request for
SrirakshaNag,
ammarwa,
bgopesh,
bwelton,
jrmadsen and
t-tye
May 7, 2026 16:12
Member
|
Closing, will reopen with a rebase/updates soon. |
Member
|
(do not delete branch) |
dgaliffiAMD
added a commit
that referenced
this pull request
Jun 27, 2026
…7618) ## Motivation <!-- Explain the purpose of this PR and the goals it aims to achieve. --> This is the improved other half of #6116 `ROCPROFSYS_TRACE_LEGACY` encodes information that is missing from debug args when trace cache is used. For example, with `pthread_create`, we currently see: <img width="764" height="105" alt="image" src="https://github.com/user-attachments/assets/5b21f817-565f-4628-b546-787d3c51c3a2" /> But with `ROCPROFSYS_TRACE_LEGACY=ON`, we see: <img width="766" height="198" alt="image" src="https://github.com/user-attachments/assets/b591831e-c867-475c-ac44-908ae9588495" /> There is a clear disconnect. ## Technical Details <!-- Explain the changes along with any relevant GitHub links. --> `category_region.hpp` Cache gotcha/perfetto region arguments into the trace cache. Category-independent helpers now live in a policy-templated helper `rocprofsys::utility::category_region<Policy>`, composed by `category_region<CategoryT>` via using `region_cache = utility::category_region<>`. The cache lifecycle's system seams (clock, trace-cache sink, thread metadata) are injected as value members through a Policy bundle - `serialize_name_value_pairs`: serializes the gotcha {"name", value} pairs into the wire format (idx;;type;;name;;value;;). - `serialize_annotation_args / serialize_return_arg`: serialize gotcha audit arguments (synthesized arg{N}-{type} names) and return values. - `has_trace_cache_arg_pairs_v`: detects the gotcha pair convention (even count, string-like name slots). - `next_arg_index`: derives the next index from the last record instead of storing a count. - `renumber_serialized_args`: renumbers an appended batch in a single string pass. - The above are static helpers; the stateful cache lifecycle (`cache_start` / `cache_stop` / `append_cache_args` / `flush_pending_cached_entries`) are instance methods reached through a per-thread `instance()`. - `append_cache_args`: appends a batch to the open entry (adopts the first batch as-is, else renumbers). - `start / start_with_args` now funnel through one start_impl. - Hooked gotcha audit incoming/outgoing paths to cache argument and return values. `regions.cpp`: - Adjust `flush` call signature. Added unit tests Added pytests - two new binaries: `annotations.cpp` and `pthread.cpp`. The first tests perfetto annotations and the second verifies that gotcha arguments are captured. - Both ROCpd and perfetto outputs are verified. **OTHER** `test_shmem_gotcha.cpp`: Drop `name` and `[this]`. It was causing workflow to fail: https://github.com/ROCm/rocm-systems/actions/runs/27972186388/job/82780906185 ## JIRA ID <!-- If applicable, mention the JIRA ID resolved by this PR (Example: Resolves SWDEV-12345). --> <!-- Do not post any JIRA links here. --> Jira ID : AIPROFSYST-519 ## Test Plan New unit tests New pytests: ``` minimal-pthreads-binary-rewrite minimal-pthreads-runtime-instrument minimal-pthreads-sys-run ``` <!-- Explain any relevant testing done to verify this PR. --> ## Test Result Unit tests pass: ``` Note: Google Test filter = category_region* [==========] Running 29 tests from 3 test suites. ... [----------] Global test environment tear-down [==========] 38 tests from 4 test suites ran. (0 ms total) [ PASSED ] 38 tests. ``` New pytests pass: ``` Start 182: minimal-pthreads-binary-rewrite 2/5 Test #182: minimal-pthreads-binary-rewrite ....... Passed 5.19 sec Start 183: minimal-pthreads-runtime-instrument 3/5 Test #183: minimal-pthreads-runtime-instrument ... Passed 6.69 sec Start 184: minimal-pthreads-sys-run 4/5 Test #184: minimal-pthreads-sys-run .............. Passed 2.14 sec ``` For `pthreads`: <img width="817" height="209" alt="image" src="https://github.com/user-attachments/assets/fa1330b8-aab7-4141-bb85-96d789da1f6e" /> <!-- Briefly summarize test outcomes. --> ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --------- Co-authored-by: David Galiffi <David.Galiffi@amd.com>
4 tasks
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.
PR Details
Adds RCCL function parameter serialization. Requested by RCCL team.
No ticket yet, but they asked if nvtx ranges were supported. This request is not in this ticket / pr, but wanted to add this here.
Associated Jira Ticket Number/Link
SWDEV-528449
SWDEV-527517
What type of PR is this? (check all applicable)
Technical details
Adds RCCL function parameter serialization
Added/updated tests?
Updated CHANGELOG?
Added/Updated documentation?
🔁 Imported from ROCm/rocprofiler-sdk#129
🧑💻 Originally authored by @rocm-devops