pub enum PvStep {
Conv {
wi: usize,
src: u8,
dst: u8,
res: Option<u8>,
dil: u32,
h: usize,
w: usize,
},
NormSilu {
gi: usize,
src: u8,
dst: u8,
c: usize,
h: usize,
w: usize,
},
Unshuffle {
src: u8,
dst: u8,
c: usize,
h: usize,
w: usize,
},
Shuffle {
src: u8,
dst: u8,
add: Option<u8>,
c: usize,
h: usize,
w: usize,
},
}Expand description
One device step. Buffers are numbered; h×w is the spatial size of
the step’s SOURCE, NCHW f32 throughout.
Variants§
Conv
dst = conv(src) + b (+ res), 3×3, dilation = padding = dil.
NormSilu
dst = silu(rmsnorm_c(src) · γ).
Unshuffle
dst = pixel_unshuffle(src, 2): [c, h, w] → [4c, h/2, w/2].
Shuffle
dst = pixel_shuffle(src, 2) (+ add): [c, h, w] → [c/4, 2h, 2w].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PvStep
impl RefUnwindSafe for PvStep
impl Send for PvStep
impl Sync for PvStep
impl Unpin for PvStep
impl UnsafeUnpin for PvStep
impl UnwindSafe for PvStep
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