Learn R Programming

rkeops (version 1.4.2.2)

runtime_options: Define a list of user-defined options used at runtime in rkeops package

Description

When calling user-defined operators, rkeops requires runtime options that control how the computations are done (memory management, data partition for parallelization, GPU device if relevant).

The function runtime_options returns a list of class rkeops_runtime_options with default values for the corresponding options (see Details).

Usage

runtime_options(tagCpuGpu = 0, tag1D2D = 0, tagHostDevice = 0, device_id = 0)

Value

a list (of class rkeops_runtime_options) with the following elements:

tagCpuGpu

integer, indicator for CPU or GPU computations (see Details).

tag1D2D

integer, indicator regarding data partitioning for parallelization (see Details).

device_id

integer, id of GPU device on the machine (see Details).

Arguments

tagCpuGpu

integer, indicator for CPU or GPU computations (see Details). Default value is 0.

tag1D2D

integer, indicator regarding data partitioning for parallelization (see Details). Default value is 0.

tagHostDevice

integer, indicator regarding the data location (see Details). Default value is 0.

device_id

integer, id of GPU device on the machine (see Details). Default value is 0.

Author

Ghislain Durif

Details

The aforementioned runtime options are the following:

  • tagCpuGpu: 0 means computations on CPU, 1 means computations on GPU, 2 means computations on GPU using data on device (i.e. in GPU memory). Default value is 1. The mode 2 is not available for the moment in R.

  • tag1D2D: 0 means 1D parallelization (over rows of matrices), and 1 parallelization over blocks of rows and columns (useful with small columns large rows matrices). Default value is 0.

  • tagHostDevice: 0 means that data are stored on host memory (i.e. in RAM), 1 means that data are stored on GPU memory. Default value is 0. The mode 1 is not available for the moment in R.

  • device_id: id of GPU device (if relevant, i.e. with tagCpuGpu != 0) where the computations will be made. Default value is 0. Ideally, GPU assignation should be handled outside of R and rkeops.

Note: Default options are set up when loading rkeops. To reset rkeops options to default, you should use the function set_rkeops_options(). To set up a particular option, you should use the function set_rkeops_option().

Some wrappers are available to enable some compilation options, see use_cpu(), use_gpu().

See Also

default_runtime_options(), set_rkeops_options(), set_rkeops_option(), use_cpu(), use_gpu()

Examples

Run this code
runtime_options(tagCpuGpu = 0, tag1D2D = 0, 
                tagHostDevice=0, device_id = 0)

Run the code above in your browser using DataLab