Skip to content

Enable some simple ROCpd testing#834

Merged
dgaliffiAMD merged 8 commits intodevelopfrom
users/dgaliffi/rocpd-tests
Oct 20, 2025
Merged

Enable some simple ROCpd testing#834
dgaliffiAMD merged 8 commits intodevelopfrom
users/dgaliffi/rocpd-tests

Conversation

@dgaliffiAMD
Copy link
Contributor

@dgaliffiAMD dgaliffiAMD commented Sep 2, 2025

Motivation

Enable ROCPD output and content validation to some of the tests in the test suite to allow for automated testing.

Technical Details

  • If the tool is being run on ROCm 7.0 or above on a system with a valid GPU, then add ROCPROFSYS_USE_ROCPD=YES to the test configuration.
  • Use validate-rocpd.py to validate contents of the rocpd output.
  • Enable for transpose, roctx, openmp-target, video-decode, and jpeg-decode

Test Plan

Test Result

Submission Checklist

jharryma pushed a commit that referenced this pull request Sep 12, 2025
jharryma pushed a commit that referenced this pull request Sep 12, 2025
[ROCm/rocprofiler-compute commit: 6885cb0]
@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch from db2d68e to 1e25d91 Compare September 17, 2025 19:57
@dgaliffiAMD
Copy link
Contributor Author

Rebased branch

@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch from 8756959 to 66d015c Compare September 23, 2025 18:41
@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch from c151ee1 to 84f1c25 Compare September 24, 2025 17:58
@github-actions github-actions bot added the github actions Pull requests that update GitHub Actions code label Sep 25, 2025
@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch from 56260f4 to 41caf5e Compare September 25, 2025 21:46
@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch 5 times, most recently from 98b99bf to 9cd5b66 Compare October 15, 2025 03:18
@dgaliffiAMD dgaliffiAMD marked this pull request as ready for review October 15, 2025 03:37
@dgaliffiAMD dgaliffiAMD requested review from a team and jrmadsen as code owners October 15, 2025 03:37
Copilot AI review requested due to automatic review settings October 15, 2025 03:37
@dgaliffiAMD dgaliffiAMD requested a review from a team as a code owner October 15, 2025 03:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Enable ROCPD output and content validation across selected tests to support automated verification on ROCm 7.0+ systems with a valid GPU.

  • Add a Python validator (validate-rocpd.py) to check ROCPD SQLite DBs against JSON rule sets.
  • Integrate ROCPD-based validation into CMake test flows for transpose, roctx, openmp-target, video-decode, and jpeg-decode; gate on ROCm >= 7.0 and GPU presence.
  • Add JSON rules for various scenarios and enhance tooling (pre-commit JSON checks; CI Python 3.10).

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
projects/rocprofiler-systems/tests/validate-rocpd.py New ROCPD DB validator CLI; loads JSON rules, runs table/column/row/query checks, returns structured exit codes.
projects/rocprofiler-systems/tests/rocprof-sys-testing.cmake Add ROCPD enablement gate, ROCPD env, ROCPD validation test wiring, and PASS_REGEX support.
projects/rocprofiler-systems/tests/rocprof-sys-roctx-tests.cmake Enable ROCPD conditionally for roctx tests and add ROCPD validation.
projects/rocprofiler-systems/tests/rocprof-sys-rocm-tests.cmake Configure transpose tests to support ROCPD and add ROCPD validation.
projects/rocprofiler-systems/tests/rocprof-sys-openmp-tests.cmake Move OMPT env here, enable ROCPD conditionally, and add ROCPD validation for openmp-target.
projects/rocprofiler-systems/tests/rocprof-sys-decode-tests.cmake Enable ROCPD for video/jpeg decode tests and add corresponding ROCPD validations.
projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/validation-rules.json Add minimal table presence rule for threads in video decode.
projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/sdk-metrics-rules.json Add ROCPD rules for rocdecode and hip API traces.
projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/amd-smi-rules.json Add amd-smi metrics validation for video decode.
projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/validation-rules.json Add kernel and thread rules for transpose scenario.
projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/timer-sampling-rules.json Add timer sampling string and region checks.
projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/sdk-metrics-rules.json Add hip/hsa/memory allocations/copies rules for transpose.
projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/amd-smi-rules.json Add amd-smi rules for transpose runs.
projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/validation-rules.json Add kernel/thread validations for roctx sample.
projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/sdk-metrics-rules.json Add marker API presence and counts for roctx.
projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/amd-smi-rules.json Add amd-smi rules for roctx sample.
projects/rocprofiler-systems/tests/rocpd-validation-rules/openmp-target/sdk-metrics-rules.json Add OMPT/HSA SDK validation for openmp-target.
projects/rocprofiler-systems/tests/rocpd-validation-rules/openmp-target/kernel-rules.json Add kernel-dispatch count/name expectations for openmp-target.
projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/validation-rules.json Add kernel/thread rules for jpeg decode.
projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/sdk-metrics-rules.json Add rocjpeg and hip API validation rules.
projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/amd-smi-rules.json Add amd-smi rules for jpeg decode.
projects/rocprofiler-systems/tests/rocpd-validation-rules/default-rules.json Baseline rules used by the validator.
projects/rocprofiler-systems/tests/rocpd-validation-flow.md Documentation of validation flow and rule structure.
projects/rocprofiler-systems/.pre-commit-config.yaml Add JSON lint/format hooks.
.github/workflows/rocprofiler-systems-formatting.yml Use Python 3.10 in formatting workflow.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch from 9cd5b66 to 34f725d Compare October 15, 2025 16:36
dgaliffiAMD and others added 6 commits October 15, 2025 12:38
Add for transpose, video-decode, jpeg-decode, roctx, and openmp-target
Add JSON check to pre-commit-config

Co-authored-by: Marjan Antic <Marjan.Antic@amd.com>
@dgaliffiAMD dgaliffiAMD force-pushed the users/dgaliffi/rocpd-tests branch from 34f725d to 223ae1a Compare October 15, 2025 16:38
@dgaliffiAMD
Copy link
Contributor Author

Rebasing

@dgaliffiAMD dgaliffiAMD merged commit 32f9fa6 into develop Oct 20, 2025
68 of 72 checks passed
@dgaliffiAMD dgaliffiAMD deleted the users/dgaliffi/rocpd-tests branch October 20, 2025 21:40
systems-assistant bot pushed a commit to ROCm/rocprofiler-systems that referenced this pull request Oct 20, 2025
* Add for rocpd testing and output validation

Add for transpose, video-decode, jpeg-decode, roctx, and openmp-target
Add JSON check to pre-commit-config

Co-authored-by: Marjan Antic <Marjan.Antic@amd.com>

* Remove redundant environment variable

* Fix spelling typo

* Fix typo in error message

* Fix memory_allocation query

* Incorperate feedback from review. Handle case where there are multiple matching "name_prefix" tables.

* Fix environment settings in `rocprof-sys-testing.cmake`

Accidently removed in previous refactoring.

* Formatting python file
[rocm-systems] ROCm/rocm-systems#834 (commit 32f9fa6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Pull requests that update GitHub Actions code organization: ROCm project: rocprofiler-systems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants