Skip to contents

Request an NVIDIA GPU through CUDA as the compute device of an execution config, naming which GPUs to use, e.g. setup_FutureExecution(device = setup_CUDA(ids = 1L)). Without ids, device = "cuda" is the same request. Algorithms that run on CUDA are the torch-backed ones (MLP, TabNet) and the LightGBM family built with CUDA support; every other algorithm runs on the CPU.

Usage

setup_CUDA(ids = NULL)

Arguments

ids

Optional Integer [0, Inf) vector: Zero-based indices of the GPUs to use. NULL uses the first visible GPU. A run uses the first index listed.

Value

CUDADeviceConfig object.

Author

EDG

Examples

setup_CUDA()
#> <CUDADeviceConfig>
#> 
#>   type: <chr> cuda
#>    ids: <NUL> NULL
#>  
setup_CUDA(ids = 1L)
#> <CUDADeviceConfig>
#> 
#>   type: <chr> cuda
#>    ids: <int> 1
#>