Fix cuda_toolkit_check driver version and add cuda-bindings dep#148
Open
jayavenkatesh19 wants to merge 4 commits intorapidsai:mainfrom
Open
Fix cuda_toolkit_check driver version and add cuda-bindings dep#148jayavenkatesh19 wants to merge 4 commits intorapidsai:mainfrom
jayavenkatesh19 wants to merge 4 commits intorapidsai:mainfrom
Conversation
ncclementi
reviewed
Apr 30, 2026
| # Get driver version | ||
| try: | ||
| info.driver_major = get_driver_version(kernel_mode=True)[0] | ||
| info.driver_major = get_driver_version()[0] |
Contributor
There was a problem hiding this comment.
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.
| - output_types: [conda, requirements, pyproject] | ||
| packages: | ||
| - cuda-core >=0.6.0 | ||
| - cuda-bindings>=12.9.6,!=13.0.*,!=13.1.* |
Contributor
There was a problem hiding this comment.
Do you want to add a comment here and pyproject.toml with the reason behind this.
| 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, ( |
Contributor
There was a problem hiding this comment.
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
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.
Summary
Two related fixes surfaced while smoke-testing #137 on a fresh Brev box:
cuda_toolkit_checkwas reading the kernel driver, not the CUDA driver.get_driver_version(kernel_mode=True)returns the NVIDIA kernel module version (e.g.580from580.126.09), not the CUDA Driver API version (e.g.13from CUDA 13.0). The verbose message also printedDriver supports CUDA 580, which is what tipped this off. Droppingkernel_mode=Truemakesget_driver_version()default to the CUDA Driver API mode and the comparison logic actually fires.cuda-bindingsis now declared as a runtime dep, and the conda recipe gets the missingcuda-coreit should have had since Add CUDA toolkit check torapids doctor#141.cuda-corecalls intocuda.bindings.drivervia lazy import and withoutcuda-bindingsinstalled,cuda_toolkit_checkraisesImportError: cuda.bindings 12.x or 13.x must be installedon a freshpip 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 assertsdriver_major < 100to ensure that we are getting the CUDA major version and not the driver versionCloses #145.