pub enum ExecMode {
Stream,
Graph,
Eager,
MultiStream(usize),
}Expand description
How the schedule executes.
Stream (default) launches each Step on the default stream every
run(). Graph captures the full schedule into a CUDA Graph on
first run and replays the captured graph on subsequent runs —
eliminates per-launch dispatch overhead (~10-20% on small-batch
inference). Eager is a one-shot helper that compiles + runs +
drops the executable in one call; useful for interactive debugging.
MultiStream(n) allocates a pool of n streams and assigns each
Step to a stream based on data dependencies — independent ops
(e.g. unfused Q/K/V projections, FFN gate/up) run in parallel.
Cross-stream synchronization uses CUDA events at producer-consumer
boundaries.
Variants§
Trait Implementations§
impl Copy for ExecMode
impl Eq for ExecMode
impl StructuralPartialEq for ExecMode
Auto Trait Implementations§
impl Freeze for ExecMode
impl RefUnwindSafe for ExecMode
impl Send for ExecMode
impl Sync for ExecMode
impl Unpin for ExecMode
impl UnsafeUnpin for ExecMode
impl UnwindSafe for ExecMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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