[rocprofiler-systems] Add HPC examples#3437
Open
kcossett-amd wants to merge 11 commits intodevelopfrom
Open
Conversation
1 task
…/hpc-examples-phase-1
…/hpc-examples-phase-1
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new suite of HPC example programs under projects/rocprofiler-systems/examples/hpc and ports corresponding validations into the rocprofiler-systems PyTest framework (including ROCpd rules), with additional runtime capability detection (Julia + XNACK) to enable conditional skipping.
Changes:
- Add multiple HPC example builds (HIP, OpenMP Fortran, and Julia script example) under
examples/hpc. - Add PyTest coverage for the new HPC examples plus ROCpd validation rules for selected examples.
- Extend PyTest runner/config plumbing to support interpreter-prefixed execution (
pre_run_args) and add Julia/XNACK capability detection + markers.
Reviewed changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/rocprofiler-systems/tests/rocpd-validation-rules/hpc/split-copy-compute/sdk-metrics-rules.json | Adds ROCpd validation rules for split-copy-compute example |
| projects/rocprofiler-systems/tests/rocpd-validation-rules/hpc/matrix-exponential/sdk-metrics-rules.json | Adds ROCpd validation rules for matrix-exponential example |
| projects/rocprofiler-systems/tests/pytest/test_julia.py | Adds Julia-based HPC test using new runner prefix support |
| projects/rocprofiler-systems/tests/pytest/test_hpc.py | Adds PyTest coverage for multiple HPC examples (Jacobi, matrix-exp, split-copy-compute) |
| projects/rocprofiler-systems/tests/pytest/rocprofsys/runners.py | Adds pre_run_args support across runners (and updates command building) |
| projects/rocprofiler-systems/tests/pytest/rocprofsys/gpu.py | Adds XNACK support detection helper |
| projects/rocprofiler-systems/tests/pytest/rocprofsys/config.py | Adds Julia executable discovery to test config |
| projects/rocprofiler-systems/tests/pytest/rocprofsys/init.py | Re-exports new GPU helper(s) |
| projects/rocprofiler-systems/tests/pytest/conftest.py | Adds markers + conditional skips for Julia and XNACK; threads pre_run_args through run_test |
| projects/rocprofiler-systems/examples/hpc/split-copy-compute-hw-queues/compute_comm_overlap.hip | Adds HIP split-copy-compute overlap example source |
| projects/rocprofiler-systems/examples/hpc/split-copy-compute-hw-queues/CMakeLists.txt | Adds build/install logic for split-copy-compute example |
| projects/rocprofiler-systems/examples/hpc/matrix-exponential-streams-sync-hip/mat_exp.cpp | Adds matrix exponential HIP/OpenMP/rocBLAS example source |
| projects/rocprofiler-systems/examples/hpc/matrix-exponential-streams-sync-hip/CMakeLists.txt | Adds build/install logic for matrix exponential example |
| projects/rocprofiler-systems/examples/hpc/julia/vecadd.jl | Adds Julia AMDGPU vector-add example script |
| projects/rocprofiler-systems/examples/hpc/julia/CMakeLists.txt | Adds Julia example install/staging logic (JIT script) |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/markers.h | Adds jacobi-hip marker utilities (roctx/roctracer) |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/defines.hpp | Adds jacobi-hip constants/types/macros |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/Norm.hip | Adds jacobi-hip norm kernels/logic |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/Laplacian.hip | Adds jacobi-hip Laplacian kernels/logic |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/JacobiSetup.hip | Adds jacobi-hip setup/topology/allocations |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/JacobiRun.hip | Adds jacobi-hip iterative run loop |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/JacobiMain.hip | Adds jacobi-hip main entrypoint |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/JacobiIteration.hip | Adds jacobi-hip iteration kernel/driver |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/Jacobi.hpp | Adds jacobi-hip shared declarations |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/Input.hip | Adds jacobi-hip CLI parsing |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/HaloExchange.hip | Adds jacobi-hip MPI halo exchange |
| projects/rocprofiler-systems/examples/hpc/jacobi-hip/CMakeLists.txt | Adds build/install logic for jacobi-hip |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/update.f90 | Adds Fortran USM Jacobi update kernel |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/norm.f90 | Adds Fortran USM Jacobi norm function |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/mesh.f90 | Adds Fortran USM Jacobi mesh type/init |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/main.f90 | Adds Fortran USM Jacobi main program |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/laplacian.f90 | Adds Fortran USM Jacobi Laplacian |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/kind.f90 | Adds Fortran kind definitions |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/jacobi.f90 | Adds Fortran USM Jacobi driver + reporting |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/input.f90 | Adds Fortran USM Jacobi CLI parsing |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/boundary.f90 | Adds Fortran USM Jacobi boundary handling |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/CMakeLists.txt | Adds build/install logic for Fortran USM Jacobi |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/update.f90 | Adds Fortran targetdata Jacobi update kernel |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/norm.f90 | Adds Fortran targetdata Jacobi norm function |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/mesh.f90 | Adds Fortran targetdata Jacobi mesh type/init |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/main.f90 | Adds Fortran targetdata Jacobi main program |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/laplacian.f90 | Adds Fortran targetdata Jacobi Laplacian |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/kind.f90 | Adds Fortran kind definitions |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/jacobi.f90 | Adds Fortran targetdata Jacobi driver + roctx ranges + reporting |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/input.f90 | Adds Fortran targetdata Jacobi CLI parsing |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/boundary.f90 | Adds Fortran targetdata Jacobi boundary handling |
| projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/CMakeLists.txt | Adds build/install logic for Fortran targetdata markers Jacobi |
| projects/rocprofiler-systems/examples/hpc/hpc-helper.cmake | Adds shared CMake helpers for HPC examples |
| projects/rocprofiler-systems/examples/hpc/CMakeLists.txt | Adds top-level HPC examples umbrella build |
| projects/rocprofiler-systems/examples/CMakeLists.txt | Wires examples/hpc into the overall examples build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/rocprofiler-systems/examples/hpc/split-copy-compute-hw-queues/compute_comm_overlap.hip
Show resolved
Hide resolved
projects/rocprofiler-systems/examples/hpc/jacobi-fortran-targetdata-markers/boundary.f90
Show resolved
Hide resolved
projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/boundary.f90
Show resolved
Hide resolved
projects/rocprofiler-systems/examples/hpc/split-copy-compute-hw-queues/compute_comm_overlap.hip
Show resolved
Hide resolved
projects/rocprofiler-systems/examples/hpc/jacobi-fortran-usm/boundary.f90
Show resolved
Hide resolved
projects/rocprofiler-systems/tests/pytest/rocprofsys/runners.py
Outdated
Show resolved
Hide resolved
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.
Motivation
Requires #3158
Adds tests for the following HPC examples:
HPCTrainingExamples/Pragma_examples/OpenMP/Fortran/8_jacobi/3_jacobi_targetdata_markersHPCTrainingExamples/Pragma_examples/OpenMP/Fortran/8_jacobi/1_jacobi_usmHPCTrainingExamples/HIP/jacobiJulia Example (External)HPCtrainingExamples/Libraries/matrix_exponential/streams_sync/hipHPCtrainingExamples/HIP/Stream_Overlap/1-split-copy-compute-hq-queuesOn TheRock, only the following will run:
HPCTrainingExamples/Pragma_examples/OpenMP/Fortran/8_jacobi/1_jacobi_usmHPCtrainingExamples/HIP/Stream_Overlap/1-split-copy-compute-hq-queuesThe others require a few changes on TheRock side to function.
Tests can be ran using:
Technical Details
Added:
examples/hpcand all its contentstest_julia.pyunderpytesttest_hpc.pyunderpytestrocpd-validation-rules/hpcundertestsfoldercapabilities.pyandconfig.py(undertests/pytest/rocprofsys).NOTE: No specific ROCPD/Perfetto validation tests targeting OpenMP kernel count/depth can be done right now due to a recent change in LLVM 23. This will be addressed in a future PR.
JIRA ID
AIPROFSYST-48
Test Plan
Tested on:
Test Result
Results:
gfx1101)gfx94X-all): Builds (could not test as I wasn't on an MI300 system), but I had in the past and both enabled tests pass (jacobi-usmandsplit-copy-compute).gfx110X-all): Builds andsplit-copy-computetest passes.Submission Checklist