Learn R Programming

ggmlR (version 0.6.1)

ggml_estimate_memory: 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)

Value

Estimated memory in bytes

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)

Examples

Run this code
# \donttest{
# For 1000x1000 F32 matrix
ggml_estimate_memory(GGML_TYPE_F32, 1000, 1000)
# }

Run the code above in your browser using DataLab