Skip to content

[Test] Add rocHPL test - #49

Open
pranavprakash-amd wants to merge 2 commits into
mainfrom
users/pranavprakash-amd/rochpl
Open

[Test] Add rocHPL test#49
pranavprakash-amd wants to merge 2 commits into
mainfrom
users/pranavprakash-amd/rochpl

Conversation

@pranavprakash-amd

Copy link
Copy Markdown

Motivation

Add a rocHPL (High-Performance Linpack) end-to-end HPC benchmark to the ROCm test framework. This validates the full ROCm compute stack — HIP
runtime → rocBLAS/DGEMM → MPI multi-rank orchestration — through a real, GPU-saturating LU-factorization workload, one of the canonical HPC
acceptance benchmarks for AMD GPU systems.

It also ports the legacy tests/HPC/perf_rochpl/{runRocHpl.py,build_rocHPL.sh,runRochpl.sh} scripts out of the external AMD BareMetal perf-test
framework and into the marker-compliant, remote-transparent rocm-tests framework — replacing rocminfo ASIC scraping, hand-set
ROCR_VISIBLE_DEVICES, sudo+password build steps, and per-ASIC CSV lookups with executor-injected GPU allocation and env-configurable parameters.

Technical Details

  • New test tests/e2e/hpc/rochpl/test_rochpl.py — clones, builds, and runs rocHPL across P*Q MPI ranks (one rank per GPU) via the generated
    mpirun_rochpl launcher, then asserts the HPL residual check PASSED, parses the total GFLOPS from HPL.out, records it as a metric (ROCHPL_GFLOPS),
    and enforces an optional ROCHPL_MIN_GFLOPS floor.
  • conftest.py — session-scoped rochpl_build and rochpl_mpi_runtime fixtures. rocHPL is a full CMake/install.sh project (not buildable via the
    single-file compile_binary/hipcc path), so it uses the framework's remote-transparent external-build primitives (clone_repo,
    assert_license_present, detect_mpi_runtime / provision_openmpi_runtime) plus a streaming install.sh runner. MPI + ROCm env is injected via an env
    VAR=... cmd prefix, never by mutating os.environ. Build trees are namespaced by GPU arch and process-grid config to force a clean rebuild on
    --gpu-arch/ROCHPL_NUM_GPUS changes.
  • _workload.py — shared, env-configurable run parameters (ROCHPL_NUM_GPUS/P/Q/N/NB/ITERATIONS/REF/MIN_GFLOPS/MPI_EXTRA_ENV) imported by both
    build and run sides so grid size and gpu_count can never drift. Includes an OpenMPI+UCX single-node fallback for nodes without a fast RDMA
    fabric.
  • framework/markers/taxonomy.py — registers a CATEGORY_PROFILE for tests/e2e/hpc/rochpl/ (hw.multi_gpu, layer.math_lib, ci.weekly, e2e.stack,
    os.linux). The test overrides hw.* to hw.gpu in single-GPU mode (ROCHPL_NUM_GPUS=1) and declares runtime.soak + gpu_count(N) explicitly.
  • NOTICES.md — upstream rocHPL license/provenance.

Test Plan

  • Collection / marker-lint validation (no GPU):
    pytest tests/e2e/hpc/rochpl/ --collect-only -q --no-gpu
  • Single-GPU run:
    ROCHPL_NUM_GPUS=1 pytest tests/e2e/hpc/rochpl/ -m "hw.gpu" --gpu-arch -v
  • Multi-GPU run (default 2-GPU, 2x1 grid):
    pytest tests/e2e/hpc/rochpl/ -m "hw.multi_gpu" --gpu-arch -v

Test Result

====================================================== ROCm Test Suite Summary ======================================================
Test Directory PASS FAIL SKIP ERROR Duration
────────────────────────────────────────────────────────────
tests/e2e/hpc/rochpl 0 1 0 0 5.2 s
────────────────────────────────────────────────────────────
TOTAL 1 tests │ 0 passed │ 1 failed │ 0 skipped │ 0 error │ 5.2 s

Failed tests:
• tests/e2e/hpc/rochpl/test_rochpl.py::test_rochpl_benchmark

Submission Checklist

Signed-off-by: Pranav Prakash <pranav.prakash@amd.com>
@pranavprakash-amd
pranavprakash-amd force-pushed the users/pranavprakash-amd/rochpl branch from 6531b36 to c3944ba Compare July 22, 2026 06:54
@pranavprakash-amd pranavprakash-amd added the Review PR ready for review label Jul 23, 2026
return os.path.isfile(path)


def _resolve_llvm_bin(rock_dir: str, cmake_executor) -> str:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this may not be required, as rocm_path referred to PATH for build. pls check.

@@ -0,0 +1,65 @@
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Check to include all matrix variants, see If a json variant within this file (if small) shall replace the csv combinations. typically run for 1:2:4:8 GPU counts X ASIC specific P/Q/N/NB

Look to parameterize this input to run the test_rochpl.py

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Noted.

if runtime is not None:
logger.info("rocHPL: using discovered MPI runtime at %s", runtime.launcher)
return runtime
version = os.environ.get("ROCM_TEST_ROCHPL_OPENMPI_VERSION") or os.environ.get("OPENMPI_VERSION") or "4.1.4"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is OpenMPI version - '4.1.4' necessary ?, I see the source has different - 5.0.6

@mparamas-amd mparamas-amd removed the Review PR ready for review label Jul 24, 2026
@mparamas-amd mparamas-amd added the Changes Requested Review comments to label Aug 5, 2026
Signed-off-by: Pranav Prakash <pranav.prakash@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes Requested Review comments to

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants