ggml_tensor_type: Get Tensor Type

View source: R/tensors.R

ggml_tensor_typeR Documentation

Get Tensor Type

Description

Returns the data type of a tensor as an integer code

Usage

ggml_tensor_type(tensor)

Arguments

tensor

Tensor pointer

Value

Integer type code (0 = F32, 1 = F16, etc.)

Examples


ctx <- ggml_init(1024 * 1024)
t <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 10)
ggml_tensor_type(t)
ggml_free(ctx)


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