Skip to main content

dispatch

Function dispatch 

Source
pub fn dispatch(
    backend: &CpuBackend,
    op_type: &str,
    inputs: &[(&str, &dyn SlotValue)],
    attrs: &[AttributeProto],
) -> Result<DispatchResult, OpError>
Expand description

Route op_type to the matching kernel. attrs is the NodeProto’s attribute slice — ops whose semantics depend on attributes (Reshape’s dims, Softmax’s axis, Gemm’s alpha/beta, …) read it directly. The framework’s per-op dispatch path threads ctx.current.node_attributes here; the execute_graph walker threads node.attribute per node.