pub trait Pathfinder: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn propose(
&self,
graph: &mut Graph,
ctx: &OptimizationContext<'_>,
) -> Result<()>;
}Expand description
A pathfinder ADDs candidate paths / branches to the graph. The
PR-A4 deliberate-fork seed (PlacementForkPathfinder) is the first
registered pathfinder; later pathfinders (fusion, algebraic,
dtype-lowering under tolerance, layout fixups) implement the same
trait and register the same way.
propose may append nodes and record Op::Branch decision points
(via the fuel-graph A1 builders). It must never remove a path —
that is an Optimizer’s job — and it returns Result so a
build-time failure surfaces (never panic, per the working agreement).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".