Skip to main content

dispatched_kernel_ident

Function dispatched_kernel_ident 

Source
pub fn dispatched_kernel_ident(
    graph: &Graph,
    node: NodeId,
    bindings: &KernelBindingTable,
) -> Option<(&'static str, u64)>
Expand description

The (kernel_source, kernel_revision_hash) identity of the kernel the executor dispatches for node, derived from the SAME graph stamp + registry the executor resolves through: op_to_op_kind + build_lookup_dtypes + graph.target_backend → the first-registered binding at (op, dtypes, backend) (the entry compile_node’s lookup_with_caps picks). None when the node has no dispatch mapping (view/structural op) or no registered binding.

Both fields come from the ONE find() — the same BindingEntry — so the tag and the revision describe the same kernel by construction; a second lookup keyed on the tag could not disambiguate variant siblings that share it, which is precisely the collapse the revision exists to prevent. This is the post-realize attribution the bridge reports for the Judge. Step D moved it off the plan’s AlternativeSet::winner(): the production realize path dispatches via the binding-table lookup (no plan), so the first-registered binding IS the matching attribution.