pub struct GraphOptConfig {
pub enable_fusion: bool,
pub enable_layout_opt: bool,
pub enable_memory_opt: bool,
pub enable_constant_folding: bool,
pub enable_tiling: bool,
pub enable_scheduling: bool,
pub tile_size: Option<usize>,
pub memory_budget: Option<usize>,
}Expand description
Configuration for graph optimization integration
Fields§
§enable_fusion: boolEnable operation fusion
enable_layout_opt: boolEnable layout optimization
enable_memory_opt: boolEnable memory optimization
enable_constant_folding: boolEnable constant folding at graph level
enable_tiling: boolEnable tiling for large operations
enable_scheduling: boolEnable scheduling optimization
tile_size: Option<usize>Target tile size for tiling optimization
memory_budget: Option<usize>Memory budget for memory optimization (in bytes)
Implementations§
Source§impl GraphOptConfig
impl GraphOptConfig
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Create a new configuration with all optimizations enabled
Sourcepub fn conservative() -> Self
pub fn conservative() -> Self
Create a configuration with conservative optimizations (safe defaults)
Sourcepub fn for_inference() -> Self
pub fn for_inference() -> Self
Create a configuration optimized for inference (minimize latency)
Sourcepub fn for_training() -> Self
pub fn for_training() -> Self
Create a configuration optimized for training (minimize memory)
Trait Implementations§
Source§impl Clone for GraphOptConfig
impl Clone for GraphOptConfig
Source§fn clone(&self) -> GraphOptConfig
fn clone(&self) -> GraphOptConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphOptConfig
impl Debug for GraphOptConfig
Auto Trait Implementations§
impl Freeze for GraphOptConfig
impl RefUnwindSafe for GraphOptConfig
impl Send for GraphOptConfig
impl Sync for GraphOptConfig
impl Unpin for GraphOptConfig
impl UnwindSafe for GraphOptConfig
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
Mutably borrows from an owned value. Read more