Skip to contents

Checks whether tulpaRatio was compiled with GPU support (CUDA or OpenCL) and whether compatible GPU hardware is detected.

Usage

gpu_available()

Value

Logical; TRUE if GPU acceleration is available, FALSE otherwise.

Details

GPU support requires:

  1. tulpaRatio compiled with GPU support (-DUSE_CUDA or -DUSE_OPENCL)

  2. Compatible GPU hardware (NVIDIA for CUDA, any GPU for OpenCL)

  3. Appropriate drivers installed

The solver = "gpu" option in spatial_gp() will automatically fall back to PCG if GPU support is unavailable.

See also

spatial_gp() for using GPU-accelerated GP models

Examples

# Check if GPU is available
gpu_available()
#> [1] FALSE

# Get detailed GPU info
if (gpu_available()) {
  gpu_info()
}