Skip to content

[rocpd] Adding merge and package submodules for rocpd#164

Merged
yhuiYH merged 21 commits into
developfrom
import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package
Nov 12, 2025
Merged

[rocpd] Adding merge and package submodules for rocpd#164
yhuiYH merged 21 commits into
developfrom
import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package

Conversation

@systems-assistant

@systems-assistant systems-assistant Bot commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

PR Details

Add merge.py and package.py python modules for rocpd to try to reduce the number of databases to manage, as well as consolidating the databases into a folder, to move around easier.

Associated Jira Ticket Number/Link

SWDEV-547026

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Continuous Integration

Technical details

  • Adding ability to merge multiple databases into one.
  • Defines a new .rpdb folder aka package, which contains an index.yaml metadatafile.
  • Creation of package
    • default, create index.yaml in current location that simply references where the files relative to current folder (use case: don't need to copy large files, just reference them where they are)
    • If --consolidate is requested, creates a new unique folder and copies the DBs into that folder/package.
    • Default is to MOVE DBs when --consolidate is passed in, provided user with a --copy option to allow user to keep original data unmodified.
  • Use of package
    • Provides function to parse/flatten the yaml file back to the list of database files
    • When flattening yaml file, if the number of databases provided exceed IDEAL_NUMBER_OF_DATABASE_FILES (currently 5), auto merge them. UPDATE: Jonathan wants to always auto-merge to 1 DB. So we created ability for user to pass in parameter --automerge-limit to raise this limit.
    • Auto-merge will create new package/folder and merge the DBs into suitable number, and inform the user DBs were auto-merged and provide them with new DB path they CAN use
    • Auto-merge is disabled for merge and package submodules if the user is using it directly, because they often don't want auto-merge algorithm interfering with what they want to do.

Added/updated tests?

  • Yes
  • No, Does not apply to this PR.

Updated CHANGELOG?

  • Yes
  • No, Does not apply to this PR.

Added/Updated documentation?

  • Yes
  • No, Does not apply to this PR.

🔁 Imported from ROCm/rocprofiler-sdk#106
🧑‍💻 Originally authored by @rocm-devops

@systems-assistant systems-assistant Bot requested a review from jrmadsen as a code owner August 7, 2025 19:16
@systems-assistant systems-assistant Bot requested a review from t-tye as a code owner August 7, 2025 19:16
ammallya pushed a commit that referenced this pull request Aug 7, 2025
use internal cluster for ci

[ROCm/aqlprofile commit: fdedcfc]
ywang103-amd pushed a commit to ywang103-amd/rocm-systems that referenced this pull request Aug 7, 2025
@yhuiYH yhuiYH marked this pull request as draft August 13, 2025 17:52
@ammarwa

ammarwa commented Aug 16, 2025

Copy link
Copy Markdown
Collaborator

Code Coverage Report

Code Coverage Report

Tests Only

code coverage tests.png

Samples Only

code coverage samples.png

Tests + Samples

code coverage all.png

@yhuiYH yhuiYH force-pushed the import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package branch 2 times, most recently from 6612e41 to 27edabf Compare August 26, 2025 05:53
@yhuiYH yhuiYH marked this pull request as ready for review August 26, 2025 05:56
Comment thread projects/rocprofiler-sdk/source/lib/python/rocpd/merge.py Outdated
Comment thread projects/rocprofiler-sdk/source/lib/python/rocpd/package.py
Comment thread projects/rocprofiler-sdk/source/lib/python/rocpd/merge.py Outdated
@bgopesh bgopesh force-pushed the import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package branch from 3203549 to 58fff90 Compare August 29, 2025 04:48
@yhuiYH yhuiYH force-pushed the import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package branch from 0981616 to 2264461 Compare September 9, 2025 00:48
yhuiYH and others added 14 commits November 10, 2025 12:15
- Improve handling more corner cases for bad input files when parsing input parameters (bad yaml files, bad .rpdb folder, folders as input)
- Changed to use UUID in merged filename instead of the time, in auto-merge algorithm
…, recreating indexes, foreign key check (disabled for now, due to processing time)
- add_args function returns a functor which accepts input and args
- time_window functor returned from add_args automatically applies time windowing of input
- copying can be enabled by passing "copy=True" or --copy cmdline argument
@jrmadsen jrmadsen force-pushed the import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package branch from 26181a6 to 3c72c4c Compare November 10, 2025 18:15
… 1. Tests updated to use query, much quicker
@yhuiYH yhuiYH removed the WIP label Nov 11, 2025
@yhuiYH yhuiYH merged commit 061948a into develop Nov 12, 2025
28 of 43 checks passed
@yhuiYH yhuiYH deleted the import/develop/ROCm_rocprofiler-sdk/yhui_rocpd-merge-and-package branch November 12, 2025 22:07
systems-assistant Bot pushed a commit to ROCm/rocprofiler-sdk that referenced this pull request Nov 12, 2025
* adding ROCpd database merge

* adding ROCpd database merge concatenating all tables

* update merge script

  - copy all tables from files

* fix merge format

* Add package submodule, initial POC.  Need to refine

* Minor fixes and clean up duplicated code in package.py

* Revamp metadata layout, add wildcard and .rpdb parsing

* Add auto merge & package when > 5 DBs, add examples, don't use auto_merge when using sub-commands merge & package

* - Extend package/yaml inputs to all rocpd modules
- Improve handling more corner cases for bad input files when parsing input parameters (bad yaml files, bad .rpdb folder, folders as input)
- Changed to use UUID in merged filename instead of the time, in auto-merge algorithm

* Minor text fixes for consistancy between modules

* Add more wildcard support and add package, merge tests

* Make changes based on review suggestions

* Move parsing packages into importer.py, simplified adding required params to a function

* fix package test by flattening input list before processing

* Integrate merge.py changes from Jonathan to add name-collision checks, recreating indexes, foreign key check (disabled for now, due to processing time)

* Rework rocpd.<submodule>.{add_args,process_args}

- add_args function returns a functor which accepts input and args
- time_window functor returned from add_args automatically applies time windowing of input

* change merge&package limit to 1, merge should create data views

* Move files by default instead of making copies

- copying can be enabled by passing "copy=True" or --copy cmdline argument

* refactor package to make the logic cleaner, set merge limit back to 5

* Allow automerge-limit param to override limit, change default back to 1.  Tests updated to use query, much quicker

* Update --help instructions for package
[rocm-systems] ROCm/rocm-systems#164 (commit 061948a)
ammallya pushed a commit that referenced this pull request Jan 30, 2026
* rocjpeg - CMake Find updates

* Version file - fix

* Changelog - updates

* Cleanup

* Test - cmakelists updates

* header - minor fix

---------

Co-authored-by: Kiriti <kiriti@santiago.amd.com>
ammallya pushed a commit that referenced this pull request Jan 30, 2026
* rocjpeg - CMake Find updates

* Version file - fix

* Changelog - updates

* Cleanup

* Test - cmakelists updates

* header - minor fix

---------

Co-authored-by: Kiriti <kiriti@santiago.amd.com>

[ROCm/rocjpeg commit: bdb12b5]
ammallya pushed a commit that referenced this pull request Apr 9, 2026
Updates ROCm version used in the CI container to 7.1.1

AMDGPU repo removed as we don't need any packages from that repository
(mostly kernel packages).
ammallya pushed a commit that referenced this pull request Apr 9, 2026
Updates ROCm version used in the CI container to 7.1.1

AMDGPU repo removed as we don't need any packages from that repository
(mostly kernel packages).

[ROCm/hipFile commit: 05eff1c]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.