Skip to content

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

Open
saqibkh wants to merge 1 commit into
cppalliance:developfrom
saqibkh:add-gpu-sim-ci
Open

saqibkh wants to merge 1 commit into
cppalliance:developfrom
saqibkh:add-gpu-sim-ci

Conversation

@saqibkh

@saqibkh saqibkh commented Nov 10, 2026 •

Copy link
Copy Markdown

The cuda-cmake-test job in ci.yml builds the CUDA tests but does not run them, because the hosted runners have no GPU. This adds a separate, optional workflow .github/workflows/gpu-sim.yml that builds the same tests and runs them on a simulated NVIDIA H100, using PantheonSim (via the pantheongpu/setup-pantheonsim action, pinned by SHA). I am the author of PantheonSim, so please weigh this accordingly. The same simulator already runs in the boostorg/math CI.

It does not touch ci.yml and is not meant to be a required check. A simulator cannot reproduce hardware-specific behavior or timing, so it complements the real-GPU runs and does not replace them.

What it does:

  • Installs CUDA 13.0 and the simulated H100, clones Boost and configures with -DBOOST_INT256_ENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES=90-virtual -DCMAKE_CUDA_STANDARD=17 -DCMAKE_CUDA_RUNTIME_LIBRARY=Shared (PTX-only device code and a shared CUDA runtime, which the simulator needs).
  • Runs as a single job: builds all the CUDA run targets with -j3 and runs all 86 CTest entries with vgpu run ctest -j3.
  • Triggers: workflow_dispatch and pull_request to develop limited to include/, test/, CMakeLists.txt and the workflow itself. A concurrency group cancels superseded runs, with permissions: contents: read.

What is left out:

  • Only C++17 is covered, not 20 and 23 (the existing job still builds those), and only one architecture (H100) and CUDA 13.0.
  • Nothing is excluded from the test run: all 86 entries (85 .cu tests plus the example/cuda.cu example) pass.
  • I did not compare against a real GPU in this run.

Result on a fork: one job, 100% tests passed, 0 tests failed out of 86. On a cold cache the job took about 32 minutes in total: the action's simulator setup about 20 minutes, building all the tests 8 minutes and running them 3.6 minutes. The managed-memory harness (cudaMallocManaged) works under the simulator. I also checked that a test fails when its kernel output is made wrong (the test reports a verification failure and exits 1).

Run: https://github.com/saqibkh/int256/actions/runs/43017538599

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