Skip to contents

Set up rkeops options to use GPU computing when calling user-defined operators.

Usage

rkeops_use_gpu(device = -1)

Arguments

device

integer, GPU device id to be used for computations. Default value is -1, meaning that default GPU will be used, which is equivalent to 0. It is recommended to use default GPU and manage GPU assignment outside R (see details).

Value

None

Details

If you have compiled GPU-compatible operators (which requires a Nvidia GPU and CUDA), you can call the function rkeops_use_gpu() to specifically run computations on GPU.

It is recommended to use default GPU (i.e. device = -1 or 0) and manage GPU assignment outside R by setting the environment variable CUDA_VISIBLE_DEVICES.

Note: The default behavior in rkeops is to use CPU computing, thus calling the function rkeops_use_gpu() is mandatory to run computations on GPU.

To disable GPU computing, run rkeops_use_cpu().

Author

Ghislain Durif

Examples

if (FALSE) {
rkeops_use_gpu()
}