[rocpd] Refactor to use python to convert rocpd to CSV + add CSV tests + remove old cpp implementation#159
Merged
yhuiYH merged 44 commits intoSep 19, 2025
Conversation
ammallya
pushed a commit
that referenced
this pull request
Aug 7, 2025
* Adding Roctx usage doc * updated CHANGELOG * dpc update * Fixing Related Pages issue * updating doc * updating docs * Adding Resource naming section * Fixed Formatting * format fix * format fix * Fixing build due to incorrect indentation [ROCm/rocprofiler-sdk commit: 12508b9]
ywang103-amd
pushed a commit
to ywang103-amd/rocm-systems
that referenced
this pull request
Aug 7, 2025
…inx (ROCm#159) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.18.1 to 1.18.2. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.18.1...v1.18.2) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-version: 1.18.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> [ROCm/rocprofiler-systems commit: 7f2b198]
systems-assistant Bot
pushed a commit
that referenced
this pull request
Aug 10, 2025
…evice Heap kernels (#159)
547b8cf to
14fd46e
Compare
Collaborator
yhuiYH
reviewed
Aug 12, 2025
yhuiYH
reviewed
Aug 13, 2025
yhuiYH
previously approved these changes
Aug 13, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the rocpd CSV generation functionality from C++ to Python, adding comprehensive CSV testing and removing the old C++ implementation. The refactor aims to simplify the codebase by leveraging Python for CSV generation while maintaining the same output format.
Key Changes:
- Replaced C++ CSV generation with Python implementation using SQL queries
- Added comprehensive CSV validation tests that compare CSV output with JSON data
- Removed old C++ CSV-related files and CMake configurations
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/rocprofiler-sdk/tests/rocprofv3/rocpd/validate.py | Added test_csv_data function for validating CSV output against JSON data |
| projects/rocprofiler-sdk/tests/rocprofv3/rocpd/conftest.py | Added csv_data fixture to handle CSV input files for testing |
| projects/rocprofiler-sdk/tests/rocprofv3/rocpd/CMakeLists.txt | Updated test command to include CSV files in validation |
| projects/rocprofiler-sdk/tests/pytest-packages/tests/rocprofv3.py | Added comprehensive CSV validation logic with time sanity checks and data matching |
| projects/rocprofiler-sdk/source/lib/python/rocpd/source/csv.hpp | Removed C++ CSV header file |
| projects/rocprofiler-sdk/source/lib/python/rocpd/source/csv.cpp | Removed C++ CSV implementation file |
| projects/rocprofiler-sdk/source/lib/python/rocpd/source/CMakeLists.txt | Updated source lists to exclude CSV C++ files |
| projects/rocprofiler-sdk/source/lib/python/rocpd/libpyrocpd.cpp | Removed C++ write_csv function binding |
| projects/rocprofiler-sdk/source/lib/python/rocpd/csv.py | Added complete Python CSV generation implementation with SQL-based queries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
jrmadsen
requested changes
Aug 13, 2025
36bfe80 to
ae50865
Compare
yhuiYH
reviewed
Aug 14, 2025
73dba93 to
c324883
Compare
…kae_csv_python_writer
systems-assistant Bot
pushed a commit
to ROCm/rocprofiler-sdk
that referenced
this pull request
Sep 19, 2025
CSV tests + remove old cpp implementation (#159) * Write agent info to CSV * Write kernel to CSV * Write memory copy to CSV * Write memory allocation to CSV * Write hip api to CSV * Write hsa api to CSV * Write marker api to CSV * Write counters to CSV * Write scratch memory to CSV * Write rccl api to CSV * Write rocdecode api to CSV * Write rocjpeg api to CSV * Remove info_process joins * Format agent id * Compose full file name is sql writer function * Add missing fields to kernel traces csv * Rename vgpr_count to arch_vgpr_count * Fix kernel name * Skip empty query results * Format csv.py * Delete c++ CSV writer * Add CSV header comparison test * Fix comment spacing in csv.py * Change ALLOC to ALLOCATE in memory allocation writer * Do not append trace to agent info file name * Revert changes for VGPR_Count * Fix csv validation test * Add sorting by guid * Use EXISTS to check query results are not empty * Merge API-specific queries * Optimize regions query * Column name mapping for agent info * Pass config to sql writer * Move agent id string building to a separate function * add titled_headers argument * Remove titled-columns argument * Improvements for regions csv * fix CSV validation test * improve CSV validation test * remove roctxMarkA from csv validation test * fix capability field titles in agent info * remove filter.py from query as that is still experimental * Remove some aliases, now that query will auto-title the column headers [rocm-systems] ROCm/rocm-systems#159 (commit 3f001b0)
sauverma93
pushed a commit
that referenced
this pull request
Sep 26, 2025
…s + remove old cpp implementation (#159) * Write agent info to CSV * Write kernel to CSV * Write memory copy to CSV * Write memory allocation to CSV * Write hip api to CSV * Write hsa api to CSV * Write marker api to CSV * Write counters to CSV * Write scratch memory to CSV * Write rccl api to CSV * Write rocdecode api to CSV * Write rocjpeg api to CSV * Remove info_process joins * Format agent id * Compose full file name is sql writer function * Add missing fields to kernel traces csv * Rename vgpr_count to arch_vgpr_count * Fix kernel name * Skip empty query results * Format csv.py * Delete c++ CSV writer * Add CSV header comparison test * Fix comment spacing in csv.py * Change ALLOC to ALLOCATE in memory allocation writer * Do not append trace to agent info file name * Revert changes for VGPR_Count * Fix csv validation test * Add sorting by guid * Use EXISTS to check query results are not empty * Merge API-specific queries * Optimize regions query * Column name mapping for agent info * Pass config to sql writer * Move agent id string building to a separate function * add titled_headers argument * Remove titled-columns argument * Improvements for regions csv * fix CSV validation test * improve CSV validation test * remove roctxMarkA from csv validation test * fix capability field titles in agent info * remove filter.py from query as that is still experimental * Remove some aliases, now that query will auto-title the column headers --------- Co-authored-by: Aleksei Tumakaev <atumakae@amd.com> Co-authored-by: Young Hui <young.hui@amd.com> Co-authored-by: Young Hui - AMD <145490163+yhuiYH@users.noreply.github.com>
ryang-amd
pushed a commit
that referenced
this pull request
Nov 7, 2025
…s + remove old cpp implementation (#159) * Write agent info to CSV * Write kernel to CSV * Write memory copy to CSV * Write memory allocation to CSV * Write hip api to CSV * Write hsa api to CSV * Write marker api to CSV * Write counters to CSV * Write scratch memory to CSV * Write rccl api to CSV * Write rocdecode api to CSV * Write rocjpeg api to CSV * Remove info_process joins * Format agent id * Compose full file name is sql writer function * Add missing fields to kernel traces csv * Rename vgpr_count to arch_vgpr_count * Fix kernel name * Skip empty query results * Format csv.py * Delete c++ CSV writer * Add CSV header comparison test * Fix comment spacing in csv.py * Change ALLOC to ALLOCATE in memory allocation writer * Do not append trace to agent info file name * Revert changes for VGPR_Count * Fix csv validation test * Add sorting by guid * Use EXISTS to check query results are not empty * Merge API-specific queries * Optimize regions query * Column name mapping for agent info * Pass config to sql writer * Move agent id string building to a separate function * add titled_headers argument * Remove titled-columns argument * Improvements for regions csv * fix CSV validation test * improve CSV validation test * remove roctxMarkA from csv validation test * fix capability field titles in agent info * remove filter.py from query as that is still experimental * Remove some aliases, now that query will auto-title the column headers --------- Co-authored-by: Aleksei Tumakaev <atumakae@amd.com> Co-authored-by: Young Hui <young.hui@amd.com> Co-authored-by: Young Hui - AMD <145490163+yhuiYH@users.noreply.github.com>
ammallya
pushed a commit
that referenced
this pull request
Nov 21, 2025
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
ammallya
pushed a commit
that referenced
this pull request
Nov 21, 2025
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com> [ROCm/amdsmi commit: de6f49b]
ammallya
pushed a commit
that referenced
this pull request
Jan 21, 2026
* Refactor `Barrier_all` and `Sync_all` to use default context - Removed context-specific implementations of barrier_all and sync_all - Added barrier_all and sync_all to the default context implementation - Updated functional tests to use the default context for barrier_all and sync_all * Update `Barrier_all` and `Sync_all` API usage in documentation * Update `CHANGELOG` --------- Co-authored-by: Yiltan <ytemucin@amd.com>
ammallya
pushed a commit
that referenced
this pull request
Jan 21, 2026
* Refactor `Barrier_all` and `Sync_all` to use default context - Removed context-specific implementations of barrier_all and sync_all - Added barrier_all and sync_all to the default context implementation - Updated functional tests to use the default context for barrier_all and sync_all * Update `Barrier_all` and `Sync_all` API usage in documentation * Update `CHANGELOG` --------- Co-authored-by: Yiltan <ytemucin@amd.com> [ROCm/rocshmem commit: bf48bca]
ammallya
pushed a commit
that referenced
this pull request
Jan 30, 2026
…159) * Improve the memory pool logic to enable the reuse of VA-API surfaces. * Update the version
ammallya
pushed a commit
that referenced
this pull request
Apr 9, 2026
ammallya
pushed a commit
that referenced
this pull request
Apr 9, 2026
[ROCm/hipFile commit: 302b5d0]
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
Associated Jira Ticket Number/Link
https://ontrack-internal.amd.com/browse/SWDEV-543953
What type of PR is this? (check all applicable)
Technical details
Added/updated tests?
Updated CHANGELOG?
Added/Updated documentation?
🔁 Imported from ROCm/rocprofiler-sdk#102
🧑💻 Originally authored by @rocm-devops