Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conda/recipes/rapids-cli/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- cuda-core >=0.6.0
- cuda-bindings>=12.9.6,!=13.0.*,!=13.1.*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to add a comment here and pyproject.toml with the reason behind this.

- nvidia-ml-py>=12.0
- cuda-pathfinder >=1.2.3
- packaging
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down
3 changes: 1 addition & 2 deletions rapids_cli/doctor/checks/cuda_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we purposely grabbing the user-mode driver version, e.g. 13.0.1. Instead of passing kernel_mode=True to grab kernel-mode driver version, e.g. 580.65.06.

except Exception:
info.driver_major = None

Expand Down
14 changes: 14 additions & 0 deletions rapids_cli/tests/test_cuda_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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, (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to follow what are we testing here. Looks like we are testing that the major version of Are user-mode driver version, e.g. 13 in 13.0.1 is < 100 .

Don't we need to grab kernel-mode driver version, e.g. 580.65.06 like we we were doing? until now

f"driver_major={info.driver_major} looks like a kernel driver "
f"version, not a CUDA Driver API major"
)
Loading