pub enum RuleFamily {
Lowering,
Fusion,
Algebraic,
}Expand description
Which family a Rule belongs to. Drives the phase ordering in
RuleRegistry::optimize_to_fixpoint: lowering runs to fixpoint
first, then fusion. This ordering ensures inverse rule pairs
converge cleanly — fusion has the last word, and its output is
what the executor runs.
Variants§
Lowering
High-level op → primitive subgraph. Always grows the graph.
Fusion
Recognized primitive subgraph → fused op. Always shrinks the graph (the fused op replaces the canonical subgraph’s output; the orphaned subgraph nodes remain in the arena but are unreachable from the user’s roots after consumer rewiring).
Algebraic
Algebraic identity rewrites that don’t fit the lowering or
fusion shapes: cast elimination (Cast(src→dst) → Op(dst)
becomes Op(src) when the consumer supports the source
dtype), constant folding, identity elimination, common-
subexpression hoisting. Runs after fusion so cast-elimination
can’t break fusion-pattern dtype expectations.
Trait Implementations§
Source§impl Clone for RuleFamily
impl Clone for RuleFamily
impl Copy for RuleFamily
Source§impl Debug for RuleFamily
impl Debug for RuleFamily
impl Eq for RuleFamily
Source§impl Hash for RuleFamily
impl Hash for RuleFamily
Source§impl PartialEq for RuleFamily
impl PartialEq for RuleFamily
impl StructuralPartialEq for RuleFamily
Auto Trait Implementations§
impl Freeze for RuleFamily
impl RefUnwindSafe for RuleFamily
impl Send for RuleFamily
impl Sync for RuleFamily
impl Unpin for RuleFamily
impl UnsafeUnpin for RuleFamily
impl UnwindSafe for RuleFamily
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.