Expand description
§fuel-dispatch
Dispatch infrastructure for fuel — extracted from fuel-storage 2026-05-31 per the picker-work phasing (docs/session-prompts/dispatch-move-to-fuel-core.md).
§What lives here
KernelBindingTable+ registration wrappers — backends register their per-(op, dtypes, BackendId)kernels into a process-wide table. The picker / optimizer queries this table to enumerate candidate alternatives at each graph decision point.CompiledNode+compile_node— the dispatch-time(KernelRef, KernelCaps, OpParams)resolution result that the executor invokes.ExecutionPlan+compile_plan+PlanOptions— Phase 1.5 reshape of the plan-time picker around per-decision-pointAlternativeSets. Replaced the pre-1.5NodeKernelBinding/TolerancePolicy/resolve_kerneltriple (which had zero executor consumers; the verified-empty consumer list let the rewrite ship without breakage).FusedKernelRegistry+PrecisionGuarantee+KernelRevisionHash— fused-op dispatch substrate.PipelinedExecutor— the production executor that walks a graph, callscompile_nodeper kernel-bearing node, and runs the resolvedKernelRefagainst the input/output Storage Arcs.- Cost functions — Layer-1 static cost estimates per op family; the optimizer composes these along candidate routes.
- Cast fusion rule — cast-elision graph rewrite (lives near dispatch because it inspects binding-table coverage).
§What’s NOT here
BackendStorageenum +Storagewrapper — stays infuel-storageuntil retired via Phase 0.2c (move tofuel-core-types).SystemTopology+Judge+ProbeReport— stays infuel-coretoday; Phase 1’s optimizer ranker will decide whether to relocate.- Backend-specific kernels themselves — those live in their backend
crates (fuel-cpu-backend, fuel-cuda-backend, fuel-vulkan-backend).
This crate hosts the dispatch wrappers that bridge erased
Storage↔ typed backend storage.
Re-exports§
pub use compiled::CompiledNode;pub use compiled::Completion;pub use compiled::CompletionHandle;pub use compiled::compile_node;pub use compiled::dispatched_kernel_ident;pub use compiled::execute_compiled;pub use driver::FrontierConvergenceOptimizer;pub use driver::OptimizationContext;pub use driver::Optimizer;pub use driver::PassRegistry;pub use driver::Pathfinder;pub use driver::PlacementForkPathfinder;pub use kernel::KernelBindingTable;pub use kernel::KernelDTypes;pub use kernel::KernelRef;pub use kernel::OpParams;pub use optimize::OptimizedGraph;pub use optimize::optimize_graph;pub use pipelined::PipelinedExecutor;pub use plan::ExecutionPlan;pub use plan::PlanOptions;pub use plan::compile_plan;pub use ranker::AccuracyBound;pub use ranker::AccuracyPreferenceFilter;pub use ranker::AlternativeFilter;pub use ranker::AlternativeSet;pub use ranker::Candidate;pub use ranker::CapabilitiesLookup;pub use ranker::CouplingAdjustment;pub use ranker::DEFAULT_ACCURACY_BOUND;pub use ranker::FilterClass;pub use ranker::FilterContext;pub use ranker::HashMapJudge;pub use ranker::JudgeOracle;pub use ranker::KEEP_PER_DEVICE;pub use ranker::PrecisionFloorFilter;pub use ranker::PrecisionRequirement;pub use ranker::StridedInputPreferenceFilter;pub use ranker::TransferEstimator;pub use ranker::apply_filter_chain;pub use ranker::apply_inbound_transfer_costs;pub use ranker::composite_ns;pub use ranker::compute_static_costs;pub use ranker::default_chain;pub use ranker::enumerate_candidates;pub use residency::EvictReload;pub use residency::LiveRange;pub use residency::ResidencyPlanner;pub use residency::ResidencyReport;pub use residency::insert_residency_evictions;
Modules§
- cast_
fusion - Cast-fusion capability predicate — builds the
fuel_graph::opt::CapabilityPredicateconsumed byCastFusionRulefrom the liveKernelBindingTable. - compiled
- Compiled-node representation. Phase 7.5 B4 (interface only).
- cost
- Phase 7.6 step 8 — Layer-1 cost model for primitive ops.
- decode_
flash - Decode flash-arm emission — the safe, gated
Op::Branchthat makes the CUDAflash_decodingbinding (commitf693da2c) reachable in decode. - dispatch
- Capability-driven dispatch tables. Phase 7.5 A5.
- driver
- The
optimize_graphlock-step pass driver — Phase B PR-B3 of the “plan IS the graph” rebuild (../../docs/session-prompts/plan-is-graph-rebuild.mdcapability 5;../../docs/architecture/04-optimization.md§“The two-stage transformation”, §“Relationship to PR 3”). - fkc
- FKC kernel-contract importer (
fkc) - fused
- FusedOpRegistry — kernel-side payload. Phase 7.6 step 1 (skeleton).
- fused_
cost - Fused-op Layer-1 cost composed from its decomposition
(
docs/session-prompts/fused-op-cost-from-decompose.md). - judge_
cache - Ranked dispatch tables — Phase 6b’s O(1) runtime lookup.
- judge_
report_ path - The on-disk path for the Judge’s persisted
fuel_ir::dispatch::ProfileReport. - kernel
- Kernel reference + op parameters + binding table. Phase 7.5 B1+B5.
- optimize
optimize_graph— the new “plan IS the graph” entry point.- pipelined
- Pipelined compile + execute. Phase 7.5 B4.
- plan
- Execution plan — per-realize compilation output, Phase 1.5 reshape of the picker-work arc.
- ranker
- Optimizer ranker (Picker 1) substrate — Phase 1.1 of the picker-work arc.
- residency
- Residency analysis + eviction for the pipelined executor.
- runtime_
fused_ arm - Runtime-fused-op arm emission — the gated
Op::Branchthat makes an adopted (JIT-synthesized / imported) fused op reachable, mirroringcrate::decode_flash. - runtime_
fused_ kernels - Runtime fused-op kernel registration — the adopt/gate facade over the ONE binding registry.
- runtime_
fused_ pathfinder - Runtime-fused-op arm pathfinder — the match-finder
crate::runtime_fused_arm’s module doc names as its remaining half: “the pathfinder that finds matches + splices reconverge points registers it intooptimize_graph.” This module is that pathfinder. - topology
- SystemTopology — single source of truth for what backends exist, what devices they target, which backends share Storage substrate, and what transfer paths connect devices.
- variant_
bake - Optimize-time kernel-variant baking — the same-device arm selector.
Macros§
- register_
fused - Register a
BackendImplinto aFusedKernelRegistryvia the step-6 macro shape. Hides the boilerplate of constructing theBackendImplstruct so registration sites read as a flat list of(id, backend, dtypes, kernel, cost, precision)tuples.