ag_backward_fallbacks: Why backward() used the closure path, counted

View source: R/ag_backward_graph.R

ag_backward_fallbacksR Documentation

Why backward() used the closure path, counted

Description

Each time backward() could have run as one graph but fell back to the R closures, the reason is counted here: an unsupported op on the tape, a compute dtype other than f32, or an error inside the graph path (which strict mode, GGMLR_AG_BWD_STRICT=1, raises instead). Gradients are correct either way; a fallback costs speed.

Usage

ag_backward_fallbacks(reset = FALSE)

Arguments

reset

TRUE to clear the counts after reading them.

Value

A named numeric vector: reason -> number of backward() calls.


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