pub fn is_cuda_available() -> bool
Expand description
Safely checks if CUDA is available on the system.
This function attempts to initialize CUDA and determine if it’s available. The result is cached after the first call, so subsequent calls are very fast.
§Returns
true
if CUDA is available and can be initialized, false
otherwise.
§Examples
use monarch_rdma::is_cuda_available;
if is_cuda_available() {
println!("CUDA is available, can use GPU features");
} else {
println!("CUDA is not available, falling back to CPU-only mode");
}