ggml_estimate_memory: Estimate Required Memory

View source: R/memory.R

ggml_estimate_memoryR Documentation

Estimate Required Memory

Description

Helper function to estimate memory needed for a tensor

Usage

ggml_estimate_memory(type = GGML_TYPE_F32, ne0, ne1 = 1, ne2 = 1, ne3 = 1)

Arguments

type

Tensor type (GGML_TYPE_F32, etc)

ne0

Size of dimension 0

ne1

Size of dimension 1 (optional)

ne2

Size of dimension 2 (optional)

ne3

Size of dimension 3 (optional)

Value

Estimated memory in bytes

Examples


# For 1000x1000 F32 matrix
ggml_estimate_memory(GGML_TYPE_F32, 1000, 1000)


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