pub struct ReducePlan<T: Element, const N: usize> { /* private fields */ }Expand description
Single-axis reduction plan — see module docs for the wired matrix, workspace, and precision guarantees.
T: Element is the element type (f32 / f64 / f16 / bf16).
const N: usize is the tensor rank.
Implementations§
Source§impl<T: Element, const N: usize> ReducePlan<T, N>
impl<T: Element, const N: usize> ReducePlan<T, N>
Sourcepub fn select(
_stream: &Stream,
desc: &ReduceDescriptor<N>,
_pref: PlanPreference,
) -> Result<Self>
pub fn select( _stream: &Stream, desc: &ReduceDescriptor<N>, _pref: PlanPreference, ) -> Result<Self>
Pick a kernel for desc.
Sourcepub fn can_implement(&self, args: &ReduceArgs<'_, T, N>) -> Result<()>
pub fn can_implement(&self, args: &ReduceArgs<'_, T, N>) -> Result<()>
Validate args.
Sourcepub fn workspace_size(&self) -> usize
pub fn workspace_size(&self) -> usize
Workspace size in bytes. Always 0 for the naive trailblazer.
Sourcepub fn precision_guarantee(&self) -> PrecisionGuarantee
pub fn precision_guarantee(&self) -> PrecisionGuarantee
Numerical guarantees for this plan’s kernel.
Auto Trait Implementations§
impl<T, const N: usize> Freeze for ReducePlan<T, N>
impl<T, const N: usize> RefUnwindSafe for ReducePlan<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for ReducePlan<T, N>where
T: Send,
impl<T, const N: usize> Sync for ReducePlan<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for ReducePlan<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for ReducePlan<T, N>
impl<T, const N: usize> UnwindSafe for ReducePlan<T, N>where
T: 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