Enable GPU-computing when calling user-defined operators
Source:R/rkeops_options.R
rkeops_use_gpu.Rd
Set up rkeops
options to use GPU computing when calling
user-defined operators.
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 to0
. It is recommended to use default GPU and manage GPU assignment outside R (see details).
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()
.