Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

feat(lcao): enable AMD GPU ELPA and restore ROCm application builds - #8518

Open
userchba wants to merge 2 commits into
deepmodeling:developfrom
userchba:feat/elpa-rocm-lcao
Open

userchba wants to merge 2 commits into
deepmodeling:developfrom
userchba:feat/elpa-rocm-lcao

Conversation

@userchba

@userchba userchba commented Dec 4, 2026 •

Copy link
Copy Markdown

Problem

  1. Native ELPA cannot use AMD GPUs for a single-k-point LCAO solve. A Γ-point SCF iteration has one dense generalized eigenproblem. This PR enables AMD GPU ELPA so MPI ranks can distribute the matrices and solve that eigenproblem across DCUs.

  2. Independent k-point pools can select the same GPU. With kpar > 1, different pools can each have an ELPA rank 0 and select GPU 0 when both ranks see the same devices. This PR passes ABACUS’s per-rank GPU ID to ELPA on NVIDIA and AMD.

  3. The full ABACUS executable fails to build with ROCm. Build flag and HIP library incompatibilities block compilation, and missing HIP operators block linking. This PR addresses both so abacus_basic_gpu can run a full SCF calculation on DCUs.

Linked Issue

Fixes #8516. Fixes #8517. Related to #8508.

What's changed?

  • Enable amd-gpu in DiagoElpaNative. Pass ABACUS’s assigned device ID to both NVIDIA and AMD ELPA so independent k-point pools use their assigned devices.
  • Fix ROCm build flags and HIP BLAS/LAPACK adapters. Add the pitched-copy wrapper and the missing plane-wave exchange and local/Ewald force operators required to link abacus_basic_gpu.

Unit Tests and/or Case Tests for my changes

  • Built abacus_basic_gpu with cmake --build build --target abacus_basic_gpu on df_dcu using DTK 25.04.3 and AMD ELPA 2026.02.001 with RCCL. Enabled ROCm, MPI, LCAO, and ELPA. LibRI was disabled.
  • Ran the upstream Si₂ 02_NAO_Gamma/scf_force_stress and spinor Fe₂ 03_NAO_multik/scf_angle_spin4 inputs with mpirun -np 2 --bind-to core /path/to/abacus_basic_gpu, ks_solver elpa, device gpu, kpar 1, and nb2d 2. Both converged within 2e-12 eV of CPU ELPA. Rank logs and rocBLAS traces confirmed both DCUs, and ELPA reported RCCL active (Slurm 23528436).
  • Repeated Fe₂ with kpar 2. Each pool used a separate DCU. Total energy and forces matched the kpar 1 CPU reference at printed precision, and the largest stress difference was about 1e-10 kbar (Slurm 23529536).
  • Checked padded 2D copies in all three directions for five data types. All six added plane-wave operators matched CPU references in single and double precision.
  • Remaining coverage includes NVIDIA hardware, a single-device memory-limit case, and cross-node full SCF. The separate container test target still has missing HIP geqrf and hegvx implementations.

Governance Notes

  • Document the existing basis_type lcao, ks_solver elpa, and device gpu combination for AMD GPU ELPA. USE_ROCM still emits its deprecation warning.
  • Core changes cover HSolver backend selection and device binding, plus HIP build and device, container, ElecState, PW, and RT operator compatibility.
  • No governance exceptions requested.

Reminder

  • ✓ I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • ✓ I have linked the relevant issues.
  • ✓ I have listed the tests, commands, and results.
  • ✓ I have described user-visible changes and core-module impact.

Complete the HIP build and link paths, including pitched memory copies,
BLAS and LAPACK adapters, and the missing plane-wave kernels. Use the
ABACUS rank-to-device assignment for both AMD and NVIDIA ELPA so that
separate k-point pools use their intended devices.

Validated the full df_dcu build and kpar=1 on Si2 and spinor Fe2
(Slurm 23528436). Fe2 also converged with kpar=2 on two MPI ranks
and two DCUs in Slurm 23529536. Each pool used a distinct DCU.
Energy and forces matched the kpar=1 CPU reference at printed
precision. The maximum stress component difference was 1.01e-10 kbar.
@mohanchen mohanchen added GPU & DCU & HPC GPU and DCU and HPC related any issues Diago Issues related to diagonalizaiton methods labels Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Diago Issues related to diagonalizaiton methods GPU & DCU & HPC GPU and DCU and HPC related any issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPU ELPA can assign independent LCAO k-point pools to the same GPU ROCm build fails to link abacus_basic_gpu with missing HIP operators

2 participants