Commit b94de78
authored
Fix cuda_toolkit_check driver version and add cuda-bindings dep (#148)
## Summary
Two related fixes surfaced while smoke-testing #137 on a fresh Brev box:
- **`cuda_toolkit_check` was reading the kernel driver, not the CUDA
driver.** `get_driver_version(kernel_mode=True)` returns the NVIDIA
kernel module version (e.g. `580` from `580.126.09`), not the CUDA
Driver API version (e.g. `13` from CUDA 13.0). The verbose message also
printed `Driver supports CUDA 580`, which is what tipped this off.
Dropping `kernel_mode=True` makes `get_driver_version()` default to the
CUDA Driver API mode and the comparison logic actually fires.
- **`cuda-bindings` is now declared as a runtime dep, and the conda
recipe gets the missing `cuda-core` it should have had since #141.**
`cuda-core` calls into `cuda.bindings.driver` via lazy import and
without `cuda-bindings` installed, `cuda_toolkit_check` raises
`ImportError: cuda.bindings 12.x or 13.x must be installed` on a fresh
`pip install rapids-cli`. The pin `>=12.9.6,!=13.0.*,!=13.1.*` excludes
the cuda-bindings 13.0/13.1 wheels and is compatible with both CUDA 12
and CUDA 13 driver hosts (verified with cuda-bindings 12.9.6 against a
CUDA 13 environment and cuda-bindings 13.2 against a CUDA 12
environment).
A regression test
(`test_gather_toolkit_info_driver_major_is_cuda_major`) exercises
`_gather_toolkit_info()` end-to-end and asserts `driver_major < 100` to
ensure that we are getting the CUDA major version and not the driver
version
Closes #145.
---------
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>1 parent a64f0b0 commit b94de78
5 files changed
Lines changed: 22 additions & 2 deletions
File tree
- conda/recipes/rapids-cli
- rapids_cli
- doctor/checks
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | 176 | | |
178 | | - | |
| 177 | + | |
179 | 178 | | |
180 | 179 | | |
181 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
0 commit comments