pub struct SortBackwardPlan<T: Element> { /* private fields */ }Expand description
sort_backward plan.
Adjoint of crate::SortPlan: scatters d_values[b, p] to
d_input[b, indices[b, p]]. Pure index-routed permutation —
each input position receives exactly one gradient, so no atomics
needed.
When to use: BW for SortPlan. Consumes
the FW’s saved indices verbatim.
Dtypes: {f32, f64, i32, i64} (matches FW).
Shape limits: rank-2 [batch, row_len]; row_len ≤ 1024.
Workspace: none.
Precision guarantee: deterministic, bit-stable.
Implementations§
Source§impl<T: Element> SortBackwardPlan<T>
impl<T: Element> SortBackwardPlan<T>
Sourcepub fn select(
_stream: &Stream,
desc: &SortBackwardDescriptor,
_pref: PlanPreference,
) -> Result<Self>
pub fn select( _stream: &Stream, desc: &SortBackwardDescriptor, _pref: PlanPreference, ) -> Result<Self>
Pick a kernel for desc.
Sourcepub fn can_implement(&self, args: &SortBackwardArgs<'_, T>) -> Result<()>
pub fn can_implement(&self, args: &SortBackwardArgs<'_, T>) -> Result<()>
Validate args.
Sourcepub fn workspace_size(&self) -> usize
pub fn workspace_size(&self) -> usize
Workspace size in bytes.
Sourcepub fn precision_guarantee(&self) -> PrecisionGuarantee
pub fn precision_guarantee(&self) -> PrecisionGuarantee
Numerical guarantees for this plan’s kernel.
Auto Trait Implementations§
impl<T> Freeze for SortBackwardPlan<T>
impl<T> RefUnwindSafe for SortBackwardPlan<T>where
T: RefUnwindSafe,
impl<T> Send for SortBackwardPlan<T>where
T: Send,
impl<T> Sync for SortBackwardPlan<T>where
T: Sync,
impl<T> Unpin for SortBackwardPlan<T>where
T: Unpin,
impl<T> UnsafeUnpin for SortBackwardPlan<T>
impl<T> UnwindSafe for SortBackwardPlan<T>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