Skip to content

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

Open
saqibkh wants to merge 1 commit into
rdm375:mainfrom
saqibkh:add-gpu-sim-ci
Open

saqibkh wants to merge 1 commit into
rdm375:mainfrom
saqibkh:add-gpu-sim-ci

Conversation

@saqibkh

@saqibkh saqibkh commented Nov 9, 2026

Copy link
Copy Markdown

Both existing workflows configure with -DTHERMOGPU_ENABLE_CUDA=OFF, so the hosted runners never build or run the CUDA backend, including pr_cuda_batch and pr_cuda_differential. This adds a separate, optional workflow .github/workflows/gpu-sim.yml that builds with CUDA on and runs ctest on a simulated NVIDIA H100 using PantheonSim (no GPU needed). I am the author of PantheonSim, so please weigh this accordingly.

It does not touch ci.yml or cpu.yml 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 it does:

  • installs the CUDA 13.0 toolkit and the simulated H100
  • configures with -DTHERMOGPU_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=90-virtual -DCMAKE_CUDA_RUNTIME_LIBRARY=Shared (CMakeLists.txt sets no CUDA architecture; the simulator runs the embedded PTX and needs a shared CUDA runtime)
  • builds, then runs ctest under vgpu run
  • runs on manual dispatch and on pull requests to main that touch src/, include/, tests/, apps/, cmake/ or CMakeLists.txt, with a concurrency group that cancels superseded runs

Notes:

  • Run on my fork: https://github.com/saqibkh/ThermoGPU/actions/runs/42719561354 . 23 of 23 tests passed, including pr_cuda_batch, pr_cuda_differential and the CUDA parity tests.
  • thermomodel_pr_tp_cuda_parity is excluded (24 tests in total). Its tolerance is 1e-12, and the simulated H100 gives a scaled error of 1.04e-12 at 3 of 4,816,368 comparisons (T=1156, p=125.89, field 14). The same PTX built for 86-virtual gives at most 9.1e-13 on an RTX 3060. The kernel takes reciprocals from rcp.approx.ftz.f64 followed by Newton steps, and the low bits of that instruction are not specified, so I read this as a tight tolerance and not a bug in either side. The comment in the workflow says so. If you would rather keep the test, a slightly looser tolerance there would let it run.
  • Timing on the hosted runner: about 18 minutes for simulator and toolkit setup, 26 seconds for the build, 2 seconds for the tests.

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