CudaLinux
- class lib.system.ml_libs.CudaLinux
Bases:
_CudaFind the location of system installed Cuda and cuDNN on Linux.
Methods Summary
cudnn_version_from_header(folder)Attempt to detect the cuDNN version from the version header file
Attempt to locate any installed cuDNN versions on Linux
Attempt to locate the default Cuda version on Linux
Attempt to detect all installed Cuda versions on Linux systems
version_from_version_file(folder)Attempt to get an installed Cuda version from its version.json file
Methods Documentation
- cudnn_version_from_header(folder: str) tuple[int, int, int] | None
Attempt to detect the cuDNN version from the version header file
- Parameters:
folder (str) – The folder to check for the cuDNN header file
- Return type:
The cuDNN version found from the given folder or
Noneif not detected
- get_cudnn_versions() dict[tuple[int, int], tuple[int, int, int]]
Attempt to locate any installed cuDNN versions on Linux
- Return type:
Detected cuDNN version for each installed Cuda. key (0, 0) denotes globally installed cudnn
- get_version() tuple[int, int] | None
Attempt to locate the default Cuda version on Linux
Checks, in order: update-alternatives, /usr/local/cuda, ldconfig, nvcc
- Return type:
The Default global Cuda version or
Noneif not found
- get_versions() dict[tuple[int, int], str]
Attempt to detect all installed Cuda versions on Linux systems
- Return type:
The Cuda version to the folder path on Linux
- version_from_version_file(folder: str) tuple[int, int] | None
Attempt to get an installed Cuda version from its version.json file
- Parameters:
folder (str) – Full path to the folder to check for a version file
- Return type:
The detected Cuda version or
Noneif not detected
- get_cudnn_versions() dict[tuple[int, int], tuple[int, int, int]]
Attempt to locate any installed cuDNN versions on Linux
- Return type:
Detected cuDNN version for each installed Cuda. key (0, 0) denotes globally installed cudnn
- get_version() tuple[int, int] | None
Attempt to locate the default Cuda version on Linux
Checks, in order: update-alternatives, /usr/local/cuda, ldconfig, nvcc
- Return type:
The Default global Cuda version or
Noneif not found
- get_versions() dict[tuple[int, int], str]
Attempt to detect all installed Cuda versions on Linux systems
- Return type:
The Cuda version to the folder path on Linux