ggml_backend_tensor_set_data: Set Tensor Data via Backend

View source: R/graph.R

ggml_backend_tensor_set_dataR Documentation

Set Tensor Data via Backend

Description

Sets tensor data using the backend API. This works with tensors allocated on any backend, not just CPU.

Usage

ggml_backend_tensor_set_data(tensor, data, offset = 0)

Arguments

tensor

Tensor pointer

data

R vector with data to set

offset

Byte offset (default: 0)

Details

Integer and logical data are accepted for float tensors and converted element by element to float (an integer NA becomes NaN). An I32 tensor (token indices, say) takes integers or whole-valued doubles; NA, fractions and values outside the 32-bit range stop with an error rather than being truncated.

Value

No return value, called for side effects


ggmlR documentation built on Oct. 23, 2026, 1:07 a.m.