ag_to_device: Move a tensor to the specified device

View source: R/ag_device.R

ag_to_deviceR Documentation

Move a tensor to the specified device

Description

Copies an ag_tensor to the target device, returning a new tensor. The original tensor is not modified.

Usage

ag_to_device(tensor, device)

Arguments

tensor

An ag_tensor

device

"cpu" or "gpu"

Value

A new ag_tensor on the target device (or the original if already on the target device)


ggmlR documentation built on July 14, 2026, 1:08 a.m.