glearn.device.get_nvidia_driver_version#

glearn.device.get_nvidia_driver_version()#

Gets the NVIDIA graphic driver version.

Returns:
versionstr

The version number in the format “DriverVersion.RuntimeVersion”.

Notes

This function parses the output of nvidia-smi command as

nvidia-smi -q | grep -i "Driver Version" | grep -o ":.*" | cut -c 3-

The nvidia-smi command is part of NVIDIA graphic driver. See Install NVIDIA Graphic Driver for further details. If a graphic driver is not installed, this function returns "not found".

Examples

>>> from glearn.device import get_nvidia_driver_version
>>> get_nvidia_driver_version()
'460.84'