Skip to main content

lookup_runtime_kernel

Function lookup_runtime_kernel 

Source
pub fn lookup_runtime_kernel(
    id: FusedOpId,
    backend: BackendId,
) -> Result<RuntimeKernelBinding, FusedLookupMiss>
Expand description

The runtime-fused binding for (id, backend) when exactly one dtype tuple is registered.

Refuses to guess. One FusedOpId can legitimately carry several dtype tuples (register_runtime_fused dedups on the recipe’s base-map hash), and resolving by id alone would pick between them by HashMap order — a coin flip per process, capable of returning a kernel of the wrong operand arity. This is the diagnostic/test path; production dispatch takes the dtype tuple and does an exact keyed lookup (lookup_with_caps). See GAP-213.