Learn R Programming

ggmlR (version 0.6.1)

ag_device: Set the default compute device for ag_* operations

Description

Switches all subsequent ag_tensor / ag_param operations to run on the specified device. Calling ag_device("gpu") initialises the best available ggml backend (Vulkan, Metal, CUDA, or CPU fallback) the first time it is called.

Usage

ag_device(device)

Value

Invisibly the previous device string

Arguments

device

"cpu" (default) or "gpu"