Expand description
Execution plan — per-realize compilation output, Phase 1.5 reshape of the picker-work arc.
The plan is a topological order plus a sparse NodeId -> AlternativeSet map. Each entry is the per-decision-point top-N
candidates the optimizer ranker considered, filtered and ranked
per the configured PlanOptions. The eventual executor reads
alternatives per node, takes the winner (Picker 2 territory in
the long-term shape; Phase 4 wires the executor to this surface),
and dispatches the resolved kernel.
§What changed in Phase 1.5
Pre-1.5 this module hosted NodeKernelBinding, TolerancePolicy,
and resolve_kernel — the v1 picker that fell out of Phase 7.6
step 9b. Those types had zero callers (verified by the
2026-05-30 picker-alternatives audit), so Phase 1.5 retires
them and ships the AlternativeSet-based plan in their place. The
shape composes with everything Phase 1.1–1.4 already shipped:
the enumerator builds candidates, the filter chain narrows them,
the cost composer scores them, and the plan stores the
top-N-after-filter-and-rank.
Phase 4 of the picker-work arc migrates the PipelinedExecutor to
consume ExecutionPlan::alternatives instead of compile_node’s
first-registered path. Until then this module ships the
infrastructure with no production consumer.
Structs§
- Execution
Plan - Per-realize execution plan. Built by
compile_plan. - Plan
Options - Plan-time configuration the caller hands to
compile_plan.
Functions§
- backend_
for_ device - The
BackendIdthat owns aDeviceLocation’s storage substrate. Total —BackendIdmirrorsDeviceLocation1:1 (AOCL/MKL arekernel_sourcesiblings underCpu, not distinct backends). Inverse ofdefault_device_formodulo GPU ordinals. - compile_
plan - Build an
ExecutionPlanfrom a topologically-ordered node sequence + binding table + options. - default_
device_ for - Default
DeviceLocationfor aBackendIdwhen the graph has no per-node placement set. Mirrors the convention infuel-graph-router(CPU is the singletonCpu; GPU backends default to ordinal 0). - node_
needs_ plan_ entry - Does this op receive an
AlternativeSetentry fromcompile_plan? The single source of truth for the plan-entry gate (used bybuild_node_draftandPlanOptions::reuse_planincremental extension):trueexactly whenop_to_op_kindmaps the op AND it is not a residency-determined transfer (Op::Copy/Op::Move, whose kernel backend the executor resolves from the bridge-maintained source-backend stamp).