Skip to content

Support for AMD GPUs (HIP/ROCm)

Choose a tag to compare

@nidode nidode released this 15 Sep 09:51
· 33 commits to master since this release

ChASE Library Release Notes

v1.7.3 (compared to v1.7.2)

Overview

This release adds production-grade AMD GPU (HIP/ROCm) support to ChASE, together with a unified CUDA/HIP GPU architecture. Serial and distributed GPU solvers now share the same algorithm layers and dispatch to NVIDIA or AMD backends. NVIDIA/CUDA paths are preserved. The mathematical algorithm is unchanged from v1.7.2. The port was validated on Frontier, including Hermitian and pseudo-Hermitian (BSE) problems.

🎯 Major Features

1. AMD GPU (HIP/ROCm) Support

  • HIP backend for ChASEGPU (serial GPU) and pChASEGPU (distributed GPU)
  • rocBLAS / rocSOLVER wrappers under external/amd_gpu/
  • Distributed GPU communication on AMD:
    • RCCL collectives (default, NCCL-compatible xCCL path)
    • HIP-aware MPI as an alternative
  • Hermitian and pseudo-Hermitian (full BSE) solvers on HIP, serial and distributed
  • C and Fortran interfaces wired to the HIP backend
  • Validated on Frontier: serial HIP, HIP-aware MPI, RCCL, and Example 4 C/Fortran interface runs

2. Unified CUDA/HIP GPU Architecture

  • GPU internals reorganized under linalg/internal/gpu/:
    • backend/: runtime, BLAS, solver, context, workspace planning
    • serial/: shared CholQR, Lanczos, Rayleigh–Ritz, residuals + CUDA/HIP wrappers
    • dist_mpi/: GPU-aware MPI path (CUDA-aware and HIP-aware)
    • dist_xccl/: NCCL (NVIDIA) and RCCL (AMD) path
    • kernels/: shared device kernels with CUDA/HIP specializations
  • Shared implementations for HEMM, CholQR, Lanczos, RR, residuals, and symOrHerm
  • GPU-resident workspace reuse and execution-context ownership for handles/streams/devInfo
  • NVIDIA CUDA/NCCL behavior retained and adapted to the new dispatch layer

3. Distributed GPU Collectives and Timing

  • RCCL discovery, build wiring, and distributed kernel layer mirroring NCCL
  • Stream-aware synchronization on GPU-aware MPI hot paths
  • Corrected HIP/RCCL timing for filter and QR phases (event placement/ordering)
  • Reduced over-conservative barriers where correctness allowed

4. Documentation and Benchmark Tooling

  • AMD/ROCm install and CMake guidance in the user docs
  • Architecture notes: docs/amd_gpu_port_architecture.md
  • Frontier collective benchmark docs and matrix-operations benchmark (MPI/xCCL modes)
  • Helper scripts: scripts/frontier_hip_env.sh, scripts/run_hip_*.sh

📦 Build & Configuration

CMake Improvements

  • External wrappers grouped by platform: external/cpu, external/nvidia_gpu, external/amd_gpu, external/scalapack
  • FindRCCL.cmake for RCCL detection
  • HIP autodetection via check_language(HIP)
  • chase_config.h now exposes HIP / HIP-aware MPI / RCCL flags

Configuration Options

  • CHASE_ENABLE_HIP: AUTO (default), ON, or OFF
  • CHASE_HIP_DISTRIBUTED_COLLECTIVES: NCCL (RCCL on ROCm, default) or MPI
  • CHASE_PROBE_HIP_AWARE_MPI_RUNTIME: optional configure-time HIP-aware MPI probe (default: OFF)

Example HIP build:

cmake .. \
  -DCHASE_ENABLE_HIP=ON \
  -DCHASE_HIP_DISTRIBUTED_COLLECTIVES=NCCL

On NVIDIA-only machines, CUDA detection is unchanged. Use -DCHASE_ENABLE_HIP=OFF to skip HIP autodetection.

🔍 Logging & Diagnostics

  • Rank-0 logging guards in distributed CholQR and interface config output (less multi-rank noise)
  • Additional Frontier bring-up diagnostics for HIP/RCCL collectives

🧪 Testing

  • HIP serial unit tests (CholQR, Lanczos, Rayleigh–Ritz, residuals, kernels)
  • HIP-aware MPI distributed tests (HEMM, Lanczos, QR, RR, residuals, pseudo-Hermitian)
  • RCCL tests mirroring the NCCL suite
  • Serial/distributed C and Fortran interface smoke tests on HIP
  • Frontier helper scripts for serial, distributed, e2e, and interface runs

🔗 API Changes

  • QR(cond): dropped unused fixednev argument
  • Resd(ritzv, resd): dropped unused fixednev argument
  • ReinitColumns(base_col, col_indices, n_indices): parameter renamed from fixednev to base_col
  • Public solver classes are unchanged: ChASEGPU, pChASEGPU, C/Fortran interfaces
  • pChASEGPU communication backend: chase::grid::backend::MPI or chase::grid::backend::NCCL (maps to NCCL on NVIDIA, RCCL on AMD)

📌 Migration Notes

For Users Upgrading

  • HIP is opt-in via CMake; existing CUDA builds should keep working
  • Typical usage remains one GPU per MPI rank
  • Distributed HIP Householder QR uses the ScaLAPACK fallback (native HIP Householder QR is not in this release)
  • NVIDIA XGEEV for pseudo-Hermitian RR remains CUDA-only (CHASE_ENABLE_XGEEV_RAYLEIGHRITZ)

For Developers / Downstream Includes

Old CUDA-only headers moved. Update includes, for example:

  • external/cublaspp/ → external/nvidia_gpu/cublaspp/
  • external/blaspp/ → external/cpu/blaspp/
  • linalg/internal/cuda/ → linalg/internal/gpu/serial/cuda/ and linalg/internal/gpu/kernels/
  • linalg/internal/nccl/ → linalg/internal/gpu/dist_xccl/nccl/
  • linalg/internal/cuda_aware_mpi/ → linalg/internal/gpu/dist_mpi/cuda/

👥 Contributors

This release includes work by Xinzhe Wu, with major efforts in:

  • AMD/HIP port on Frontier
  • Unified CUDA/HIP GPU backend
  • RCCL and HIP-aware MPI distributed paths
  • HIP test coverage and documentation