Skip to content
fn

run_leaf_hooks

int run_leaf_hooks(const TensorImpl & leaf, int grad)

Run a leaf's hooks on the gradient about to be accumulated into its .grad (already in the leaf's dtype). Same contract as run_slot_hooks, without the retain step a leaf does not have.