Skip to main content

execute_compiled

Function execute_compiled 

Source
pub fn execute_compiled(
    compiled: &CompiledNode,
    inputs: &[Arc<RwLock<Storage>>],
    outputs: &mut [Arc<RwLock<Storage>>],
    layouts: &[Layout],
) -> Result<CompletionHandle>
Expand description

Run a compiled node against the given inputs/outputs. The output Storages must be pre-allocated (the executor’s responsibility, using the node’s shape + dtype).

layouts parallels inputs.append(outputs) and carries the stride/shape/offset metadata that stride-aware kernels consume. Today’s contiguous-only kernels ignore it; the executor’s auto-Contiguize pass guarantees every input layout is Layout::contiguous(shape) before this is called.

Production-correct: surfaces kernel errors as Result; never panics on dispatch mismatch (the wrapper functions handle that).