pub struct RepeatPlan<T: Element, const N: usize> { /* private fields */ }Expand description
repeat plan.
Per-axis tile: output.shape[d] = input.shape[d] * repeats[d]
(PyTorch torch.repeat). Kernel walks output cells and computes
input coords as output_coord[d] % input.shape[d].
When to use: forward repeat. Pair with
RepeatBackwardPlan.
Dtypes: {f32, f64, f16, bf16}. Pure load + store.
Shape limits: rank in [1, 8]; repeats[d] ≥ 1.
Workspace: none.
Precision guarantee: deterministic, bit-stable, bit-exact.
Implementations§
Source§impl<T: Element, const N: usize> RepeatPlan<T, N>
impl<T: Element, const N: usize> RepeatPlan<T, N>
Sourcepub fn select(
_stream: &Stream,
desc: &RepeatDescriptor<N>,
_pref: PlanPreference,
) -> Result<Self>
pub fn select( _stream: &Stream, desc: &RepeatDescriptor<N>, _pref: PlanPreference, ) -> Result<Self>
Pick a kernel for desc.
Sourcepub fn can_implement(&self, args: &RepeatArgs<'_, T, N>) -> Result<()>
pub fn can_implement(&self, args: &RepeatArgs<'_, T, N>) -> 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.
Auto Trait Implementations§
impl<T, const N: usize> Freeze for RepeatPlan<T, N>
impl<T, const N: usize> RefUnwindSafe for RepeatPlan<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for RepeatPlan<T, N>where
T: Send,
impl<T, const N: usize> Sync for RepeatPlan<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for RepeatPlan<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for RepeatPlan<T, N>
impl<T, const N: usize> UnwindSafe for RepeatPlan<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