pub struct KernelFusionEngine {
pub patterns: Vec<FusionPattern>,
pub constraints: Vec<FusionConstraint>,
pub generated_kernels: Arc<RwLock<HashMap<String, FusedKernel>>>,
pub performance_database: Arc<RwLock<PerformanceDatabase>>,
pub fusion_statistics: Arc<RwLock<FusionStatistics>>,
}Expand description
Kernel fusion engine
Fields§
§patterns: Vec<FusionPattern>§constraints: Vec<FusionConstraint>§generated_kernels: Arc<RwLock<HashMap<String, FusedKernel>>>§performance_database: Arc<RwLock<PerformanceDatabase>>§fusion_statistics: Arc<RwLock<FusionStatistics>>Implementations§
Source§impl KernelFusionEngine
impl KernelFusionEngine
pub fn new() -> Self
pub fn analyze_graph( &self, graph: &ComputationGraph, ) -> Result<Vec<FusionOpportunity>>
pub fn fuse_operations( &self, graph: &ComputationGraph, opportunity: &FusionOpportunity, ) -> Result<FusedKernel>
pub fn shapes_broadcastable(&self, shape1: &[usize], shape2: &[usize]) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelFusionEngine
impl RefUnwindSafe for KernelFusionEngine
impl Send for KernelFusionEngine
impl Sync for KernelFusionEngine
impl Unpin for KernelFusionEngine
impl UnsafeUnpin for KernelFusionEngine
impl UnwindSafe for KernelFusionEngine
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more