pub struct PsaExtractVOp<D: Float + Send + Sync + 'static>(/* private fields */);Expand description
CustomOp for PsaExtractVRuntimeOp.
Graph node: [B, qkv_h, H, W] → [B, c, H, W] (c = qkv_h / 2)
Implementations§
Trait Implementations§
Source§impl<D: Float + Send + Sync + 'static> CustomOp for PsaExtractVOp<D>
impl<D: Float + Send + Sync + 'static> CustomOp for PsaExtractVOp<D>
Source§fn infer_output_shape(&self, input_shapes: &[&Shape]) -> Shape
fn infer_output_shape(&self, input_shapes: &[&Shape]) -> Shape
Compute the output shape given the shapes of all input tensors in order.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Expose
self as &dyn Any so the custom lowering can downcast to the
concrete op type. Implement as fn as_any(&self) -> &dyn Any { self }.Source§fn lower(&self) -> Option<(String, String, String, Arc<dyn RuntimeOp>)>
fn lower(&self) -> Option<(String, String, String, Arc<dyn RuntimeOp>)>
Return kernel lowering info so
TritonLowering can compile this op
without a project-specific middleware. Return None to keep the
existing middleware / error behaviour. Read moreSource§fn lower_backward_source(&self) -> String
fn lower_backward_source(&self) -> String
Return the backward kernel source for this op (used in training mode).
Return an empty string if this op has no backward pass.
Auto Trait Implementations§
impl<D> Freeze for PsaExtractVOp<D>
impl<D> RefUnwindSafe for PsaExtractVOp<D>where
D: RefUnwindSafe,
impl<D> Send for PsaExtractVOp<D>
impl<D> Sync for PsaExtractVOp<D>
impl<D> Unpin for PsaExtractVOp<D>
impl<D> UnsafeUnpin for PsaExtractVOp<D>
impl<D> UnwindSafe for PsaExtractVOp<D>where
D: RefUnwindSafe,
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