Skip to content

CI: run the GPU unit tests on a simulated GPU - #265

Open
saqibkh wants to merge 1 commit into
ipc-sim:mainfrom
saqibkh:ci-simulated-gpu
Open

saqibkh wants to merge 1 commit into
ipc-sim:mainfrom
saqibkh:ci-simulated-gpu

Conversation

@saqibkh

@saqibkh saqibkh commented Sep 30, 2026 •

Copy link
Copy Markdown

The CUDA workflow builds the tests with IPC_TOOLKIT_WITH_CUDA=ON, but the runners have no GPU, so the [gpu] and [cuda] tests (distances, normals, tangent bases, the GPU barrier, the LBVH build and candidate detection) never run. This runs them on a simulated NVIDIA T4, in both the Debug and Release jobs.

How: PantheonSim, via pantheongpu/setup-pantheonsim, installs the CUDA toolkit and simulates the GPU on the runner's CPU. The kernels run from their PTX (architecture 75 embeds it), so the results are real. There is no timing model, so this checks correctness, not performance.

Changes, all in cuda.yml:

  • Jimver/cuda-toolkit is replaced by setup-pantheonsim, with CUDA 12.8.
  • permissions: contents: read for the workflow.
  • Configure adds -DCMAKE_CUDA_RUNTIME_LIBRARY=Shared, because the simulator stands in for the CUDA runtime.
  • A new Tests step runs ipc_toolkit_tests "[gpu]~[ccd]~[.],[cuda]~[stq]~[.]": every GPU test except the CCD and STQ cases on the cloth-ball and puffer-ball meshes, which take several minutes each on a simulated GPU, and the hidden benchmarks.

What it can touch: the action is pinned by commit (v0.1.1), not by a tag, and it pins the simulator it builds by commit too, so nothing in the job changes until you move the pin. The workflow's token is read-only (permissions: contents: read), and the action uses no token or secrets; it installs packages only from Ubuntu's and NVIDIA's repositories. Because this changes the existing CUDA jobs, a problem on the simulator's side would show as a failed CUDA job; if you'd rather it never block anything, the Tests step can take continue-on-error: true, and I'm happy to add that.

What it gives, from a run on my fork:

  • 26 GPU test cases (158,965 assertions) pass in both jobs, in two to three minutes.

Disclosure: I maintain PantheonSim. If the job is ever flaky or wrong, please open an issue at pantheongpu/pantheonsim and I'll fix it on our side.

The CUDA workflow builds the tests but has no GPU to run them on.
PantheonSim simulates one on the runner's CPU; the job now runs the
[gpu] and [cuda] unit tests there, apart from the CCD and STQ cases on
the large meshes, which take minutes each simulated.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant