is_cuda_available

Function is_cuda_available 

Source
pub fn is_cuda_available() -> bool
Expand description

Check if CUDA is available at runtime.

This function returns false if:

  • CUDA feature is not enabled
  • CUDA libraries are not installed on the system
  • No CUDA devices are present

It safely catches panics from cudarc when CUDA is not installed.