Skip to content

[rocpd] Schema Updates#347

Open
systems-assistant[bot] wants to merge 32 commits intodevelopfrom
import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates
Open

[rocpd] Schema Updates#347
systems-assistant[bot] wants to merge 32 commits intodevelopfrom
import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates

Conversation

@systems-assistant
Copy link
Contributor

PR Details

Associated Jira Ticket Number/Link

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

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

Technical details

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#118
🧑‍💻 Originally authored by @rocm-devops

@jrmadsen jrmadsen force-pushed the import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates branch from c303613 to 7ddd5da Compare August 14, 2025 16:21
@jrmadsen jrmadsen force-pushed the import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates branch from 7ddd5da to c235cff Compare August 14, 2025 21:31
@jrmadsen jrmadsen force-pushed the import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates branch from c235cff to f5335e5 Compare August 22, 2025 18:05
@jrmadsen jrmadsen requested a review from bgopesh as a code owner August 22, 2025 18:05
Copy link
Contributor

@bwelton bwelton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may have been on the original PR, but can you add some context about why this is being changed and what the effect of the change is?

Comment on lines +149 to +151
for name in tbls:
log(f"Inserting rows into {name} from {alias}.{name}")
conn.execute(f'INSERT INTO "{name}" SELECT * FROM {alias}."{name}"')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for name in tbls:
log(f"Inserting rows into {name} from {alias}.{name}")
conn.execute(f'INSERT INTO "{name}" SELECT * FROM {alias}."{name}"')
for name in tbls:
log(f"Inserting rows into {name} from {alias}.{name}")
rows = conn.execute(f'SELECT * FROM {alias}."{name}"').fetchall()
if rows:
col_count = len(rows[0])
placeholders = ", ".join(["?"] * col_count)
conn.executemany(
f'INSERT INTO "{name}" VALUES ({placeholders})',
rows
)

Looking at merge.py, @bgopesh suggested I change this to a batch operation in my PR. Doing that in your implementation will halve the merge time! I'm looking at ways of incorporating your merge.py with the merge.py that the Silo team wrote in my PR. But this is a good change to pickup.

Comment on lines +229 to +233
# Optional: enforce integrity
try:
conn.execute("PRAGMA quick_check;")
except sqlite3.DatabaseError as e:
log(f"SQLite3 quick_check reported an issue: {e}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This integrity check (I see you have it marked as optional here in the comments) will add a 66%-175% time hit to merge time. It may be better to skip it, or have it as a user-opt-in check (but what user will really want to turn this on?).
ie, merging 2 13MB DBs, merge time goes from 3.67 seconds to 1.33 seconds when we skip this check.
merging 16 13MB DBs, merge time goes from 37.03 seconds to 22.23 second when we skip this check.

@jrmadsen jrmadsen force-pushed the import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates branch 2 times, most recently from be09959 to f1b9797 Compare September 22, 2025 18:41
jrmadsen and others added 23 commits September 29, 2025 14:08
- tool_counter_dimension_instance_info
- category table and category ids
- fix pmc info
- fix summary views (use data views instead of rocpd_views)
- rocpd tables
  - new rocpd_info_category table
  - qualifier field in rocpd_info_pmc
  - new rocpd_info_address_range table
  - new rocpd_info_source_code table
  - new rocpd_info_pc table
  - remove call_stack/line_info JSON blob from rocpd_event
  - new rocpd_line_info table
  - new rocpd_call_stack_table
  - remove rocpd_metadata insert
- rocpd indexes
  - add new indexes
- data views
  - fixes regarding call_stack/line_info/category
  - misc cleanup
- account for category changes
- update serialized records
- rework perfetto implementation
  - category changes
- rework CSV implementation
- support multi-process stable folder naming convention
- add merge submodule
  - combine multiple databases into one
- add functions submodule
  - defines (in Python) such as STDDEV_SAMP
- add/update bindings submodule
  - support using rocpd without Python bindings
  - not all features are supported in pure python yet
- original schema is v3.0.0
- new schema is v4.0.0
- all python classes are CamelCase
- fully implement bindings.py
- fix issues with counter collection in csv.py
- use lds_block_size instead of lds_size
- support using rocpd in RocpdReader
- handle .rpdb files in attachment tests
- cleanup .rpdb files generated in tests
- remove generation of database in tests/rocprofv3/counter-collection/list_metrics
- fix test_csv_data to not ignore roctxMarkA
@jrmadsen jrmadsen force-pushed the import/develop/ROCm_rocprofiler-sdk/jomadsen_rocprofiler-sdk-rocpd-updates branch from b3840d6 to da074da Compare September 29, 2025 19:08
@jrmadsen jrmadsen added the WIP label Sep 30, 2025
ammallya pushed a commit that referenced this pull request Jan 21, 2026
* Change to enable ibgda bitcode compilation

* Apply suggestion from @abouteiller

---------

Co-authored-by: Aurelien Bouteiller <aurelien.bouteiller@amd.com>
ammallya pushed a commit that referenced this pull request Jan 21, 2026
* Change to enable ibgda bitcode compilation

* Apply suggestion from @abouteiller

---------

Co-authored-by: Aurelien Bouteiller <aurelien.bouteiller@amd.com>

[ROCm/rocshmem commit: fbe5730]
@jayhawk-commits jayhawk-commits requested review from a team as code owners February 26, 2026 21:20
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.

4 participants