Skip to content

Fact · Speech recognition

PyTorch's torch.cuda.is_available() function returns a bool that says whether CUDA is currently available to the program.

Checked against its source on October 17, 2026

In the source's own words

“Return a bool indicating if CUDA is currently available.”

torch.cuda.is_available: PyTorch documentation (version 2.14), PyTorch contributors, PyTorch, 2026, torch.cuda.is_available, description and return type.

Open the original
What it measures
The openai-whisper command line uses this check to choose its default device: CUDA when the check is true, and the CPU otherwise.
What it does not show
The function returns only yes or no. It does not say which GPU was found or how much memory it has.

Source

Cited on

PyTorch reports CUDA availability as a bool | Yap