espnet2.torch_utils.pytorch_version.pytorch_cudnn_version
Less than 1 minute
espnet2.torch_utils.pytorch_version.pytorch_cudnn_version
espnet2.torch_utils.pytorch_version.pytorch_cudnn_version() → str
Returns a string containing the versions of PyTorch and cuDNN, along with
information about CUDA availability and cuDNN settings.
The function checks the current version of PyTorch, whether CUDA is available, and if cuDNN is enabled. If cuDNN is enabled, it also retrieves the version of cuDNN and its configuration settings (benchmarking and determinism).
- Parameters:None
- Returns: A formatted string that includes the PyTorch version, CUDA availability, and cuDNN details if applicable.
- Return type: str
Examples
>>> print(pytorch_cudnn_version())
pytorch.version=1.10.0, cuda.available=True,
cudnn.version=8005, cudnn.benchmark=True, cudnn.deterministic=False
NOTE
This function requires the PyTorch library to be installed and may only work in an environment where CUDA is supported.