Skip to main content

seeded_inputs

Function seeded_inputs 

Source
pub fn seeded_inputs(p: &SpatialProgram, seed: u64) -> Inputs
Expand description

One corpus point for p: every tensor the evaluator needs, keyed by TensorId.

★ KEYED BY ID, WHICH IS WHAT MAKES IT A DIFFERENTIAL. Two programs over the same workload agree on tensor ids, so one corpus feeds both and each side genuinely sees the same numbers. A tensor one side does not have (the chain’s scaler, say) is simply never looked up.

Values are always INTEGRAL — Value::Int on an integer datapath, whole numbers as Value::Float on a float one. That is deliberate: see CORPUS_MAGNITUDE_CAP.

★ WHAT THIS CORPUS DELIBERATELY HOLDS STILL, stated so a caller is never surprised by it: a Param whose recorded fill reproduces is reproduced EXACTLY, identically at every seed (see planted_constant). For a compiler-planted constant that is the only correct thing to do; for a weight tensor the recognizer happened to record a fill for, it means the corpus explores the activations and not the weights. The differential stays SOUND either way — both sides still see the same numbers — but it is narrower, and a caller who wants that tensor varied must build the Inputs itself and supply it rather than expecting this function to guess which Params are data.