pub struct BatchScheduler { /* private fields */ }Expand description
Heuristic-based scheduler that decides how to execute a batch.
The strategy depends on batch size and average matrix complexity:
| Condition | Strategy |
|---|---|
| batch <= 4 and avg_nnz >= 10 000 | Sequential |
| batch >= 64 and avg_nnz < 256 | Fused |
| otherwise | Concurrent with up to 8 streams |
Implementations§
Source§impl BatchScheduler
impl BatchScheduler
Sourcepub fn select_strategy(&self, batch_size: usize, avg_nnz: usize) -> Strategy
pub fn select_strategy(&self, batch_size: usize, avg_nnz: usize) -> Strategy
Select an execution strategy for the given batch characteristics.
§Arguments
batch_size– Number of independent operations in the batch.avg_nnz– Average number of non-zeros per matrix in the batch.
Sourcepub fn select_strategy_static(batch_size: usize, avg_nnz: usize) -> Strategy
pub fn select_strategy_static(batch_size: usize, avg_nnz: usize) -> Strategy
Static version of select_strategy for use
without constructing a scheduler instance.
Trait Implementations§
Source§impl Clone for BatchScheduler
impl Clone for BatchScheduler
Source§fn clone(&self) -> BatchScheduler
fn clone(&self) -> BatchScheduler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BatchScheduler
impl Debug for BatchScheduler
Auto Trait Implementations§
impl Freeze for BatchScheduler
impl RefUnwindSafe for BatchScheduler
impl Send for BatchScheduler
impl Sync for BatchScheduler
impl Unpin for BatchScheduler
impl UnsafeUnpin for BatchScheduler
impl UnwindSafe for BatchScheduler
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