Skip to content

Add optional workflow that runs the CUDA tests on a simulated H100 - #233

Closed
saqibkh wants to merge 2 commits into
wavefunction91:masterfrom
saqibkh:add-gpu-sim-ci
Closed

saqibkh wants to merge 2 commits into
wavefunction91:masterfrom
saqibkh:add-gpu-sim-ci

Conversation

@saqibkh

@saqibkh saqibkh commented Nov 13, 2026 •

Copy link
Copy Markdown

The "NVIDIA Build (No Test)" job compiles the CUDA backend, but its Test step is commented out because the hosted runners have no GPU. This adds a separate, optional workflow .github/workflows/gpu-sim.yml that builds the same CUDA configuration and runs gauxc_test on a simulated NVIDIA H100 using PantheonSim (no GPU needed). I am the author of PantheonSim, so please weigh this accordingly.

It adds one file, changes no source and no existing workflow, and is not meant to be a required check. A simulator cannot reproduce hardware-specific behavior or timing, so it complements real-GPU testing and does not replace it.

What the workflow does:

  • Runs on manual dispatch and on pull requests to master that touch include/, src/, tests/, cmake/, CMakeLists.txt or the workflow, with a concurrency group that cancels superseded runs.
  • Installs CUDA 13.0 and the simulated H100 with pantheongpu/setup-pantheonsim (pinned by commit), plus libhdf5-dev, libopenblas-dev and ninja-build from apt. ExchCXX, Libxc, gau2grid, IntegratorXX, HighFive, Eigen and Catch2 come through the existing FetchContent paths.
  • Configures with GAUXC_ENABLE_CUDA=ON and MPI, MAGMA, CUTLASS and NCCL off (as in the "NVIDIA Build" job), CMAKE_CUDA_ARCHITECTURES=90-virtual (PTX only, which the simulator runs) and CMAKE_CUDA_RUNTIME_LIBRARY=Shared (the simulator needs the shared CUDA runtime; GauXC itself already links CUDA::cudart unless GAUXC_LINK_CUDA_STATIC is set, so nothing is patched).
  • Runs vgpu run ./build/tests/gauxc_test "~[xc-integrator]".

What runs on the simulated GPU (from the simulator's per-kernel counters):

  • [collocation]: the CUDA collocation sections, which launch collocation_device_masked_combined_kernel (plus _deriv1) and the collocation_device_shell_to_task_kernel_* kernels for l = 0, 1, 2 (value, gradient, Hessian, Laplacian and Laplacian gradient), compared with water_cc-pVDZ_collocation.hdf5.
  • [weights]: "Device Weights", which launches compute_grid_to_center_dist and modify_weights_ssf_kernel_1d, compared with benzene_weights_ssf.hdf5.
  • [load_balancer]: "Default Device", which launches load_balancer::cuda::collision_detection_gpu, bitvector_to_position_list and a CUB scan, and checks that host and device tasks are identical.
  • [runtime] constructs, copies and moves DeviceRuntimeEnvironment (device memory, streams, cuBLAS handles) without launching kernels. The other tags ([c-api], [dd], [orbital_evaluator], ...) launch no kernels.

The workflow now also runs the smallest device case of "XC Integrator" (Li / SVWN5 / sto-3g). The larger molecules take 8 to 24 minutes each on the simulator, so they stay out; their host sections already run in "Release Build and Test". Run with setup-pantheonsim v0.1.8: https://github.com/saqibkh/GauXC/actions/runs/43538139755 .

Measured on my fork (hosted ubuntu-24.04 runners):

Not covered:

  • The device XC integrator cases other than Li / SVWN5 / sto-3g, and "XC Integrator FXC".
  • cuBLAS results: the simulator computes cuBLAS calls on the host, so they are not a test of cuBLAS itself.
  • MPI, MAGMA, CUTLASS, NCCL and the HIP backend.

@saqibkh

saqibkh commented Nov 17, 2026

Copy link
Copy Markdown
Author

Closing this for now and cleaning up our fork. Thanks for taking a look, and we are happy to open a fresh PR if it would be useful.

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.

1 participant