Skip to main content

ADJOINT_BUDGET_BYTES

Constant ADJOINT_BUDGET_BYTES 

const ADJOINT_BUDGET_BYTES: usize = _; // 67_108_864usize
Expand description

How much adjoint memory the reverse engine’s read-back may hold at once.

A vector sweep carries one f64 per recorded variable per direction, so the whole matrix in one sweep costs variables × rungs × 8 bytes — 2.5 MB on a forty-pillar par ladder, 8.9 MB on the fifty-rung overnight ladder. Past this budget the read-back runs in blocks of directions over the one recording: the rungs are never re-recorded, and the buffer never exceeds the budget. Sixty-four MiB keeps every ladder in the bench set to one sweep and bounds a two-hundred-pillar ladder on a similar body to a few.