Skip to content

[WIP] Add an optional workflow that runs popsift-demo on a simulated H100 - #213

Open
saqibkh wants to merge 2 commits into
alicevision:developfrom
saqibkh:add-gpu-sim-ci
Open

saqibkh wants to merge 2 commits into
alicevision:developfrom
saqibkh:add-gpu-sim-ci

Conversation

@saqibkh

@saqibkh saqibkh commented Nov 8, 2026 •

Copy link
Copy Markdown

The CUDA CI here only builds PopSift in the deps containers, because the hosted runners have no GPU, so nothing ever runs the kernels. This adds a separate, optional workflow .github/workflows/gpu-sim.yml that builds PopSift for CUDA and runs popsift-demo 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.

It does not touch the existing workflows 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 CUDA 13.0 and the simulated H100, installs Boost, and configures a Release shared-library build with CMAKE_CUDA_ARCHITECTURES=90-virtual (PTX only, which is what the simulator runs; the default all-major is a cache variable, so no CMake change is needed).
  • Generates a 512x512 PGM of random Gaussian blobs and runs popsift-demo on it in all six descriptor modes (loop, iloop, grid, igrid, notile, vlfeat). Each run must report 212 keypoints and 270 descriptors, and keypoint positions must be identical across modes.
  • For loop and vlfeat, which do not use texture interpolation, the sorted output must also match, byte for byte, what an RTX 3060 (built for sm_86) produces. For the interpolating modes only positions and counts are checked: the descriptor values differ from the hardware by a few units in about 0.5% of the components, which I attribute to the hardware texture filter's fixed-point weights.
  • Triggers: workflow_dispatch, and pull_request only when the ready label is added or on later pushes to a PR that carries it, limited to src/, cmake/, CMakeLists.txt and the workflow itself. A concurrency group cancels superseded runs, with permissions: contents: read.

What is left out:

  • The Oxford dataset test (PopSift_USE_TEST_CMD) is not used: it needs a download and only prints descriptors without comparing them.
  • popsift-match is built but not run.
  • Only H100 and CUDA 13.0 are covered, in Release only. The golden checksums for loop and vlfeat come from one nvcc 13.0 build, so they may need regenerating if the kernels or the test image change on purpose.

Result on a fork: the run passed. The whole job took about 17.7 minutes on a cold cache, of which about 15.5 minutes was the action setting up the simulator. The build took about 40 seconds and the six popsift-demo runs about 66 seconds.

Run: https://github.com/saqibkh/popsift/actions/runs/42384675110

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@griwodz

griwodz commented Nov 13, 2026

Copy link
Copy Markdown
Member

This is a CI workflow that is very desirable because it can actually test whether CUDA code works on one of the more prominent GPUs today. On the other hand, it is a very heavy workflow that shouldn't run for every update of every PR that is still under development.

Is there any simple way of activating this workflow selectively? I could imagine a scenario where it runs only when the tag "Ready" is added to a PR.

@saqibkh

saqibkh commented Nov 13, 2026

Copy link
Copy Markdown
Author

Thanks, that makes sense. I've changed it so it only runs on demand, using the existing ready label:

  • Adding the ready label to a PR starts a run.
  • While the label stays on, each new push to that PR runs it again (a newer push cancels a run still in progress).
  • Removing the label stops it: later pushes don't run it.
  • It can also be started by hand from the Actions tab ("Run workflow"), on any branch.

Opening a PR or pushing to one without the label doesn't run it, and adding some other label doesn't either. The path filter is unchanged, so it still only applies to PRs that touch src/, cmake/, CMakeLists.txt or the workflow itself. Label matching in GitHub's contains() is case-insensitive, so Ready and ready both work.

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.

2 participants