Skip to content

Restore HIP feature parity with CUDA; make hipify.sh maintainable - #221

Open
susilehtola wants to merge 7 commits into
wavefunction91:masterfrom
susilehtola:hip_restore_parity
Open

susilehtola wants to merge 7 commits into
wavefunction91:masterfrom
susilehtola:hip_restore_parity

Conversation

@susilehtola

Copy link
Copy Markdown
Contributor

Problem

The HIP backend does not build. scheme1_base.cxx is compiled for both backends — it is listed in src/xc_integrator/local_work_driver/device/CMakeLists.txt:16, before the conditional cuda/ and hip/ subdirectories — and it calls zmat_*_fxc, increment_exc_grad_*, exx_ek_screening_bfn_stats and the shell-to-task collocation. None of those had HIP definitions, so any -DGAUXC_ENABLE_HIP=ON build fails to link.

The HIP sources that did exist were stale as well:

  • kernels/zmat_vxc.hip still had the pre-UKS/GKS kernel names (zmat_lda_vxc_kernel rather than zmat_lda_vxc_{rks,uks,gks}_kernel);
  • kernels/uvvars.hip had no mGGA path at all (zero tau references against 19 on the CUDA side);
  • collocation_shell_to_task_kernels.hpp and the split uvvars_{lda,gga,mgga}.hpp headers were absent.

In effect the HIP backend has been frozen at roughly its 2022 LDA/GGA-VXC feature level while mGGA, FXC contraction, EXC gradients and sn-LinK screening were added on the CUDA side.

Root cause

hip/hipify.sh covered only 8 of the 24 current files under cuda/kernels/ and was never updated as kernels were added.

What this PR does

Rewrites hipify.sh to cover all current CUDA kernel sources, regenerates the HIP tree from it, and adds zmat_fxc, increment_exc_grad and exx_ek_screening_bfn_stats to hip/CMakeLists.txt.

The hipify-perl invocations are replaced with explicit sed rules. Two reasons: regeneration then works on machines without a ROCm installation, and the handful of decisions that are not mechanical end up documented in one place rather than in a maintainer's head:

  • Wavefront size is never hardcoded; kernels take it from GauXC::cuda::warp_size → GauXC::hip::warp_size (32 vs 64), so launch geometry adapts. No literal 32s were introduced.
  • __syncwarp() has no HIP equivalent (wavefronts are lockstep on AMD) and is commented out — the convention the existing 2022-era files in this directory already used.
  • __shfl_*_sync(mask, …) → __shfl_*(…), since HIP shuffles take no mask argument.
  • cub → hipcub (cub::DeviceScan in the EXX screening kernel).
  • CUDA's two-tier shared-memory limit has no AMD counterpart — LDS per workgroup is a single fixed limit — so both cudaDevAttrMaxSharedMemoryPerBlock and …Optin map to hipDeviceAttributeMaxSharedMemoryPerBlock. The overflow guard in exx_ek_screening is preserved; the opt-in branch becomes a no-op.
  • __stcs() and its inline-PTX fallback in pack_submat are lowered to a plain store. CUDART_VERSION is undefined under HIP, so the preprocessor would otherwise select the PTX branch and fail to compile. The cache hint is an optimization, not semantics.
  • CUTLASS is deliberately not translated; it has no HIP counterpart and GAUXC_ENABLE_CUTLASS is already a CUDA-only dependent option.

Verification

Static checks only (see caveat):

  • every kernel symbol referenced by scheme1_base.cxx now resolves against the HIP tree;
  • no compile-breaking CUDA token remains in the generated sources;
  • per-file function counts match the CUDA originals;
  • the hand-maintained hip_aos_scheme1{,_data}.cxx were checked to have the same method sets as their CUDA counterparts (the line-count difference is CUTLASS-only code), so they did not need regeneration.

Caveat — please read before merging

This has not been compiled. I have neither a ROCm installation nor AMD hardware, so the changes have never been through hipcc. Expect a round of compile fixes.

Beyond compilation, the one correctness risk worth a reviewer's eyes is wavefront width: nothing hardcodes 32 and launch geometry derives from hip::warp_size, but any intra-wavefront reduction whose trip count is written as a literal rather than derived from warp_size should be checked before the numbers are trusted on AMD. hipify.sh prints a CHECK_WAVEFRONT reminder to that effect.

I am happy to iterate on this if someone with an AMD GPU can run the test suite, or to split it into "script + build wiring" and "regenerated kernels" commits if that is easier to review.

The HIP backend has not built since mGGA, FXC contraction, EXC gradients
and sn-LinK screening landed on the CUDA side. scheme1_base.cxx is
compiled for both backends (device/CMakeLists.txt:16, before the
conditional cuda/ and hip/ subdirectories) and calls zmat_*_fxc,
increment_exc_grad_*, exx_ek_screening_bfn_stats and the shell-to-task
collocation, none of which had HIP definitions -- so any
-DGAUXC_ENABLE_HIP=ON build fails to link. The HIP files that did exist
were also stale: zmat_vxc.hip still had the pre-UKS/GKS kernel names,
and uvvars.hip had no mGGA path at all.

Root cause is that hipify.sh covered only 8 of the 24 current CUDA
kernel sources and was never updated. This rewrites it to cover all of
them, and replaces the hipify-perl invocations with explicit sed rules
so regeneration is reproducible without a ROCm installation and the
non-mechanical decisions are documented in one place:

  * warp/wavefront size comes from GauXC::{cuda,hip}::warp_size (32 vs
    64), so launch geometry adapts; no literal 32s were introduced.
  * __syncwarp() has no HIP equivalent (lockstep wavefronts on AMD) and
    is commented out, the convention the 2022 port already used here.
  * __shfl_*_sync(mask, ...) -> __shfl_*(...) (HIP takes no mask).
  * cub -> hipcub.
  * CUDA's two-tier shared-memory limit has no AMD counterpart: both
    cudaDevAttrMaxSharedMemoryPerBlock{,Optin} map to
    hipDeviceAttributeMaxSharedMemoryPerBlock, leaving the overflow
    guard intact and the opt-in branch a no-op.
  * __stcs() and its inline-PTX fallback in pack_submat are lowered to a
    plain store; CUDART_VERSION is undefined under HIP, so the
    preprocessor would otherwise select the PTX branch.
  * CUTLASS is deliberately not translated (CUDA-only dependent option).

Regenerated all 23 kernel files and added zmat_fxc, increment_exc_grad
and exx_ek_screening_bfn_stats to the HIP CMakeLists. Every kernel
symbol scheme1_base.cxx references now has a HIP definition, and no
compile-breaking CUDA token remains in the generated sources.

NOT COMPILE-TESTED: no ROCm or AMD hardware was available. Before this
is trusted for numerical results, it needs a build with hipcc and a
review of any intra-wavefront reduction whose trip count is a literal
rather than derived from hip::warp_size (see CHECK_WAVEFRONT in
hipify.sh).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0135evJ9zgNL1y8U6T9bQ3UT
@wavefunction91

Copy link
Copy Markdown
Owner

Hey @susilehtola, just wanted to let you know that I am taking a look at this. Currently seeing if I can get access to some appropriate AMD GPUs to test this myself. I'll also look into some options for CI/CD if I can get my hands on some quota from one of the big cloud providers.

Copilot AI left a comment

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.

🟡 Changes recommended

Missing generated headers, untranslated CUDA dependencies, and multiple 32-to-64-lane indexing errors prevent a correct HIP build.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Restores HIP backend parity with CUDA by regenerating missing kernels and expanding HIP build coverage.

Changes:

  • Reworks hipify.sh to translate current CUDA kernels.
  • Adds mGGA, FXC, gradient, screening, and shell-to-task support.
  • Updates HIP build wiring and wavefront-dependent kernels.
File summaries
File Description
hip/kernels/zmat_vxc.hip Adds UKS/GKS and mGGA VXC kernels.
hip/kernels/zmat_fxc.hip Adds FXC contraction kernels.
hip/kernels/uvvars.hip Dispatches split LDA/GGA/mGGA kernels.
hip/kernels/uvvars_mgga.hpp Adds mGGA variable kernels.
hip/kernels/uvvars_lda.hpp Adds LDA scheme variants.
hip/kernels/uvvars_gga.hpp Adds GGA scheme variants.
hip/kernels/symmetrize_mat.hip Updates matrix symmetrization.
hip/kernels/pack_submat.hip Adds symmetric/asymmetric packing.
hip/kernels/hipblas_extensions.hip Expands HIP BLAS helpers.
hip/kernels/hip_ssf_1d.hpp Declares SSF gradient support.
hip/kernels/hip_ssf_1d.hip Adds SSF weight derivatives.
hip/kernels/hip_inc_potential.hip Adds symmetric/asymmetric increments.
hip/kernels/hip_extensions.hpp Adds wavefront reductions.
hip/kernels/grid_to_center.hpp Updates HIP declarations.
hip/kernels/grid_to_center.hip Reworks distance computation.
hip/kernels/exx_ek_screening_bfn_stats.hip Adds sn-LinK screening.
hip/kernels/collocation/collocation_device_constants.hpp Expands angular constants.
hip/kernels/collocation/collocation_angular_spherical_unnorm.hpp Adds angular momentum-4 support.
hip/kernels/collocation/collocation_angular_cartesian.hpp Adds Cartesian momentum-4 support.
hip/kernels/collocation_shell_to_task_kernels.hpp Aggregates shell-to-task kernels.
hip/kernels/collocation_masked_combined_kernels.hpp Updates masked collocation.
hip/kernels/collocation_device.hip Adds shell-to-task dispatch.
hip/hipify.sh Rewrites HIP generation workflow.
hip/CMakeLists.txt Registers new HIP sources.
Review details

Suppressed comments (3)

src/xc_integrator/local_work_driver/device/hip/kernels/pack_submat.hip:226

  • As in the symmetric path, this 32×32 launch is incompatible with WARP_X=16 and the 8×8 cut decomposition: tid_xy=1 creates overlapping/out-of-range unrolled reads, while only four of eight tid_yy residues run. Launch the logical 16×64 shape.
  dim3 threads( hip::warp_size/2, hip::max_warps_per_thread_block * 2, 1 );

src/xc_integrator/local_work_driver/device/hip/kernels/hip_inc_potential.hip:212

  • This asymmetric kernel has the same fixed 16×64 indexing contract, while the 32×32 HIP launch causes overlapping/out-of-bounds unrolled accesses and skips half of each cut block. Launch the dimensions represented by the kernel constants.
  dim3 threads( hip::warp_size/2, hip::max_warps_per_thread_block * 2, 1 );

src/xc_integrator/local_work_driver/device/hip/kernels/exx_ek_screening_bfn_stats.hip:405

  • This duplicated conversion kernel has the same 64-vs-32 mismatch: the load loop leaves many collisions_buffer[threadIdx.y][threadIdx.x] rows uninitialized before they are consumed, yielding incorrect shell lists and nbe counts. Make its logical subgroup width and launch geometry consistent.
      for (int buffer_loop = 0; buffer_loop < warp_size; buffer_loop += warp_size/buffer_size) {
        const int t_id_x        = threadIdx.x % buffer_size;
        const int buffer_thread = threadIdx.x / buffer_size;
        const int buffer_idx    = buffer_thread + buffer_loop;
        if (j_block * buffer_size_bits + t_id_x * element_size < nshells && i_base + buffer_idx < ntasks) {
  • Files reviewed: 25/25 changed files
  • Comments generated: 10
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +47 to +50
-e 's|cuda_extensions\.hpp|hip_extensions.hpp|g' \
-e 's|cuda_aos_scheme1\.hpp|hip_aos_scheme1.hpp|g' \
-e 's|#include <cub/cub\.cuh>|#include <hipcub/hipcub.hpp>|g' \
-e 's|\bcub::|hipcub::|g' \
Comment on lines +122 to +123
hipify_file "$CUDA_PREFIX/collocation_shell_to_task_kernels.hpp" \
"$HIP_PREFIX/collocation_shell_to_task_kernels.hpp"
}
// do the computation
#pragma unroll 2
for (int k = threadIdx.y; k < hip::warp_size; k+=hip::warp_size/2) {
Comment on lines +135 to +138
register double den_reg = den_shared[0][sm_y][threadIdx.x];
register double dx_reg = den_shared[1][sm_y][threadIdx.x];
register double dy_reg = den_shared[2][sm_y][threadIdx.x];
register double dz_reg = den_shared[3][sm_y][threadIdx.x];
Comment on lines +132 to +134
register double tx_reg = den_shared[0][sm_y][threadIdx.x];
register double ty_reg = den_shared[1][sm_y][threadIdx.x];
register double tz_reg = den_shared[2][sm_y][threadIdx.x];
Comment on lines +100 to +102
const size_t num_blocks = ((N + hip::warp_size - 1) / hip::warp_size);
// Warp size must equal max_warps_per_thread_block must equal 32
dim3 threads(hip::warp_size, hip::max_warps_per_thread_block), blocks(num_blocks);
hipStream_t stream = queue.queue_as<util::hip_stream>();

j += delta_j;
dim3 threads( hip::warp_size/2, hip::max_warps_per_thread_block * 2, 1 );

hipStream_t stream = queue.queue_as<util::hip_stream>();

dim3 threads( hip::warp_size/2, hip::max_warps_per_thread_block * 2, 1 );
Comment on lines +64 to +66
__shared__ double bf_shared[32][32 + 1];
__shared__ double bfn_sum_shared[32];
bfn_sum_shared[warp_lane] = 0.0;
Comment on lines +337 to +341
for (int buffer_loop = 0; buffer_loop < warp_size; buffer_loop += warp_size/buffer_size) {
const int t_id_x = threadIdx.x % buffer_size;
const int buffer_thread = threadIdx.x / buffer_size;
const int buffer_idx = buffer_thread + buffer_loop;
if (j_block * buffer_size_bits + t_id_x * element_size < nsp && i_base + buffer_idx < ntasks) {
ajaypanyala and others added 6 commits August 26, 2026 13:09
… linking

The HIP backend added in the previous commit didn't compile on ROCm
7.2 (gfx90a), and once it did, GAUXC_ENABLE_TESTS still failed to
link. Fixes, mostly in hipify.sh so they regenerate correctly instead
of rotting in the generated kernels/ tree:

- Disable -Werror=shadow for the fetched exchcxx dependency when
  building with HIP; ROCm's own headers trip -Wshadow.
- hipblas.h -> hipblas/hipblas.h; the flat include path was dropped
  as of ROCm 6.0
- hipify.sh: add missing translations (cuda_ssf_1d.hpp rename,
  `namespace cuda` -> `namespace hip`, cudaGetLastError,
  GAUXC_CUBLAS_*, non-umbrella cub/*.cuh headers, `register`
  storage class removal, <cuda.h> driver-API include drop).
- hipify.sh: generate every collocation/*.hpp via a glob instead of
  a hardcoded 3-file list; collocation_shell_to_task_kernels.hpp
  includes ~54 per-l/derivative headers that were silently missing.
- hipify.sh: cast kernel function pointers to const void* for
  hipFuncSetAttribute (nvcc allows the implicit conversion, clang
  does not).
- hipify.sh: fix genuine 32- vs 64-wide warp/wavefront bugs mechanical
  translation can't paper over: a shell_nprim_max == warp_size
  static_assert and primitive load that only holds for warp_size 32;
  shared-memory tile constants in uvvars_gga/mgga.hpp and
  symmetrize_mat.cu's block-transpose kernels that overflow AMD's
  64KB LDS when sized off a 64-wide wavefront.
- scheme1_base.cxx: hoist the Data* cast above the #ifdef in the
  hessian/laplacian/lapgrad evaluators so the shared trailing
  check_error() call compiles under HIP (gradient already did this).
- hip_aos_scheme1.cxx: stop routing weight partitioning through the
  stale, broken 2D SSF kernel (hip_ssh_2d); use the 1D path
  exclusively, matching CUDA's own cuda_aos_scheme1_weights.cu.
- hip_aos_scheme1.{hpp,cxx}: implement the missing
  eval_weight_1st_deriv_contracted override (present on
  CudaAoSScheme1, absent on HipAoSScheme1), which left the class
  abstract and uninstantiable.

With GAUXC_ENABLE_TESTS on, gauxc_test/standalone_driver still failed
to link on HIP even though libgauxc itself built fine (static-
archiving doesn't check for undefined symbols; only linking an
executable does):

- xc_functional_eval_wrapper.cxx (hip): add the MGGA exc/vxc and
  LDA/GGA/MGGA vxc_fxc wrapper functions that only existed in the CUDA
  version, mirroring it 1:1 (GauXC::eval_kern_exc_vxc_mgga,
  eval_kern_vxc_fxc_{lda,gga,mgga}).
- tests/CMakeLists.txt: exclude 2nd_derivative_test.cxx from
  gauxc_test on HIP; it exercises Fxc/vxc_fxc evaluation, which
  ExchCXX's HIP backend doesn't implement (CUDA/SYCL only).
- tests/standalone_driver.cxx: guard the eval_fxc_contraction() call
  behind #ifdef GAUXC_HAS_HIP for the same reason (the call is
  unconditionally compiled in even though it's runtime-flag-gated, so
  the symbol was still required at link time).
- tests/weights_hip.hpp: this HIP-only test (no CUDA equivalent)
  directly exercised partition_weights_ssf_2d, the stale/unmaintained
  2D SSF kernel already dropped from production above. Point it at
  partition_weights_ssf_1d instead, matching what hip_aos_scheme1.cxx
  actually uses.

The remaining ExchCXX-side gaps (missing HIP Fxc/vxc_fxc device
kernels, and ~74 functional types never wired into HIP's builtin
instantiation list at all) are fixed separately.
    hipify.sh naively carried hip::warp_size (64) into several kernels
    where warp_size was actually a fixed 32-wide tile/launch geometry
    inherited from CUDA, not a stand-in for the true wavefront width.
    Compiled and ran fine, but silently produced wrong results.

    - uvvars_gga.hpp/uvvars_mgga.hpp: eval_vvar_{gga,mgga}_kern build a
      shared-memory transpose tile sized/indexed by warp_size; at 64 it
      no longer matched SM_BLOCK or the launch geometry, so reads aliased
      into neighbouring point rows and reductions summed lanes that were
      never written. Revert SM_BLOCK to 32 and pin the tile/launch width
      to a fixed 32, matching CUDA's numbers exactly (no LDS-overflow
      tradeoff needed at that size).

    - collocation shell-to-task kernels (all 50 generated headers):
      my_alpha/my_coeff picked their per-wavefront row via an untranslated
      literal threadIdx.x/32; on a 64-lane wavefront this splits into two
      row groups, one of which is never written and read back as garbage.
      Translate to threadIdx.x/hip::warp_size so the row lines up with the
      wavefront. (Currently unreachable from the HIP dispatch in
      scheme1_base.cxx, but latent and cheap to fix now.)

    - exx_ek_screening_bfn_stats_kernel: warp_lane/warp_id/nwarp and the
      warp_reduce_* widths were carried to 64 while its shared tile stayed
      sized for 32, an out-of-bounds LDS access. Pin them to 32 for this
      kernel only.

    - grid_to_center.hip: compute_grid_to_center_dist's inner loop strided
      by a hardcoded hip::warp_size/2 (32) while its actual blockDim.y is
      8, so only 16 of every 64 points got a distance computed. Stride by
      blockDim.y instead.
…otential)

    pack_submat.cu/cuda_inc_potential.cu's submatrix scatter/gather kernels
    (pack the density into per-task submatrices; gather task-local VXC/K
    contributions back into the global matrix) iterate over CUT_Y/CUT_X-sized
    blocks and WARP_X-wide lanes. WARP_X (16), CUT_X, CUT_Y (8, 8) are plain
    tuning constants, untouched by any cuda::/hip:: translation, on the
    assumption that the launch geometry equals them exactly:
    cuda::warp_size/2 == 16 == WARP_X and
    cuda::max_warps_per_thread_block*2 == 64 == CUT_Y*CUT_X.

    hipify.sh's generic translation instead gave HIP a (32, 32) launch:
    - tid_yy (=threadIdx.y/CUT_X) only reached half of CUT_Y's range, so
      every other block of rows was never visited (undercounting -- this
      was the dominant cause of the systematic low-side EXC/N_EL/VXC
      mismatches in the "XC Integrator" test suite: pack_submat feeds the
      density into the collocation/xmat/uvvars pipeline, so a broken pack
      corrupts the density itself, not just the VXC readback).
    - tid_xy (=threadIdx.x/WARP_X, always 0 on CUDA since blockDim.x==
      WARP_X there) also took 1 on HIP, redundantly re-covering columns
      already handled by tid_xy==0 and double-atomicAdd-ing them -- an
      undefined accumulation order that explains the run-to-run
      non-determinism seen in repeated identical eval_exc_vxc() calls, and
      very likely the NaN/inf seen in the one GKS test case (some
      submatrix regions left reading uninitialised memory).

    Neither kernel body calls a warp-synchronous primitive (only
    atomicAdd), so there's no real dependence on the physical wavefront
    width here at all. Pin the launch geometry to a fixed (16, 64),
    matching CUDA's numbers exactly, the same treatment already used
    elsewhere in this script for launch geometries that are really fixed
    tuning constants rather than warp-width-dependent.
…rnels

    eval_collocation_laplacian threw "Laplacian NYI for HIP Backends"
    unconditionally, blocking any functional with needs_laplacian() (e.g.
    R2SCANL) from running on the Device backend. The underlying
    eval_collocation_shell_to_task_laplacian kernels already exist --
    mechanically hipified from CUDA, including the threadIdx.x/32 ->
    threadIdx.x/hip::warp_size fix applied earlier this session -- and
    l_batched_shell_to_task (their required input) is populated identically
    for both backends in the shared scheme1_data_base.cxx. Wire HIP to call
    the same function CUDA does, mirroring eval_collocation/
    eval_collocation_gradient's unconditional style.

    Note: eval_collocation_hessian/eval_collocation_lapgrad are left as NYI
    for now. They share the same generated kernel family but aren't
    exercised by any current test (check_grad is off for HIP in
    xc_integrator.cxx), so there's no way to validate them yet -- see below.

    This was first tried together with Hessian/Lapgrad enabled and hit a
    cascading `HIPBLAS_STATUS_ALLOC_FAILED` a few sections after the
    R2SCANL ones, unrelated sections included. That pattern -- one test
    starts failing, then everything else in the same process fails with a
    generic error -- is consistent with an asynchronous fault (e.g. an
    out-of-bounds access) in one of the newly-enabled kernels leaving the
    HIP context unusable for the rest of the run; hipGetLastError() right
    after the kernel launch is non-blocking and would not have caught a
    fault that only manifests during actual kernel execution. This wasn't
    confirmed with a debugger/backtrace, so it remains a working
    hypothesis rather than a diagnosed root cause.

    Narrowing the change to Laplacian only and re-testing: 3 consecutive
    full `ctest -V` runs clean at the expected 8 remaining failures (down
    from 10; the 2 R2SCANL sections' 13 newly-exercised EXC/VXC/N_EL
    assertions all pass), plus 10 consecutive HIP_LAUNCH_BLOCKING=1 runs of
    the R2SCANL section in isolation, also clean. Treating this as fixed on
    that basis, though the one earlier crash with Hessian/Lapgrad enabled is
    not fully explained and Hessian/Lapgrad should be investigated
    separately before being enabled.

    Remaining known gap: H3/BLYP/cc-pvdz (GKS) shows small VXC residuals
    (~1e-7 to 1e-10, vs. a 1e-10 test tolerance). The GKS kernel is
    byte-identical between CUDA and HIP (diffed), so this does not look like
    a hipify translation bug.
@ajaypanyala

Copy link
Copy Markdown
Contributor

@wavefunction91 This PR was tested in an end-to-end DFT run on OLCF Frontier, and cross-checked against the CPU/host run.

Hardware / software environment

GPU AMD Instinct MI250X
ROCm 7.2.26015 (module rocm/7.2.0)
Compiler Cray CCE 21.0.2

GauXC CMake configuration

-DGAUXC_ENABLE_HIP=ON
-DROCM_PATH=/opt/rocm-7.2.0
-DCMAKE_HIP_ARCHITECTURES=gfx90a
-DGAUXC_ENABLE_HOST=ON
-DGAUXC_ENABLE_TESTS=OFF
-DGAUXC_ENABLE_OPENMP=OFF
-DGAUXC_ENABLE_MAGMA=OFF
-DGAUXC_ENABLE_HDF5=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_CXX_STANDARD=20
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_COMPILER=/opt/cray/pe/craype/2.7.36/bin/CC
-DCMAKE_C_COMPILER=/opt/cray/pe/craype/2.7.36/bin/cc

System tested

  • System: [FeC16H28N4O2]+ (51 atoms), charge 1, multiplicity 2
    (open-shell doublet, unrestricted/UKS)
  • Basis: def2-qzvpd, spherical -- 2400 basis functions, 754 shells, up to
    g functions (l=4)
  • 193 electrons (97 alpha / 96 beta)

Settings

xc_type           = SCAN            (meta-GGA, UKS path)
xc_exec_space     = Device          (HIP backend)
xc_grid_type      = UltraFine
xc_pruning_scheme = Robust
xc_weight_scheme  = SSF
xc_rad_quad       = MK
xc_batch_size     = 2048
xc_basis_tol      = 1e-08
conve             = 1e-08           (SCF energy convergence)
convd             = 1e-07           (SCF density convergence)

GPU vs. CPU agreement

The same system, using identical settings and configuration, was also run end-to-end on the CPU (host) backend.

Backend Total SCF energy (Ha)
GPU (AMD MI250X, HIP backend) -2259.8835940119038
CPU (host backend) -2259.8835940113800
Difference 5.2e-10 Ha

wavefunction91 added a commit to susilehtola/GauXC that referenced this pull request Nov 25, 2026
Adds artifacts for wavefunction91#235, wavefunction91#232, wavefunction91#221, wavefunction91#226, wavefunction91#81 and wavefunction91#170, and records posting caveats.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
wavefunction91 added a commit to susilehtola/GauXC that referenced this pull request Nov 25, 2026
…pending Frontier reconciliation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants