Skip to main content

CONST_FOLD_MEM_BUDGET

Constant CONST_FOLD_MEM_BUDGET 

Source
pub const CONST_FOLD_MEM_BUDGET: u64 = _; // 4_194_304u64
Expand description

Byte allowance for the growth an eager constant fold may cause.

A fold is admissible when its output is no larger than input_mem.max(BUDGET): under the allowance it is cheap enough to pay for at load time, above it only a fold that does not grow its inputs is worth the copy. A caller that can see a constant’s consumers also weighs the allowance against turning one shared buffer into one buffer per consumer.

Shape and index arithmetic sits far below it, decoded weight tensors far above.