#[repr(u32)]pub enum Epilogue {
Show 16 variants
None = 0,
Relu = 1,
Bias = 2,
ReluBias = 3,
ReluAux = 4,
ReluAuxBias = 5,
Gelu = 6,
GeluAux = 7,
GeluBias = 8,
GeluAuxBias = 9,
DRelu = 10,
DReluBgrad = 11,
DGelu = 12,
DGeluBgrad = 13,
BgradA = 14,
BgradB = 15,
}Expand description
Curated epilogue matrix.
Variants§
None = 0
No fused activation, no bias. Identity epilogue.
Relu = 1
Fused ReLU.
Bias = 2
Bias-add only.
ReluBias = 3
Bias-add + ReLU.
ReluAux = 4
ReLU forward storing the masked-input “aux” tensor for the matching backward pass.
ReluAuxBias = 5
ReLU forward + bias + aux storage.
Gelu = 6
Fused GeLU.
GeluAux = 7
GeLU forward storing the unactivated preact for backward.
GeluBias = 8
Bias-add + GeLU.
GeluAuxBias = 9
Bias-add + GeLU forward + aux storage.
DRelu = 10
ReLU backward (drelu) — gradient w.r.t. the preact.
DReluBgrad = 11
ReLU backward + reduce-sum producing bias gradient.
DGelu = 12
GeLU backward (dgelu).
DGeluBgrad = 13
GeLU backward + reduce-sum producing bias gradient.
BgradA = 14
Reduction-only along the A (M) dimension — produces the
bias-grad without any activation.
BgradB = 15
Reduction-only along the B (N) dimension.
Implementations§
Source§impl Epilogue
impl Epilogue
Sourcepub fn uses_aux(self) -> bool
pub fn uses_aux(self) -> bool
Does this epilogue store or consume an epilogue_aux tensor
(the activation preact / mask used by the matching backward)?
Sourcepub fn produces_bias_grad(self) -> bool
pub fn produces_bias_grad(self) -> bool
Does this epilogue produce a bias gradient as a side output
(BGRADA, BGRADB, or D{Relu,Gelu}_BGRAD)?
Trait Implementations§
impl Copy for Epilogue
impl Eq for Epilogue
impl StructuralPartialEq for Epilogue
Auto Trait Implementations§
impl Freeze for Epilogue
impl RefUnwindSafe for Epilogue
impl Send for Epilogue
impl Sync for Epilogue
impl Unpin for Epilogue
impl UnsafeUnpin for Epilogue
impl UnwindSafe for Epilogue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.