Skip to content

[FEA]: Add public CUDA driver version query to cuda.pathfinder#1953

Draft
rwgk wants to merge 11 commits intoNVIDIA:mainfrom
rwgk:pathfinder_driver_info
Draft

[FEA]: Add public CUDA driver version query to cuda.pathfinder#1953
rwgk wants to merge 11 commits intoNVIDIA:mainfrom
rwgk:pathfinder_driver_info

Conversation

@rwgk
Copy link
Copy Markdown
Collaborator

@rwgk rwgk commented Apr 19, 2026

xref: #1038, #1936

  • add a small cuda.pathfinder._utils.driver_info helper backed by cuDriverGetVersion() so cuda.pathfinder can query the CUDA-facing driver version
  • introduce DriverCudaVersion, QueryDriverCudaVersionError, and cached query_driver_cuda_version(), with naming and docstrings that make it explicit this matches nvidia-smi's CUDA Version
  • re-export the new API from cuda.pathfinder, document it in cuda_pathfinder/docs/source/api.rst, and add focused unit, real-driver, and public-import regression tests

rwgk added 11 commits April 19, 2026 11:04
Break out CUDA driver version querying into a standalone internal utility so it can be reused independently from compatibility checks, and cover the ctypes loader paths with focused tests.

Made-with: Cursor
Treat the Windows WinDLL path as the normal runtime case and keep the focused tests aligned with the stricter driver-loader invariants.

Made-with: Cursor
Wrap the encoded cuDriverGetVersion() result in a DriverVersion dataclass so callers can use major and minor fields directly while retaining a low-level integer helper for loader-focused tests.

Made-with: Cursor
Cover query_driver_version() alongside the driver library loading tests and reuse the existing strictness mode so host-specific failures still surface cleanly in all_must_work mode.

Made-with: Cursor
Drop the non-Windows loader mock now that a real driver-version test covers the Linux success path, while keeping the Windows branch and failure-path unit coverage.

Made-with: Cursor
Use DriverCudaVersion for clearer pairing with the planned release-version type while keeping the existing driver info API behavior unchanged.

Made-with: Cursor
Query nvmlSystemGetDriverVersion() through pathfinder's driver library loading path and add a minimal real test so the implementation is preserved as a future reference.

Made-with: Cursor
Step back from the exploratory NVML-based release-version query for now because it adds non-trivial complexity and a new dependency surface without a current pathfinder need, while keeping the reference implementation in history if we need it later.

Made-with: Cursor
Document that DriverCudaVersion matches the CUDA Version shown by nvidia-smi rather than the graphics driver release, so the dataclass name reads clearly in context.

Made-with: Cursor
Expose DriverCudaVersion, QueryDriverCudaVersionError, and query_driver_cuda_version publicly, and align the internal naming, caching, docs, and test coverage around the CUDA-specific driver version query.

Made-with: Cursor
Protect the new top-level driver-info re-exports so internal-only test coverage does not miss a broken `cuda.pathfinder` plumbing layer.

Made-with: Cursor
@rwgk rwgk added this to the cuda.pathfinder next milestone Apr 19, 2026
@rwgk rwgk self-assigned this Apr 19, 2026
@rwgk rwgk added P0 High priority - Must do! feature New feature or request cuda.pathfinder Everything related to the cuda.pathfinder module labels Apr 19, 2026
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot bot commented Apr 19, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rwgk
Copy link
Copy Markdown
Collaborator Author

rwgk commented Apr 19, 2026

/ok to test

@github-actions
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.pathfinder Everything related to the cuda.pathfinder module feature New feature or request P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant