Skip to content
fn

swap_executable_inplace_targets

void swap_executable_inplace_targets(const int & output_targets, int & fresh_outputs)

Install the outputs returned by run_executable_inplace_outputs into output_targets' own elements (write_elements) and bump each target's version counter. Replaces any Metal view-family root and drops sibling caches, so callers must hold the Python GIL when other Python threads may read the family.

Raises

LucidError
A target's elements overlap (an expanded view). The targets ahead of it have taken their outputs, as in the eager optimizer step.