Tests whether a CUDA-capable GPU is available and accessible. This function is useful for conditional code that should only run when GPU acceleration is possible.
Value
TRUE if a GPU is available and CUDA is properly configured,
FALSE otherwise. Returns FALSE (not an error) if CUDA libraries
are not found.
Details
This function checks:
CUDA driver is loaded
At least one CUDA device is present
Device is accessible (not in exclusive mode by another process)
See also
gpu_details for detailed GPU information,
show_gpu for formatted GPU info display
