pub struct FusionCubeRuntime<R: CubeRuntime, BT: BoolElement> { /* private fields */ }
Available on crate feature
fusion
only.Expand description
Fusion runtime for JIT runtimes.
Trait Implementations§
Source§impl<R: Debug + CubeRuntime, BT: Debug + BoolElement> Debug for FusionCubeRuntime<R, BT>
impl<R: Debug + CubeRuntime, BT: Debug + BoolElement> Debug for FusionCubeRuntime<R, BT>
Source§impl<R: CubeRuntime, BT: BoolElement> FusionRuntime for FusionCubeRuntime<R, BT>
impl<R: CubeRuntime, BT: BoolElement> FusionRuntime for FusionCubeRuntime<R, BT>
Source§type OptimizationState = CubeOptimizationState
type OptimizationState = CubeOptimizationState
The state that can be serialized for an optimization.
Source§type Optimization = CubeOptimization<R>
type Optimization = CubeOptimization<R>
Optimization type for the backend.
Source§type FusionHandle = CubeFusionHandle<R>
type FusionHandle = CubeFusionHandle<R>
Handle used to store tensor dynamically.
Source§type FusionDevice = <R as CubeRuntime>::CubeDevice
type FusionDevice = <R as CubeRuntime>::CubeDevice
Device used by the runtime.
Source§type FusionClient = MutexFusionClient<FusionCubeRuntime<R, BT>>
type FusionClient = MutexFusionClient<FusionCubeRuntime<R, BT>>
The client to interact with the runtime.
Source§fn optimizations(
device: R::Device,
) -> Vec<Box<dyn OptimizationBuilder<Self::Optimization>>>
fn optimizations( device: R::Device, ) -> Vec<Box<dyn OptimizationBuilder<Self::Optimization>>>
The list of optimizations that will be used to optimize the computational graph.
Source§impl<R, BT> Optimization<FusionCubeRuntime<R, BT>> for CubeOptimization<R>where
R: CubeRuntime,
BT: BoolElement,
impl<R, BT> Optimization<FusionCubeRuntime<R, BT>> for CubeOptimization<R>where
R: CubeRuntime,
BT: BoolElement,
Source§fn execute(
&mut self,
context: &mut Context<'_, <FusionCubeRuntime<R, BT> as FusionRuntime>::FusionHandle>,
execution: &OrderedExecution<FusionCubeRuntime<R, BT>>,
)
fn execute( &mut self, context: &mut Context<'_, <FusionCubeRuntime<R, BT> as FusionRuntime>::FusionHandle>, execution: &OrderedExecution<FusionCubeRuntime<R, BT>>, )
Execute the operation.
Source§fn to_state(&self) -> CubeOptimizationState
fn to_state(&self) -> CubeOptimizationState
Returns the state that can be serialized.
Source§fn from_state(device: &R::Device, state: CubeOptimizationState) -> Self
fn from_state(device: &R::Device, state: CubeOptimizationState) -> Self
Create the optimization from the state.
Auto Trait Implementations§
impl<R, BT> Freeze for FusionCubeRuntime<R, BT>
impl<R, BT> RefUnwindSafe for FusionCubeRuntime<R, BT>where
R: RefUnwindSafe,
BT: RefUnwindSafe,
impl<R, BT> Send for FusionCubeRuntime<R, BT>
impl<R, BT> Sync for FusionCubeRuntime<R, BT>
impl<R, BT> Unpin for FusionCubeRuntime<R, BT>
impl<R, BT> UnwindSafe for FusionCubeRuntime<R, BT>where
R: UnwindSafe,
BT: UnwindSafe,
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> 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