pub struct ParallelConfig {
pub parallel_batch: bool,
pub parallel_heads: bool,
pub min_batch_size: usize,
pub min_vector_size: usize,
}Expand description
Configuration for parallel execution
Fields§
§parallel_batch: boolEnable parallel batch processing
parallel_heads: boolEnable parallel layer computation (for independent heads)
min_batch_size: usizeMinimum batch size to trigger parallel processing
min_vector_size: usizeMinimum vector size for parallel operations
Implementations§
Source§impl ParallelConfig
impl ParallelConfig
Sourcepub fn throughput() -> Self
pub fn throughput() -> Self
Create configuration optimized for throughput
Sourcepub fn should_parallel_batch(&self, batch_size: usize) -> bool
pub fn should_parallel_batch(&self, batch_size: usize) -> bool
Should use parallel batch processing for this batch size?
Sourcepub fn should_parallel_heads(&self, num_heads: usize) -> bool
pub fn should_parallel_heads(&self, num_heads: usize) -> bool
Should use parallel heads for this number of heads?
Trait Implementations§
Source§impl Clone for ParallelConfig
impl Clone for ParallelConfig
Source§fn clone(&self) -> ParallelConfig
fn clone(&self) -> ParallelConfig
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 ParallelConfig
impl Debug for ParallelConfig
Auto Trait Implementations§
impl Freeze for ParallelConfig
impl RefUnwindSafe for ParallelConfig
impl Send for ParallelConfig
impl Sync for ParallelConfig
impl Unpin for ParallelConfig
impl UnwindSafe for ParallelConfig
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> 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