Skip to content

[rocprofiler-systems] Add HPC examples#3437

Open
kcossett-amd wants to merge 11 commits intodevelopfrom
users/kcossett-amd/hpc-examples-phase-1
Open

[rocprofiler-systems] Add HPC examples#3437
kcossett-amd wants to merge 11 commits intodevelopfrom
users/kcossett-amd/hpc-examples-phase-1

Conversation

@kcossett-amd
Copy link
Contributor

@kcossett-amd kcossett-amd commented Feb 23, 2026

Motivation

Requires #3158

Adds tests for the following HPC examples:

  • HPCTrainingExamples/Pragma_examples/OpenMP/Fortran/8_jacobi/3_jacobi_targetdata_markers
  • HPCTrainingExamples/Pragma_examples/OpenMP/Fortran/8_jacobi/1_jacobi_usm
  • HPCTrainingExamples/HIP/jacobi
  • Julia Example (External)
  • HPCtrainingExamples/Libraries/matrix_exponential/streams_sync/hip
  • HPCtrainingExamples/HIP/Stream_Overlap/1-split-copy-compute-hq-queues

On TheRock, only the following will run:

  • HPCTrainingExamples/Pragma_examples/OpenMP/Fortran/8_jacobi/1_jacobi_usm
  • HPCtrainingExamples/HIP/Stream_Overlap/1-split-copy-compute-hq-queues

The others require a few changes on TheRock side to function.

Tests can be ran using:

pytest <build-folder>/share/rocprofiler-systems/tests/pytest --dev -m "hpc"

Technical Details

Added:

  • examples/hpc and all its contents
  • test_julia.py underpytest
  • test_hpc.py under pytest
  • rocpd-validation-rules/hpc under tests folder
  • Added julia support under capabilities.py and config.py (under tests/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:

  • MI300A system
  • 7900XTX system
  • TheRock LOCALLY

Test Result

Results:

  • MI300A: All tests pass (Julia was skipped as it was not supported)
  • 7900XTX: All tests pass (Jacobi-USM was skipped as instinct card required and local systems has gfx1101)
  • TheRock LOCALLY
    • (Configured with 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-usm and split-copy-compute).
    • (Configured with gfx110X-all): Builds and split-copy-compute test passes.

Submission Checklist

@kcossett-amd kcossett-amd marked this pull request as ready for review February 25, 2026 18:23
@kcossett-amd kcossett-amd requested review from a team and jrmadsen as code owners February 25, 2026 18:23
Copilot AI review requested due to automatic review settings February 25, 2026 18:23
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

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.

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.

2 participants