Skip to content

ci: build the Windows CUDA path (nvcc + MSVC host) — the one toolchain no job covers#327

Merged
JustVugg merged 1 commit into
JustVugg:devfrom
lEWFkRAD:ci/windows-cuda-build
Jul 16, 2026
Merged

ci: build the Windows CUDA path (nvcc + MSVC host) — the one toolchain no job covers#327
JustVugg merged 1 commit into
JustVugg:devfrom
lEWFkRAD:ci/windows-cuda-build

Conversation

@lEWFkRAD

Copy link
Copy Markdown
Contributor

Follow-up to #157 — closing the gap rather than just reporting it.

engine-cuda-syntax compiles backend_cuda.cu with nvcc's GCC host on Linux, and check.yml's windows job is MinGW/UCRT64 CPU-only by design (#140). Neither exercises nvcc's MSVC host — the only host compiler nvcc accepts on Windows — so make cuda-dll and make glm CUDA_DLL=1 are built by nothing in CI today.

That gap has already cost real bugs, and every one was compile-time, catchable with no GPU present:

Two Windows facts the job encodes — both found by making it fail first, not by reading docs:

  1. sub-packages needs "cudart", not just "nvcc". cuda-dll links the runtime, and on Windows the headers/import lib ship as a separate installer component. With '["nvcc"]' alone it dies at #include <cuda_runtime.h>. The Linux syntax job never notices because it only compiles.
  2. runs-on: windows-2022, not windows-latest. The latest image now ships Visual Studio 18 (MSVC 14.5x), and CUDA's crt/host_config.h hard-errors on any host newer than VS 2022 ("Only the versions between 2017 and 2022 (inclusive) are supported"). That's a live constraint on every Windows CUDA user right now, so the pin tracks what the toolkit actually supports. -allow-unsupported-compiler would only mask it.

Build-only on purpose. Hosted runners have no NVIDIA device, so this proves the Windows+MSVC CUDA build stays buildable — not that the kernels or the DLL loader behave on real silicon. That still needs hardware (the sm_120 matrix in #157). I kept the scope explicit in the comments because a check that overclaims buys exactly the false confidence the engine-cuda-syntax comment already warns about.

It goes in ci.yml rather than check.yml deliberately — check.yml promises "no model downloads, no CUDA, no external deps — by design (#140)", and this needs an external toolkit action. Not going to break that contract.

Verified green on my fork before opening this, so it isn't landing in your queue untested: https://github.com/lEWFkRAD/colibri/actions/runs/29524302993

Creating library coli_cuda.lib and object coli_cuda.exp
coli_cuda.dll built (MSVC host)
glm.exe built against the DLL loader

Adds ~2 min to CI (the toolkit install dominates). Happy to gate it to paths (c/backend_cuda.*, c/backend_loader.c, c/Makefile) if you'd rather it not run on every PR — say which and I'll adjust.

…n no job covers

engine-cuda-syntax compiles backend_cuda.cu with nvcc's GCC host on Linux, and
check.yml's windows job is MinGW/UCRT64 CPU-only by design (JustVugg#140). Neither
exercises nvcc's MSVC host — the only host compiler nvcc accepts on Windows — so
`make cuda-dll` and `make glm CUDA_DLL=1` are currently built by nothing.

The gap has already cost real bugs, all compile-time, all catchable without a GPU:

  - JustVugg#158: MSVC rejects the GCC-style -Xcompiler=-Wall,-Wextra ("D8021 invalid
    numeric argument '/Wextra'"), CUDA_HOME/NVCC defaults were unresolvable, and
    the kernel test used POSIX setenv. `make cuda-dll` was unbuildable as shipped.
  - JustVugg#314: CUDA_HOME containing spaces — the CUDA installer's default layout. This
    job installs to exactly that path, so it reproduces the condition by default.

Two Windows-specific facts the job encodes, both verified by making it fail first:

  - sub-packages needs "cudart", not just "nvcc": cuda-dll *links* the runtime, and
    on Windows the headers/import lib are a separate installer component. With
    '["nvcc"]' alone it dies at `#include <cuda_runtime.h>` — the Linux syntax job
    never notices because it only compiles.
  - runs-on is pinned to windows-2022: windows-latest now ships Visual Studio 18
    (MSVC 14.5x) and CUDA's crt/host_config.h hard-errors on any host newer than
    VS 2022. That is a real constraint on every Windows CUDA user today, so the pin
    tracks what the toolkit supports rather than papering over it with
    -allow-unsupported-compiler.

Build-only on purpose: hosted runners have no NVIDIA device, so this proves the
Windows+MSVC CUDA build stays buildable, not that the kernels or the DLL loader
behave on real silicon — that still needs hardware (JustVugg#157). A check that overclaims
buys the false confidence the engine-cuda-syntax comment already warns about.

Verified green on a fork before proposing:
https://github.com/lEWFkRAD/colibri/actions/runs/29524302993

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JustVugg
JustVugg merged commit 57030ab into JustVugg:dev Jul 16, 2026
8 checks passed
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