ag_tensor is backed by an R environment so all references to the same tensor see updates (like PyTorch tensors).
ag_tensor(
data,
device = .ag_device_state$device,
dtype = .ag_device_state$dtype
)An ag_tensor object (environment)
Numeric matrix or vector
"cpu" (default) or "gpu". When "gpu",
compute operations will be dispatched to the ggml backend.
Floating-point precision: "f32" (default), "f16",
or "bf16". Ignored on CPU; controls upload precision on GPU.