Repository navigation
CI: unit and regression tests on a simulated GPU - #110
Conversation
ccpp.yml builds GPUJPEG on runners with no GPU, so nothing that encodes or decodes runs in CI. A new workflow runs the unit tests and the regression suite on a simulated NVIDIA T4 (PantheonSim, via setup-pantheonsim), on pushes and pull requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
thanks, I think that PantheonSim is superb
I've already moved cudaGraphicsUnmapResources() inside OpenGL interop include guard so that it can be linked also with simulator libcudart if the interop is disabled. As a consequence, |
|
Thanks again for merging this. One small ask, only if it fits: if the docs have a CI or contributing section, a line saying the GPU tests run on a simulated GPU (PantheonSim, the GPU simulator for CUDA and ROCm, https://pantheonsim.com/ci/) would help contributors without a GPU understand why those jobs are green. Happy to open a docs PR for it if you point me at the right file. I maintain PantheonSim. |
ccpp.ymlbuilds GPUJPEG on GitHub's runners, which have no GPU, so nothing that encodes or decodes runs in CI. This adds a workflow that runs the unit tests and the regression suite on a simulated NVIDIA T4, on pushes todevelandmasterand on pull requests.How: PantheonSim, via
pantheongpu/setup-pantheonsim, simulates the GPU on the runner's CPU. The kernels run from their PTX (CMAKE_CUDA_ARCHITECTURES=75embeds it), so the results are real. There is no timing model, so this checks correctness, not performance.Changes: one new workflow,
.github/workflows/simulated-gpu.yml, onubuntu-24.04:CMAKE_CUDA_ARCHITECTURES=75and the shared CUDA runtime;ctest -R 'unittests|regression'undervgpu run, which puts the simulated GPU's libraries in place for the tests only. The build links against the toolkit's ownlibcudart, becauselibgpujpegreferences the OpenGL interop calls even when OpenGL is off.ccpp.ymlis unchanged.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. The job isn't a required check, so a red run never blocks a merge unless you decide it should.What it gives, from a run on my fork:
unittestsandregressionboth pass; the tests take under a minute.Disclosure: I maintain PantheonSim. Running GPUJPEG's tests found three gaps in its CUDA runtime that are now fixed: copy directions, symbol copies from device memory, and the cache-preference calls. If the job is ever flaky or wrong, please open an issue at pantheongpu/pantheonsim and I'll fix it on our side.