Skip to contents

Returns the default device of the active backend: the device the anvl.default_device option names (see local_default_device()), else the one the ANVL_DEFAULT_DEVICE environment variable names (e.g. ANVL_DEFAULT_DEVICE=cuda, read once when anvl is loaded), else the first CPU device.

Usage

default_device(backend = NULL)

Arguments

backend

(NULL | character(1))
Backend. Defaults to active_backend() when NULL.

Value

(device object)
Backend-specific.