Learn R Programming

ggmlR (version 0.8.4)

nn_functional_graph_size: Estimate the scheduler graph size a functional model needs

Description

The backend scheduler sizes its hash set once, before the graph exists, and aborts inside ggml if the graph turns out larger. Most layers contribute a handful of nodes, but a recurrent layer unrolls per timestep, so the count has to follow the sequence length rather than the layer count.

Usage

nn_functional_graph_size(model)

Arguments

Value

A double, the graph size to allocate.

Details

Generous on purpose: the cost of overshooting is a slightly larger hash set, the cost of undershooting is a crash with no R-level error to catch.