diff --git a/conda/recipes/rapids-cli/recipe.yaml b/conda/recipes/rapids-cli/recipe.yaml index 4e3ad4a..7b1d499 100644 --- a/conda/recipes/rapids-cli/recipe.yaml +++ b/conda/recipes/rapids-cli/recipe.yaml @@ -31,6 +31,8 @@ requirements: run: - python - importlib-metadata >=4.13.0 + - cuda-bindings >=12.9.6,!=13.0.*,!=13.1.* + - cuda-core >=0.6.0 - cuda-pathfinder >=1.2.3 - nvidia-ml-py >=12.0 - packaging diff --git a/dependencies.yaml b/dependencies.yaml index d312739..3afec7e 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -62,6 +62,10 @@ dependencies: - output_types: [conda, requirements, pyproject] packages: - cuda-core >=0.6.0 + # NVML APIs we use via cuda.core.system landed in cuda-bindings + # 12.9.6 (CUDA 12) and 13.2.0 (CUDA 13). The 13.0/13.1 + # wheels pre-date the 13.x landing and are excluded. + - cuda-bindings>=12.9.6,!=13.0.*,!=13.1.* - nvidia-ml-py>=12.0 - cuda-pathfinder >=1.2.3 - packaging diff --git a/pyproject.toml b/pyproject.toml index 882cc68..b2c0d4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ license-files = ["LICENSE"] readme = "README.md" requires-python = ">=3.10" dependencies = [ + "cuda-bindings>=12.9.6,!=13.0.*,!=13.1.*", "cuda-core >=0.6.0", "cuda-pathfinder >=1.2.3", "importlib-metadata >= 4.13.0; python_version < '3.12'", diff --git a/rapids_cli/doctor/checks/cuda_toolkit.py b/rapids_cli/doctor/checks/cuda_toolkit.py index d2a3df8..109dd26 100644 --- a/rapids_cli/doctor/checks/cuda_toolkit.py +++ b/rapids_cli/doctor/checks/cuda_toolkit.py @@ -173,9 +173,8 @@ def _gather_toolkit_info() -> CudaToolkitInfo: # pragma: no cover except (DynamicLibNotFoundError, RuntimeError): info.missing_libs.append(soname) - # Get driver version try: - info.driver_major = get_driver_version(kernel_mode=True)[0] + info.driver_major = get_driver_version()[0] except Exception: info.driver_major = None diff --git a/rapids_cli/tests/test_cuda_toolkit.py b/rapids_cli/tests/test_cuda_toolkit.py index 7487bbf..70e40eb 100644 --- a/rapids_cli/tests/test_cuda_toolkit.py +++ b/rapids_cli/tests/test_cuda_toolkit.py @@ -8,6 +8,7 @@ from rapids_cli.doctor.checks.cuda_toolkit import ( CudaToolkitInfo, _ctypes_cuda_version, + _gather_toolkit_info, _get_toolkit_cuda_major, cuda_toolkit_check, ) @@ -176,3 +177,16 @@ def test_check_cuda_home_newer_than_driver(set_toolkit_info): ): with pytest.raises(ValueError, match="CUDA_HOME"): cuda_toolkit_check() + + +def test_gather_toolkit_info_driver_major_is_cuda_major(): + """Regression: driver_major must be the CUDA Driver API major, not the kernel driver major.""" + try: + info = _gather_toolkit_info() + except Exception as e: + pytest.skip(f"_gather_toolkit_info unavailable on this platform: {e}") + if info.driver_major is not None: + assert info.driver_major < 100, ( + f"driver_major={info.driver_major} looks like a kernel driver " + f"version, not a CUDA Driver API major" + )