Skip to content

fix(deviceQuery): compatibility fallback for removed system.get_driver_version() in newer cuda-core#434

Open
poojithdevan4D wants to merge 1 commit into
NVIDIA:masterfrom
poojithdevan4D:fix/device-query-get-driver-version-compat
Open

fix(deviceQuery): compatibility fallback for removed system.get_driver_version() in newer cuda-core#434
poojithdevan4D wants to merge 1 commit into
NVIDIA:masterfrom
poojithdevan4D:fix/device-query-get-driver-version-compat

Conversation

@poojithdevan4D
Copy link
Copy Markdown

system.get_driver_version() was removed from cuda.core.system in newer
releases of the cuda-core package, causing deviceQuery.py to crash with:

AttributeError: module 'cuda.core.system' has no attribute 'get_driver_version'

Fix: Added a hasattr() check. If the old API exists, it's used as before.
Otherwise, falls back to cuda.bindings.driver.cuDriverGetVersion() which
returns an integer (e.g. 13010) decoded as major=v//1000, minor=(v%1000)//10.

Tested on: NVIDIA GeForce RTX 3050 Laptop GPU
CUDA Driver 13.1 / Runtime 13.2, Windows 11

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant