Repository navigation
cuda: refuse a driver older than CUDA 13.0 before any kernel image loads - #1791
Merged
Merged
Conversation
The release fatbins are built with nvcc 13.0. On an R550 driver (cuDriverGetVersion 12040) the first cuModuleLoadData of any of them ends the process with SIGILL inside libcuda instead of returning an error. NVIDIA's minor version compatibility runs CUDA 13.x applications on drivers 580 and newer. Driver.openPath now reads cuDriverGetVersion after cuInit and refuses a driver below 13000, or one that reports no version, with a message naming the CUDA version it runs and the driver needed (R580 or newer). Every CUDA path opens the driver there before it loads an image. README and RUNBOOK state the floor before the download step. A host test drives the check through a fake cuDriverGetVersion: 12.4 and 12.9 are refused with the message, 13.0 and 13.2 pass, and a failed read or a reported 0 is refused. Fixes ashhart#1724
ashhart
force-pushed
the
fix-1724-driver-floor
branch
from
October 31, 2026 23:48
132310e to
bc56b56
Compare
Owner
|
Thank you @rootsbymenda. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The release fatbins are built with nvcc 13.0 (
docs/kernel-contract.md), and on an R550 driver the firstcuModuleLoadDataof any of them ends the process with SIGILL inside libcuda (#1724).Driver.openPathnow readscuDriverGetVersionright aftercuInit, before any image loads, and refuses a driver below 13000 witherror.DriverTooOldand a message naming the CUDA version it runs and the driver needed:README and RUNBOOK state the floor in the Linux install text, before the download step.
The floor comes from NVIDIA's CUDA 13 release notes: Table 2 maps CUDA 13.0 to driver branch R580, and Table 3 gives
>= 580as the minimum for 13.x under minor version compatibility ("Existing CUDA 13.x applications run on drivers >=580"). So 13000 also admits images built from source with a later 13.x nvcc. An R580 driver reports exactly 13000; the GB10 below, on 580.178.04, does.Your reply doesn't say what to do when the driver reports no version. This refuses it too, both a failed
cuDriverGetVersionand a reported 0, because such a driver can't be shown to load the images, and the message still names the driver to install. It's one line to admit it instead if you prefer.Every CUDA path opens the driver through
openPathbeforemodule.zigloads an image, so the check sits in one place.Fixes #1724
Stacked on: nothing (based on main
fbbc20d0f).Receipt
132310eeaon mainfbbc20d0f; Zig 0.17.0; kernels built with nvcc 13.0.88, the release compiler. x86_64: Ubuntu 24.04.5, RTX 5090 (sm_120), driver 595.99.02 (cuDriverGetVersion13020). aarch64: DGX Spark, GB10 (sm_121), driver 580.178.04 (13000, exactly the floor). No checkpoint: the check runs before any model or image loads.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: n/a. No kernel, sum or token path changes; the check runs once when the driver opens.tools/bench_openai.py: n/a, for the same reason (onecuDriverGetVersioncall at startup).driver.zig, run bytest-cuda-hostandtest): a fakecuDriverGetVersiondrivesDriver.tooOld. 12.4 and 12.9 are refused with the message; 13.0 and 13.2 are admitted; a reported 0 and a failed read are refused. Control: the same test against main'sopenPath, which has no floor, fails at the 12.4 case (expected the refusal, foundadmitted).libcuda.so.1shim that forwards to the real driver, reports a chosencuDriverGetVersion, and raises SIGILL incuModuleLoadDataas R550 does. Results:qwen4_hc48,qwen4_ple40,qwen4_projection20,qwen4_gdn20,qwen3515,qwen35_kv815,nvfp4_experts_tile10;qwen35_kv86,qwen354,nvfp4_experts_tile2,qwen35_keep1.exl3_load.test.a scan that fails an allocation frees every group prefix it heldreturnserror.NondeterministicMemoryUsagefromcheckAllAllocationFailureson mainfbbc20d0fas well.atc overlap --base fbbc20d0f:README.mdis shared with open PRs; none of them conflicts with this change (checked withgit merge-tree: lfm2_moe: serve LFM2.5-24B-A2B on CUDA (plain serve, shared kernels) #1492, lfm2_moe CUDA: attention pages from the shared KV pool, and the prompt cache (stacked on #1492) #1503 and TensorFold Web: a small local web app, andtensorfold webto open it #1781 conflict with main the same way with or without it).Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Not measured; no token path changes.)SUMMARYline is in the receipt. (No kernel changes; the GB10SUMMARYline is above.)