pub struct FusionConfig {
pub logger: LoggerConfig<FusionLogLevel>,
pub beam_search: BeamSearchConfig,
pub max_graph_size: Option<usize>,
pub growth_patience: usize,
}Expand description
Configuration for operation fusion in Burn.
Fields§
§logger: LoggerConfig<FusionLogLevel>Logger configuration for fusion logs.
beam_search: BeamSearchConfigBeam search configuration used when exploring fusion opportunities.
max_graph_size: Option<usize>Maximum number of operations in a single client-cached graph (router graph caching).
The greedy graph fuser keeps accumulating ops into one cached graph; once it reaches this
many ops the graph is closed and dispatched. None (the default) sets no size cap, leaving
growth_patience to decide when a graph stops being worth growing;
set a value to also bound the per-graph memory and the cost of building and replaying any
single graph.
growth_patience: usizeClose the current graph once its fusion score hasn’t reached a new maximum for this many consecutive ops (router graph caching).
The fuser scores the accumulated ops as they grow and tracks the best score so far; once this many ops have been added without beating it, the graph has stopped getting more worth caching and is closed. Higher values keep growing the graph longer in search of a better score.
Trait Implementations§
Source§impl Clone for FusionConfig
impl Clone for FusionConfig
Source§fn clone(&self) -> FusionConfig
fn clone(&self) -> FusionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more