Skip to content

cuda: the release server refuses a GPU it has no kernels for, by name, at startup (#2904) - #2914

Merged
ashhart merged 6 commits into
mainfrom
lead/cuda-unsupported-gpu-refusal
Nov 14, 2026
Merged

ashhart merged 6 commits into
mainfrom
lead/cuda-unsupported-gpu-refusal

Conversation

@ashhart

@ashhart ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Fixes #2904.

The Linux release server carries CUDA kernels for a fixed set of compute capabilities, but on any other NVIDIA GPU nothing refused at startup: the model stopped at its first kernel load with CUDA_ERROR_NO_BINARY_FOR_GPU (209).

  • The release runtime receives the same release_sms list the fatbin validator uses (zig/build/cuda.zig), with no copied list.
  • At Context.init, a GPU whose capability isn't in that list is refused before the primary context is retained, before any allocation or module load. The message names the GPU, its compute capability and the capabilities this build has kernels for.
  • -Dgpu builds keep their existing refusal, and its text and tests are unchanged.
  • capabilities --json adds kernels (whether this build has kernels for the detected GPU) and kernel_sms, from a capability query that needs no context.

No change on supported GPUs.

Tests (fake driver, real context and serializer): an sm_90 device is refused with the named message, zero retains and zero module loads. An sm_121 device starts with one retain and no refusal, and releases it. The JSON pins false and true and every list member. Disabling the check, or planting wrong metadata, turns the tests red. Full CUDA host 6176/6215 (39 skipped), and the arm64 Linux CUDA tests compile.

Not yet checked on a device: a GB10 start and serve on this head (the supported path).

@ashhart
ashhart force-pushed the lead/cuda-unsupported-gpu-refusal branch from d78191e to d5bce84 Compare November 12, 2026 14:15
@ashhart

ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Status on this head: one change before it lands. The startup check matched the GPU's compute capability exactly against the release list (80, 86, 120, 121), so it would have refused GPUs that today's release server runs: an RTX 4090, L4 or L40S (sm_89) and a Jetson Orin (sm_87). The driver runs sm_80 and sm_86 SASS on any later 8.x GPU, and nearly every kernel in the release images is built for those two.

supports now goes through covers (zig/src/cuda/kernels.zig:27): a target serves the same SM, or, below sm_90 where no image is arch-specific, a GPU of the same major with an equal or higher minor. From sm_120 on, some images are sm_120a/sm_121a and run on that SM alone, so those still need an exact match. An H100 (sm_90), a B200 (sm_100) and a T4 (sm_75) are still refused by name. capabilities --json reports "kernels": true for an sm_89 GPU.

The new host test starts sm_80, 86, 87, 89 and 120 with one retain and no refusal, and refuses sm_75, 90, 100 and 122 before any retain (zig/cuda_sm_host.zig). With the old exact match it fails on sm_87, and the JSON test fails on sm_89.

Still owed: a GB10 start and serve on this head.

  • Synthena (Ash's Agent)

…m_86 SASS

An exact match against the release list (80, 86, 120, 121) refused an
RTX 4090, L4 or L40S (sm_89) and Jetson Orin (sm_87), which today's
release server runs: the driver runs sm_80 and sm_86 SASS on any later
8.x GPU. Below sm_90 no image is arch-specific, so a target now serves a
GPU of the same major and an equal or higher minor; from sm_120 on some
images are sm_120a or sm_121a, so those still need the exact SM. The new
host test fails on sm_87 with the exact match.
@ashhart
ashhart force-pushed the lead/cuda-unsupported-gpu-refusal branch from 574ad54 to f9c95a0 Compare November 14, 2026 14:19
@ashhart
ashhart merged commit 2ab3cd5 into main Nov 14, 2026
2 of 10 checks passed
@ashhart
ashhart deleted the lead/cuda-unsupported-gpu-refusal branch November 14, 2026 14:19
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.

CUDA release server: refuse a GPU it has no kernels for at startup, by name (today: CUDA error 209 at the first kernel load)

1 participant